Support » Plugin: Google Tag Manager for WordPress » Multiple installations of Google Tag Manager detected

  • Resolved cris7200

    (@cris7200)


    “Multiple installations of Google Tag Manager detected”
    I got this error in the product pages of the website with the chrome extension Google tag assistant.

    I checked and it seems that there are not other plugins that could insert a Google tag manager related script, so I would ask if you can check what could give this error, thanks in advance if you can help me.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    There is a second container code not added by my plugin on that page.
    This might be added manually into your theme files and not by any plugin:

    https://www.dropbox.com/s/iy2zd3pu60a8kpx/20180405-pivert-store-multiple-gtm.png?dl=0

    I can also see a Global Site Tag code that can make mess as well.

    i woThanks,

    this is the code in the theme header

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-59119270-1"></script>
    <script>
     window.dataLayer = window.dataLayer || [];
     function gtag(){dataLayer.push(arguments);}
     gtag('js', new Date());
    
     gtag('config', 'UA-591192xx-1');
    </script>
    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-MXDKNHx');</script>
    <!-- End Google Tag Manager -->
    <script src='https://www.google.com/recaptcha/api.js'></script>
    </head>
    
    <body <?php body_class(); ?>>
    <!-- Google Tag Manager (noscript) -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MXDKNHx"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager (noscript) -->

    What’s the part of the code that I would need to remove?

    Plugin Author Thomas Geiger

    (@duracelltomi)

    All 🙂

    Except for:

    <script src='https://www.google.com/recaptcha/api.js'></script>

    and

    <body <?php body_class(); ?>>

    My plugin will add the container code automatically.

    cgl102770

    (@cgl102770)

    I’m having the same issue, but can’t find the site tag code in the header or footer. I’ve disabled the plugins that I think may have put the code there, but I don’t think that removes the code. I see the global site tag code when I view source on the homepage of airdropranker.com , but not sure where in the wordpress code that code is to remove it. Any suggestions are appreciated.

    • This reply was modified 1 year ago by  cgl102770.
    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Could you post the URL of your site?
    Generally my plugin does not add the global site tag so if you see any such code that is definitely not related to this plugin.

    cgl102770

    (@cgl102770)

    Thank you for the reply, it is http://www.airdropranker.com

    Plugin Author Thomas Geiger

    (@duracelltomi)

    You do not have any GTM code in your site and your issue does not seem to be related to this plugin.

    Don’t you have the “Insert Headers and Footers” plugin active on your site?

    cgl102770

    (@cgl102770)

    That’s where it is! Thank you for that, sorry to bother you…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Multiple installations of Google Tag Manager detected’ is closed to new replies.