Mobile app version of vmapp.org
Login or Join
Berryessa370

: Can I fire a GTM tag on both page view and history change without needing separate triggers? My site uses pushState and popState do I need to have 2 separate triggers for page views (i.e.

@Berryessa370

Posted in: #GoogleTagManager

My site uses pushState and popState do I need to have 2 separate triggers for page views (i.e. when the page first loads) and history changes (i.e. javascript backed navigation)?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Berryessa370

1 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

I believe you can do this with a Custom HTML tag which would listen for either the pageview event gtm.js or the history change event gtm.historyChange. As soon as either one occurs, then you can push a custom event myEvent which can be used to fire your tag.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme