Installing Google Tag Manager now requires an additional step. I am familiar with the Insert Headers and Footers plugin by WP Beginner, and can use that for my Header script.
But, how do you suggest "past[ing] this code immediately after the opening <body> tag" which Tag Manager now requires?
I know I can go to Appearance/Editor to edit the Theme Header (header.php). But is that the best solution? If so, I'm assuming the edit will be lost after updating the theme. If I need to go this route, should I simply place the script here, on line 147?:
Just looking for an easy way to universally add the script to every page, post and product "immediately after the opening <body> tag."
How do you make a header.php? Just add a file called header.php in the child theme folder and add the code? Should there be something else in the file?
Greetings!
Installing Google Tag Manager now requires an additional step. I am familiar with the Insert Headers and Footers plugin by WP Beginner, and can use that for my Header script.
But, how do you suggest "past[ing] this code immediately after the opening <body> tag" which Tag Manager now requires?
I know I can go to Appearance/Editor to edit the Theme Header (header.php). But is that the best solution? If so, I'm assuming the edit will be lost after updating the theme. If I need to go this route, should I simply place the script here, on line 147?:
Just looking for an easy way to universally add the script to every page, post and product "immediately after the opening <body> tag."
Thanks!
Yes that should work. You can also add it to a Child Theme header.php .
Best
ThemeNectar Support Team
How do you make a header.php? Just add a file called header.php in the child theme folder and add the code? Should there be something else in the file?
@Aleksei, Simply copy paste the header.php from the Parent theme to the Child Theme and then edit it .
Best
ThemeNectar Support Team