1
votes

Okay, so I have a webpage that uses Google Analytics. It works fine for pageviews, but does not record any events. I use the older script ga.js and my event tracking codes look like

_gaq.push(['_trackEvent', 'click', 'navigation click', 'home']);

I use it in different ways, like as an onClick action

<a href="#home" onclick="_gaq.push(['_trackEvent', 'click', 'navigation click', 'home']);">Home</a>

or to record scroll depth (along with the waypoint plugin)

$('#printdesign').waypoint(function(direction){
    _gaq.push(['_trackEvent', 'scroll', 'scroll reach', 'printdesign']);
}, { offset: '20%', triggerOnce: true });

Absolutely no event has ever been tracked.

The page has been online for just about a day and a half. Might this be the reason, although pageviews are working? Could there be a conflict with another script? Anything else I might be doing wrong?

Update: No errors in my js console. In Firebug's DOM-tab I can see my click events 'being sent' through _gaq.push(). I installed httpfox and don't see anything.

Another update: Funny thing: GA has just started to track some of the onClick events, but only in Opera it seems. Some onClicks still aren't recognized and scroll events don't work at all.

Yet another update: In Android's standard browser both click and scroll events work fine! Firefox on Android: nothing. I can't believe this is a browser issue...

Final one: Okay guys. I guess some of you just visited the site and I am seeing your clicks and scrolls and whatnot. I have no idea what causes this odd behaviour, but I'm fine with not seeing my events, but everyone else's :D

1
Do you see any errors in your js console? - datasage
No, it doesn't give me any errors. - eevaa

1 Answers

0
votes

Are you using a http analyzer to check and see when you are clicking on the link, that the event is being triggered/fired?

I use HTTPFox - https://addons.mozilla.org/en-us/firefox/addon/httpfox/

but there are plenty others.