Google Tag Manager Placement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • afiumano
    Mighty Mivite




    • Dec 2010
    • 765

    #1

    Google Tag Manager Placement

    I need to place some Google Tag Manager code directly below the opening <head> tag and another block of code immediately after the opening <body> tag. How is this accomplished without placing them individually on every page?
  • kat_oakos
    Mini Mivite

    • Jun 2020
    • 41

    #2
    User Interface > Settings

    Then you can put it in the section that says "HEAD Tag Content"

    Comment

    • afiumano
      Mighty Mivite




      • Dec 2010
      • 765

      #3
      I had tried that already, and it doesn't place it immediately below the opening <head> tag - it appears after a bunch of other code. And I also need another block of code immediately after the opening <body> tag.

      Comment

      • Bruce - PhosphorMedia
        Developer Partner











        • Mar 2006
        • 11256

        #4
        It isn't really necessary to place it 'immediately' after the </head> tag. They just tell you that because. 1) they want to be first 2) it prevents any downstream errors from causing problems with THEIR code. Of course, everyone tell you to place their code there...so...
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment

        • mvasquez
          Mivite



          • Oct 2016
          • 142

          #5
          and everyone tells you to place their code first! Always a fun game.

          Comment

          • lesliekirk
            Super Moderator











            • Aug 2008
            • 9290

            #6
            Originally posted by afiumano View Post
            I need to place some Google Tag Manager code directly below the opening <head> tag and another block of code immediately after the opening <body> tag. How is this accomplished without placing them individually on every page?
            Ignorant question - is there a good how-to for implementing GTM? Or is it just a matter of plopping the code as close to the opening <head> tag?
            Leslie Kirk
            Miva Certified Developer
            Miva Merchant Specialist since 1997
            Previously of Webs Your Way
            (aka Leslie Nord leslienord)

            Email me: [email protected]
            www.lesliekirk.com

            Follow me: X | Facebook | Pinterest

            Comment

            Working...
            X