Jump to content

Google Tag Assistant Error


dvd2org

Recommended Posts

hi

i want connect google tag manager to my website www.vahidkala.com , after creating google tag manager account i copied code to header.tpl

<html{if isset($language_code) && $language_code} lang="{$language_code|escape:'html':'UTF-8'}"{/if}>
    <head>
        {literal}
            <!-- 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-....');</script>
            <!-- End Google Tag Manager -->
        {/literal} 

 

as u see i put it correctly but i got error in tag assistant google chrom extension

GTM JavaScript code not found as a direct child of the <head> tag

 

please sombody help  what can i do??

thank you

Edited by dvd2org (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...