'GA Event tracking - Event being sent but not registered
I am doing an A/B/C-test at an e-commerce and I am trying to send an event tracking to Google Analytics depending on wich version is being used. The JavaScript (with the event tracking code) is being triggered when the page is loaded. I can see in "Developer Tools -> Network" that the event tracking is being sent to Google Analytics, but it is not registrered there. I've been looking both at "Real-time -> Events" and "Behaviour -> Events -> Overview" and nothing seems to work.
This is the code for the event tracking I am using:
ga('send', {
hitType: 'event',
eventCategory: 'frameWithPoster',
eventAction: 'Original',
eventLabel: 'No frames'
});
I've tried to change the "hitType" to "pageview" aswell and also tried to wrap it with a click event like so:
$("html").on("click", ".Knapp_Kop a", function() {
ga('send', {
hitType: 'event',
eventCategory: 'frameWithPoster',
eventAction: 'Original',
eventLabel: 'No frames'
});
})
Does anyone know what I can be doing wrong?
Solution 1:[1]
I hit this problem and found another reason, not mentioned elsewhere - event can be send but not registered if eventAction is EMPTY STRING.
In my case it was general method, that coalesced labels/ etc into empty strings and executed send via "ga('xxx.send', 'event', ea, eb, ec, ed);" xhr request was properly generated with call, Tag Assystent addon properly count it (https://chrome.google.com/webstore/detail/tag-assistant-legacy-by-g/kejbdjndbnbjgmefkgdddjlbokphdefk/related), but nothing in GA realtime report was triggered.
After changing send to "ga('xxx.send', 'event', ea);" for empty action/label - it started to work as expected
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | IPv6 |
