• Hi everyone,

    A few weeks ago Google decided to change the code to implement Google Tag manager into two pieces of code.
    Before it was only one piece of code, to place immediatly after the opening <body> tag.
    Now there are two pieces of code: one to put in the head, the other to put after the <body> tag.

    Does anyone now how to implement these two pieces of code in WordPress?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Not to be obtuse, but you put the block that belongs in the <head></head> section inside the <head></head> section and the part that goes right after the <body> tag, right after the <body> tag.

    I would think this is pretty self-explanatory.

    The <head> part is easy. That can be added in by using the wp_head action.

    The part in the body is a little harder. If it needs to go right after the opening <body> tag then it’s going to need to be theme-dependant, which will be an issue if you’re trying to do something that’s shareable. If you’re only doing this for a single site, then you just need to add into into your themes header.php file (of coruse, using a child theme!)

    • This reply was modified 8 years, 4 months ago by catacaustic. Reason: Typos... :(
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Tag manager implementation’ is closed to new replies.