I’ve noticed that when I add a tracking script (google tag manager) to the header of the site, it disappears with every theme update.
This is quite problematic as we run traffic to this site and with the code disappearing with each update, tracking is obviously wonky sometimes…
Really need a fix to this and your help/advice is much appreciated.
I hope you are well today and thank you for your question.
Could you please tell me how you are adding it on your site?
Please note if you make changes in the theme file then you have to make these changes again after theme updation as changes made in the theme files get lost on theme updation.
You can try using following solutions to use it.
Thanks for your reply.
I added the code to the header file through the editor after selecting Jevelin (there’s 2 options -Jevelin child or Jevelin), so your explanation makes sense.
That said, it would be really great if you guys could add a section in the custom code area of the theme settings for the header. As it is now, all custom code in this section is added to the body and GTM specifically works much better when placed in the header.
Will check out the plugins you mentioned for now though.