WordPress Stats plugin not updating – fix
There are a lot of good things to like about the newer versions of wordpress. It seems to keep getting better. One of the really cool plugins is the WordPress.com stats plugin. This lets you have a nice simple stats interface accessible from your Dashboard on your wordpress blog. (It uses wordpress.com to track stats, so you’ll need a wordpress.com account to be able to use it. I set up a wordpress.com account some time back to be able to use the akismet plugin and the same key that you have for akismet can be used for the stats plugin.) You essentially upload the stats.php file into your wp-content/plugins folder, enable it in the plugins list, then enter your API key in the configuration page for stats. That’s all that should be to it, but I’ve noticed sometimes that’s not all it takes to get things going.
One recent site upgrade I added the stats plugin to and waited, visited with a browser I wasn’t logged in on (as long as your logged into your account you’ll not add up your stats numbers.) Nothing. Other stat trackers I had showed that there had been traffic so I started investigating.
It turns out that your theme needs to have <?php wp_footer(); ?> at the very end of the footer before the </body> tag.
That was enough to make things start working again. (Actually, I had to flush out the cached pages held by wp-super-cache first.)
Among the things I like about the wordpress stats plugin is that there’s a dropdown list of ALL the sites with wordpress stats installed so I can quickly compare stats across all sites. It doesn’t offer the kind of detail that google analytics does, but it does a good job of showing the basic trend over time, and let’s face it if I checked google analytics enough to read all of it’s information I would not have any time to actually DO anything else.
By the way, the stats plugin like this get’s along just fine with cache plugins because the stats are called from a javascript code at the bottom of the page (which is cached just the same as the other content on the page.)