Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics Custom Event Tracking Not Working

I am trying to add custom event tracking to a link on a site I built. For some reason it does not seem to be working. The code I have is:

onClick="_gaq.push(['_trackEvent', 'SOU Links', 'Click', 'Top edu banner']);"

The site URL is http://sou.wpengine.com/. The link with the event tracking is the "Sign Up Now" link at the top of the page. Any ideas?

like image 249
Andrew Avatar asked Sep 09 '13 19:09

Andrew


People also ask

Why are my events not showing on Google Analytics?

In google-analytics, for the correct website, look on the "realtime/events" page and see if events are appearing there (they should appear here within a few seconds, after being triggered on your website). If not, you might have added a filter, to filter out events generated by traffic from your own IP.


2 Answers

I had an issue with events not tracking (using Universal Analytics).

I installed the official Google Analytics Debugger from

https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna

And it showed me a warning message that event value was expecting an integer, but receiving an empty string. Once I cleared that up, the events showed up in the realtime tracker right away.

like image 79
Homer6 Avatar answered Nov 14 '22 20:11

Homer6


It appears you're using the advanced configuration setup described by google here. To track events, you'll want to use the event tracking methods described by google here.

Hope this helps.

Adding another helpful link: https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide

This will work for older tracking version: Tracking Basics (Asynchronous Syntax)

like image 37
bbone Avatar answered Nov 14 '22 20:11

bbone