Reputation: 6409
I am running the following code (on document ready) to try to get google analytics event tracking working. The hitCallback is being run as expected, but the events are not being shown in Google Analytics.
$(function() {
console.log('pushing event');
ga('send', {
'hitType': 'event1',
'eventCategory': 'button',
'eventAction': 'click',
'eventLabel': 'contact form',
'hitCallback' : function () {
console.log('event received');
}
});
});
This code is currently live on http://atmosfire.com.au/.
In Google Analytics / Real Time / Events, I can see 1 active user (me), but none of the events I am triggering are being logged.
Help?
Upvotes: 0
Views: 202
Reputation: 8907
I don't think that "event1" is a valid hittype. Hittype can be any one of event, page view, social, transaction, item, exception, screen view, or timing.
Upvotes: 2