I am trying to setup event tracking in Google Analytics and events do not seem to be sent.
Somewhere in my javascript after page load:
ga('send', 'event', 'someCategory', 'someAction', {
hitCallback: function() {
console.log('Tracking is successful');
}
});
I have tried with both analytics.js and analytics_debug.js, with and without the hitCallback. This is following with Google documentation about events tracking in analytics.
None requests anything:
- No request hitting https://www.google-analytics.com/collect as some source say it should.
- No extra component is loaded.
- No succesful tracking
analytics_debug.js gives some extra logs:
Running command: ga("require", "eventTracker")
Waiting on require of "eventTracker" to be fulfilled.
And nothing seems ever to be fulfilled.
I have tried to include also this snippet in some sick try of voodoo debugging.
ga('require', 'eventTracker');
Edit:
Following @Eike I found remaining autotrack code like:
ga('require', 'eventTracker');
Removing it fixed the problem.