Analytics
2.4K members online now
2.4K 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

Tracking Unique Views with History Change trigger in Tag Manager

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Dear friends,

 

My first post, please excuse any etiquette mistakes.

 

We recently implemented infinite scroll (Lazy loading). We then created tags in GTM based on History Change to track pageviews. Our pageviews have increased, as we would expect, but the unique page views have remained consistent.

 

Does the history change trigger effect Unique Views? If not, how would we track them accurately?


Many thanks,

1 Expert replyverified_user

Re: Tracking Unique Views with History Change trigger in Tag Manager

Top Contributor
# 2
Top Contributor
Hi Ben,

the issue here is what are you sending as the page dimension. The case can be that gtm.historyChange trigger sends a GA PV tag which carries on the same page path all the time. For instance by default pages such as:
mydomain.com/home#start
mydomain.com/home#mid
mydomain.com/home#finish

will in GA be reported as /home.

So you will need to work with overriding the page Fields to set inside the PV tag in order to pass on the unique value for each history change event. Make sure all of the History variables are enabled so you can use {{New History Fragment}} variable with some custom js additions to provide the value for each specific page.

The other solution would be to just include the page path with the addition of location.hash.

Hope it helps!

Kind regards,
Zorin
Web analyst @ escapestudio.net