Analytics
5K members online now
5K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Wrong page associated with event

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

I see in our Google Analytics data that the event tracking I set up is not working correctly. In this specific case, the event is fired, when a certain element on the homepage is seen. However, in GA the page associated with the event is not always the home page / (where the event occurs), but shows different pages in about half of the events.
I managed to create a segment which contains only a single session with this behaviour, so I could look at this in the GA user explorer. There the order of interactions is:
1) Pageview: /
2) Event
3) Pageview: /detail
This is the expected behaviour, as the event only triggers on /. However, looking at the report Events->Pages, I see the event is attributed to the page /detail.

While manually testing the implementation code, I could never reproduce this behaviour, where the event page is wrong. Does anyone have an idea what could cause this discrepancy between manual testing/GA user explorer and the Events->Pages Report in Google Analytics?

The website is a single page application build on angularJs with Google Analytics and the event tracking code implemented through a tag manager. So this could also be the source of error, but after testing and seeing the described discrepancy in GA I want to check the GA site first.

 

Any input and ideas would be appreciated.

 

Greetings,
Andreas

1 Expert replyverified_user

Wrong page associated with event

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

Use the network tab to ensure your event is not firing twice as you are using a single page application. 

 

Provide a link to the site and we can have a look.

Thanks,

Adam

Wrong page associated with event

Rising Star
# 3
Rising Star

Hi Andreas,

 

Are you using GTM?  If so then you need to review Simo's guide on SPA and GTM as there are some gotchas.  They may also extend to other TMS' platforms other than GTM.

 

https://www.simoahava.com/gtm-tips/fix-rogue-referral-problem-single-page-sites/

 

If you haven't you may also want to review that analytics.js reference on this as well:

 

https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications

 

Hope that helps.

 

Best,

 

Theo Bennett

 

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn