Google analytics tracking code not showing

ForumCategory: WordPress Discussion & TroubleshootGoogle analytics tracking code not showing
Mohammad Athar Staff asked 1 year ago
I install google analytics on my website and after some time it just disappears away from my header.php file. What could possibly be the reason? I was literally sad today for having zero visitors then I realized GA is not even working
3 Answers
Best Answer
Sajid answered 1 year ago
Just use a plugin like MonsterInsights. It's super easy and straightforward, doesn't bloat your WordPress with codes, and doesn't affect scripts. I don't understand why people always make the more difficult and complicated options without having proper dev knowledge. That's what plugins are for.
Fajal Shah answered 1 year ago
If you placed a script inside the theme and you updated it, your scripts will go away.
I would recommend using a script management plug in for your WP site for this so your scripts stay intact.
Poonam Sharma answered 1 year ago
If you placed a script inside the theme and you updated it, your scripts will go away. I would recommend using a script management plug in for your WP site for this so your scripts stay intact.