Search code examples
google-analyticsgoogle-tag-manager

How to fire a pageview tag before any other analytics tag with Google Tagmanagement?


I see that on certain pages the event hits are being send to google analytics before the pageview hit is being send. This is causing some problems in my reports. I always thought that when the pageview trigger is fired before the event trigger, the same order would be applied for the sequence of the firing of the tags, but apparently it's not. What would be the best way to always fire the pageview tag before anyother tag is being fired?

Thanks in advance!


Solution

  • You can use GTM's "Tag firing priority": https://support.google.com/tagmanager/answer/2772421?hl=en

    In your GA tag under Advanced settings:

    enter image description here

    Set "Tag firing priority" of your pageview Tag to "1".

    Set "Tag firing priority" of your event Tag to "0" or lower.