Event tracking[ Edited ]
February 2017 - last edited February 2017
Hi, I am trying to use GA event tracking. I set my goal and implemented this code to my site:
<a href="https://epdm-tpo.at/wp-content/uploads/2016/03/01-Detailstreifen.pdf" onClick="ga('send', 'event', ‘PDFDownloads', 'Click', ’SEO', '0');" >PDS Detailstreifen</a>
But there is no evidence that the code works.
Could somebody help me?
Is your site following?
If so, the site is not usign Universal Ver, but Classical Ver is used.
There are two choices.
1st, update the analysis code of the entire site to Universal Analytics.
2nd, Make event code of Classic Ver.
For the second method, try the code below.
_gaq.push(['_trackEvent', 'PDFDownloads', 'Click', ’SEO', '0']);
In GA, I have this:
This is the Universal Analytics tracking code for this property.
In GA I can see traffic on my site. The only thing I dont see are the goals.
So I assume I use the correct code.
onclick="ga('send', 'event', ‘PDFDownloads', 'Click', ’SEO', '0');"
onclick="ga('send', 'event', 'PDFDownloads', 'Click', 'SEO', '0');"
two apostrophe are wrong.
Also use: _gaq.push(['_trackEvent', 'PDFDownloads', 'Click', 'SEO', '0']);
Since your site is using GA classic through plugin.