I’ve had WP-Stats (WordPress.com stats) since i started this blog. When i moved it to the new domain and changed the theme my stats stoped counting. The line was flat! So, at the beggining i thought that the users haven’t learnt about the change yet. I kept it like that for almost 24 hours till i got my first comment! So, i had a comment and the line was still flat. Something was fishy. I started fiddling around with the settings of the plugin along with my homepage on WordPress. But, still nothing. The line was always flat. I decided to go around and find another plugin. I still had analytics but WP-Stats really had many more info i needed. I did this for over two months testing out many statistic plugins. But, they either lucked the info i needed or they took too much space on my hosting. A few days back i decided to go back to WP-Stats and figure out what was the problem. The line kept staying flat. I checked the WordPress fora and here it is! The solution is easy, actually that easy that you will feel stupid 😛 Check your footer.php file and make sure that wp_footer() function is called within the script. If you want to make sure that it counts correctly, after changing your footer file, besides the obvious “check your stats”, you can see your homepage source code and try to find this snippet:

<script src="http://stats.wordpress.com/e-200839.js" type="text/javascript"></script>
<script type="text/javascript">
var load_cmc = function(){linktracker_init(BLOG_ID,0,2);};
if ( typeof addLoadEvent != 'undefined' ) addLoadEvent(load_cmc);
else load_cmc();

If you have this code you are fine. Hey, do not forget, check for the code when you are logged out since WordPress does not count visits when you are logged in! From now on, keep this in mind, when you change your theme check your footer.php file 😉