CommunityCategory: WordPress Discussion & TroubleshootGoogle analytics tracking code not showing
62f9b272b3772c279da3cb2c5e9a8a4c?s=48&d=mm&r=gMohammad Athar Staff asked 1 month 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

?s=48&d=mm&r=gSajid answered 1 month 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.

?s=48&d=mm&r=gFajal Shah answered 1 month 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.

?s=48&d=mm&r=gPoonam Sharma answered 1 month 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.

Your Answer

11
+
16
=