skip to Main Content

(I’m pretty new to technical SEO/GTM/Google Analytics, so apologies if I am missing something obvious.)

We have a website which has a UA tag and a GA4 tag, and a single GTM container tag, see photo:
Tag Assistant Screenshot

However, in GTM debug mode, when a page is loaded, it sends the "Container Loaded" event 3 times, which also seems to be sending 4 page view events to GA4, see photos:Google Tag Manager Screenshot, GTM- tag

Google Tag Manager Screenshot, G- (GA4) tag

However, when I check the Developer Tools (Chrome) on the page outside of debug mode, I can see that there is only 1 gtm.js script in the Network tab, see photo:Google Chrome Developer Mode Screenshot, showing only one gtm.js script

Would anyone be able to provide any guidance as to why the Container Loaded event might be firing multiple times, thus inflating our Page View events? Is this an error with where the snippet was added to the dataLayer?

Haven’t tried anything yet – waiting to see where the origin of the problem may be before making any changes.

2

Answers


    1. Don’t use tag assistant. Use Adswerve’s dataLayer Inspector, or the Network tab.
    2. Check if you actually have triple tracking with and without the GTM preview.
    3. Check how many times you attempt to load the container. Not through the network tab though since it will be cached after the first load. Check in the DOM. Maybe you’ve deployed it multiple times.
    4. There’s a small chance of your front-end deploying the script, then removing it then redeploying it again as a part of some front-end rendering artefact.
    Login or Signup to reply.
  1. The gtm.js request is not the only request that can send the Container Loaded event in the Data Layer.

    For example if you install the google tag for GA4 manually in the code like below it will send the Container Loaded event.

    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=GT-XXXXXXX"></script> <!-- Sends Container Loaded event to the data layer -->
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'GT-XXXXXXX');
    </script>
    

    Same thing for Google Ads :

    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXXXXX"></script> <!-- Sends Container Loaded event to the data layer -->
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'AW-XXXXXXXXXX');
    </script>
    
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search