Fix WordPress.com Stats and Google Analytics Plugins Not Working After Theme Change

'

Two days ago, I’ve dressed up this blog with a new theme. When everything seem to be fine, I’ve found that WordPress.com Stats and Google Analytics plugins were not working the way they did the moment before I’ve changed to a new theme.

These plugins stopped collecting data on my blog traffic straight after I’ve applied the new theme. I’m wondering did you faced this issue before or just me? I tried to deactivate and activate back the plugins but not working. So I went and searched for solution on Google and luckily, I am not the only person who faced the same issue. I came across a post that highlights the solution on how to fix the issue.

What has caused this issue is that a function has missing or left out from the theme which prevents WP Stats and Google Analytics from working. Apparently, the theme owner has forgotten to insert the function. To fix this issue, you need to edit the footer.php in your theme editor. From your WordPress’s admin panel, navigate to Design > Theme Editor > footer.php.

In the footer.php file, you need to look for the tag. Once found, insert this code above the tag.

Once done, update the file. WP Stats and Google Analytics should be working by now.

Steve Yu is a technology blogger with ten years blogging experience under his belt. He is the founder of MyTechQuest.com or just MTQ.
  • Siddharth

    thx for the share 🙂
    I faced the same problem some time b4 ,googled it and got the solution 😀

    Siddharths last blog post..Convert your PSD to XHTML and CSS Pages for FREE!

  • i’m not wordpress user , but can’t actually know how this will affect wordpress Stats or google

    ameos last blog post..Social Networks Stress

  • Siddharth > Lol, thanks god this problem has fixed.

    ameo > what’s blogging platform are you using then?

  • Good eye – can’t believe I missed that. Thanks for your post!

  • Chris

    Thanks! After we used the WordPress Theme Generator, we noticed that GA stopped for us.

  • Me

    Oh wow! After searching forever looking for a solution I’ve finally found it! Thanks!