Site logo

Archived topic

Adding GTM code

4 replies · Started by _blank on December 10, 2019

Viewing posts 1–5 of 5

Hi there,

For the first GTM code that is added to the <head> the priority doesn't matter.

For the second piece of code the guide states you should use a Priority of 0, which will place it as the first element inside the <body> tag.

However, since WP 5.2 you can now choose the wp_open_body hook, which will place it immediatly after the opening <body> tag.

Yeah i changed the hook from (before_header) to (wp_open_body) and now it worked. Now the Search console got varified through GTM.

Thanks a Bunch..!!

Glad to be of help.

This archived topic is closed to new replies.