Google Tag Manager code disappeared from my website
Hi there,
A couple of days ago I noticed that Google Analytics no longer registrered any new users on my website. I discovered that the Google Tag Manager code, which worked fine up until that point, complete disappeared from the site. I had not touched any code at all.
Do you guys perhaps have any clue as to why this happened?
Kind regards
Comments
Hi,
Betheme does not delete anything by itself, so it could be some plugin you are using.
Can you tell me how did you implement the Google Tag Manager on your website, please?
Thanks
I simply pasted it in the raw code of the website in the header.php. It worked fine for about 2 months.
Since it disappeared, I now used Betheme Options --> SEO to paste the code.
Did you use the child theme for the header.php modification?
When you want to modify the theme files, you should use a child theme, so the modifications will not be overwritten by the update.
https://support.muffingroup.com/documentation/installation-updates/#child-theme
Best regards
I did not, so I guess that was the problem!
Just to make sure, if I only add code to the Theme Options (so under Theme Options --> SEO), this is fine and will not disappear when updates happen right?
Thanks!
That is right, the setting from the Theme Options will not disappear even after the update.
Thanks