Archived topic
Implementing Google Tag Manager
3 replies · Started by Oisin on October 27, 2019
Hi Folks,
I read your guide about using hooks but I noticed that article does not mention adding the second tag immediately after the opening body tag as per the instructions given by Google Tag Manager. Maybe I'm missing something?
Thanks,
Johnny.
Hi there,
Adding the tag manager scripts is covered here:
https://docs.generatepress.com/article/implement-google-tag-manager/
WordPress 5.2 introduced the wp_body_open hook. We added this to GP Theme 2.3 so you can use it today by selecting Custom Hook > wp_body_open instead of the before_header hook mentioned in the doc. This will be added to hook list in GP Premium 1.9.
Cheers David,
That's the article, really helpful. I'll edit the hook in the new release.
Thanks for the info,
Johnny.
You're welcome