Home › Forums › Support › How can I modify some code lines for "Google Tag Manager" in the theme template? This topic has 8 replies, 2 voices, and was last updated 4 years, 3 months ago by David. Viewing 9 posts - 1 through 9 (of 9 total) Author Posts January 28, 2019 at 12:52 am #794096 noe_sp How can I modify some code lines of “Google Tag Manager” in the theme template? so that every time I update the theme, do not have to modify it. Thanks in advance! January 28, 2019 at 2:48 am #794162 noe_sp Sorry! I have “generatepress_child” instalated January 28, 2019 at 3:23 am #794189 DavidStaff Customer Support Alternative to Child Theme templates is to use the GP Hook Element: https://docs.generatepress.com/article/hooks-element-overview/ You can add the first GTM code to a WP_head hook and second code to the before_header hook. January 28, 2019 at 5:58 am #794336 noe_sp Many thanks David for this information, if I need to script for all pages I do it with the HOOKS? Thanks, January 28, 2019 at 6:02 am #794338 DavidStaff Customer Support Hooks are the easiest way to go, in the Hook Element > Display Rules you can select Entire Site. You can also Exclude the script for different posts / pages / templates and User Rules – such as User Role, so Admins don’t trigger events for example. January 30, 2019 at 2:48 am #796333 noe_sp Thank very much… David. the email platform does not detect the code. I created the element in 2 different ways: FIRST: Choose Element Type: as HEADER with “entire site” SECOND: Choose Element Type: as HOOK with “entire site” But don’t work you can help me for solve it…please. Many thanks in advance! January 30, 2019 at 4:34 am #796390 DavidStaff Customer Support They both need to be added to Hooks. So create a new hook for each of them, both will have the display rules for the entire site. First code – select Hook: wp_head Second code – select Hook: before_header January 31, 2019 at 7:49 am #797745 noe_sp Hi David…. It was solved…. Work very well!!! Was problem that email marketing platform. Many thinks Kind regards! January 31, 2019 at 8:48 am #797812 DavidStaff Customer Support Awesome – glad you got it resolved 🙂 Author Posts Viewing 9 posts - 1 through 9 (of 9 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In