Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1412687

    Hello,

    I have linked the Google Tag Manager to the website by entering the tracking code in the head and body of the theme-code as always. However, I noticed something strange regarding the Tag Manager which i have never seen: on the one hand, the Tag Assistant shows that the Tag Manager is correctly linked and working, but on the other hand, the preview function of the Google Tag Manager shows that no tag was found. We suspect that something is wrong with the theme. Can you help me?

    Thanks
    Ben

    #1412760

    Hi Ben,

    I’m not too familiar with Google Tag Manager unfortunately. Does the preview do anything except simply show you a preview? If not, and if your code is working as it should, then I don’t think you have anything to worry about.

    Best regards,
    Rikard

    #1413603

    Hi Rikard,
    The preview is basically a test to see which tags are working. I created tags for the conversion tracking and i can not test if they are working and they rather seem to not work. I created them like i always create them so i suspect that something is not working with the theme.

    Thanks
    Ben

    #1413636

    Hi,

    Where exactly is the code supposed to go, and which code are you trying to add?

    Best regards,
    Rikard

    #1416227

    Hi,
    The Tag Manager Tracking Code is in the head and in the body of all pages. That is needed in order for the Tag Manager to work. But for some reason the Troubleshooting of the Tag Manager is saying that the Tag is not found.

    Thanks
    Ben

    #1416240

    Hi,

    Thanks for the update. Could you share the code in question, so that we can check if it’s actually there? You might want to reach out to Google support as well, as we can’t answer specific questions about their services.

    Best regards,
    Rikard

    #1421948

    Hi,

    this is the code that is in the head of the website:

    <!– 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-KDJ8G4F’);</script>
    <!– End Google Tag Manager –>

    this is the code in the body of the website:

    <!– Google Tag Manager (noscript) –>
    <noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-KDJ8G4F&#8221;
    height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
    <!– End Google Tag Manager (noscript) –>

    Thanks
    Ben

    #1421977

    Hi,

    Thanks for that. I can see the code added on the site, please see screenshot in private. If you are using some kind of service that would delay the execution of the script, then please try to turn that off. You could also try adding it manually using a function, or directly to header.php in a child theme for example, to check what happens then.

    Best regards,
    Rikard

    #1438766

    HI Rikard
    How / where do I integrate google Tag Manager into the enfold theme?
    Thx Abrahamson

    #1438804

    Hi,
    Try adding to your child theme functions.php:

    function custom_gtm() { ?>
      <script>
    
    // add your code here
    
      </script>
      <?php
    }
    add_action( 'wp_head', 'custom_gtm', 99 );

    Best regards,
    Mike

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.