How to fix WordPress.com Stats plugin showing zero (0) visitors!

This article explains how to fix WordPres.com Stats plugin when it doesn’t show any statistics for your site or shows 0 visitors.

I recently installed WordPress.com Stats Plugin on one of my sites. WordPress.com Stats provides statistics on most popular metrics about the visitors to your site. Unfortunately, for some reason the plugin wasn’t working properly. It was showing zero (0) visitors for each day (which was wrong) and all the other stat blocks like “Top posts & Pages”, “Clicks” etc were empty. I tried many things like deactivating, deleting and then reactivating after uploading a new copy of the plugin to address this issue. I even used a different API key to see if that works. None of these methods worked. It was really surprising to me as the plugin works fine on two of my other sites. Anyway, after spending a lot of time trying to fix this issue I decided to read the Frequently Asked Questions (FAQ) section and found the answer to the problem. *hint* always read the FAQ section 🙂

Here is what you have to do to address this issue if you are having a similar problem.

Insert the following line in your “footer.php” file of your template at the very bottom right before the </body> tag.

<?php wp_footer(); ?>

Example of a “footer.php” file

<div id=”footer”>
<p><a href=”<?php bloginfo(‘url’); ?>”><?php bloginfo(‘name’); ?> – Example text</a></p>
</div>
<?php wp_footer(); ?>
</body>
</html>

The reason it was working on my other sites from the start was because the themes used by default had that function call in the “footer.php” file. Hope this helps solve your WordPress.com Stats Plugin issue.

Comments (7 responses)

  1. admin says:

    @Corentin, It is NOT necessary to know a programming language to open a blog. Simply pick a blogging platform that you like and use it.

  2. Corentin says:

    Hello

    It’s the first time I consider to make a blog and I would like to ask you some questions:

    Is it necessary to know a programming language before opening a (paying) blog.
    In the case I need to: which ones?

    Thanks for your help

    Corentin

  3. mommi84 says:

    GREAT JOB! Thank you so much!

  4. Angelo says:

    Thank you so much, I’ve been trying to solve this ever since I started my second blog for school. I just couldn’t find the problem.

    But it’s fixed now. Better late than never, but still thanks!

  5. ZcMander says:

    Thanks, I have tried google this earlier, and never realized that I had construct site in wrong way.

    Another Stats-plugin called “StatPress” works perfectly without wp_footer();

  6. Thanks you saved me a lot of time

  7. John says:

    Hi, i have same problem. but its not working
    help me

Speak Your Mind

*