Reputation: 3730
I have the following code in my website and its not firing an event :
<li><a href="/customer-care/faq" onclick="_gaq.push(['_trackEvent', 'FOOTER MENU', 'CLICK', 'FAQs']);" target="_blank">FAQs</a></li>
I have the following code in the same page and I am getting an event back for it :
<li><a href="#" onclick="PopupCenter('/privacy_policy.aspx','','550','700')">Privacy Policy</a></li>
why won't my first line of code fire an event on google analytics ?
Upvotes: 0
Views: 63
Reputation: 8907
Looks like you are using Universal Analytics, but the onclick code you have is for Classic GA. You will need to update the onclick code as follows:
onclick="ga('send', 'event', 'FOOTER MENU', 'CLICK', 'FAQs');"
Upvotes: 1