AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

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

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:

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,
Web analyst @