javascriptgoogle-analyticsab-testing

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 which 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 registered 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" as well 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

  • Seems like it is not being showed because we have multiple domains (views) at one account. So next thing to look up is to see why it is not being showed at this account.

    The specific account for a specific domain shows the events.