Title: Adding Google Tag Manager Using OpenHook
Last modified: August 24, 2016

---

# Adding Google Tag Manager Using OpenHook

 *  Resolved [David](https://wordpress.org/support/users/nicheplay/)
 * (@nicheplay)
 * [11 years ago](https://wordpress.org/support/topic/adding-google-tag-manager-using-openhook/)
 * This seems like it would be a common question but cannot find the answer here
   or elsewhere.
 * Which openhook box should the Google Tag Manager get pasted into?
 * “Google Tag Manager should be located just after the opening <body> tag and if
   you implement a data layer, it needs to be in the <head> section.”
 * BUT… I can’t find any reference of which openhook box would put code just after
   the opening <body> tag OR in the <head>.
 * Any help appreciated!
 * [https://wordpress.org/plugins/thesis-openhook/](https://wordpress.org/plugins/thesis-openhook/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Rick Beckman](https://wordpress.org/support/users/brazenlygeek/)
 * (@brazenlygeek)
 * [11 years ago](https://wordpress.org/support/topic/adding-google-tag-manager-using-openhook/#post-6181319)
 * If you want it in your `<head>`, add it to the `wp_head` box (under WordPress
   hooks).
 * Adding just after `<body>` depends upon which theme you’re using.
 * For Thesis 2: Add to an OpenBox and drag it to the very top of the main container
   in Thesis’ editor.
 * For Thesis 1.8.x: Add to the hook `thesis_hook_before_html`
 * For K2: Add to the hook `template_body_top`
 * For Headway: Add to the hook `headway_body_open` (this is just a guess — I’ve
   never used Headway to see where the hooks are located, just to find out what 
   they are named)
 * For Flat: Add to the hook `flat_body_top`
 * For themes supporting Theme Hook Alliance: Add to the hook `tha_body_top`
 *  Thread Starter [David](https://wordpress.org/support/users/nicheplay/)
 * (@nicheplay)
 * [11 years ago](https://wordpress.org/support/topic/adding-google-tag-manager-using-openhook/#post-6181383)
 * If you want it in your <head>, add it to the wp_head box
 * Looks like that did the trick. Thanks!
 *  Plugin Author [Rick Beckman](https://wordpress.org/support/users/brazenlygeek/)
 * (@brazenlygeek)
 * [11 years ago](https://wordpress.org/support/topic/adding-google-tag-manager-using-openhook/#post-6181390)
 * You got it! And thank you for using OpenHook. 😀
 *  Thread Starter [David](https://wordpress.org/support/users/nicheplay/)
 * (@nicheplay)
 * [11 years ago](https://wordpress.org/support/topic/adding-google-tag-manager-using-openhook/#post-6181399)
 * Q: How to add Google Tag Manager to Thesis in WP?
 * A: So that others can find the answer here as well… let me detail how I got the
   Google Tag Manager code AND the “data layer” into Thesis 1.8.x using OpenHook.(
   Thanks to [@brazenlygeek](https://wordpress.org/support/users/brazenlygeek/)!)
 * **1) Google Tag Manager**
 * Google Tag Manager should be located just after the opening <body> tag . So, 
   added that code snippet to hook thesis_hook_before_html.
 * **2) Data Layer**
 * if you implement a data layer, it needs to be in the <head> section. So, added
   it to the wp_head box.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Adding Google Tag Manager Using OpenHook’ is closed to new replies.

 * ![](https://ps.w.org/thesis-openhook/assets/icon.svg?rev=1116483)
 * [OpenHook](https://wordpress.org/plugins/thesis-openhook/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/thesis-openhook/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/thesis-openhook/)
 * [Active Topics](https://wordpress.org/support/plugin/thesis-openhook/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/thesis-openhook/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/thesis-openhook/reviews/)

## Tags

 * [gtm](https://wordpress.org/support/topic-tag/gtm/)
 * [Tag Manager](https://wordpress.org/support/topic-tag/tag-manager/)

 * 4 replies
 * 2 participants
 * Last reply from: [David](https://wordpress.org/support/users/nicheplay/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/adding-google-tag-manager-using-openhook/#post-6181399)
 * Status: resolved