WordPress.org

Ready to get started?Download WordPress

Forums

WordPress.com stats tracking hits against wrong posts (4 posts)

  1. swombat
    Member
    Posted 6 years ago #

    Hello,

    I have the wordpress.com stats plugin installed on my site, at http://www.inter-sections.net. Until a few days ago, it worked very well. Then, I moved the site from DreamHost to my own private server. At that point, something went wrong with the stats tracking in that it split the stats into two sub-sites, one of them being the internal hostname of the new server. However, thanks to rmccue's help on the irc channel, that's now resolved by adding a rewrite rule in the .htaccess to force everything into "www.inter-sections.net".

    Another problem that happened, which is not resolved, is that the stats are now logged mostly against a single article (http://www.inter-sections.net/2007/09/18/iterm-for-the-lazy/). I know for a fact that that article is not getting all those hits, because most of the referrers are pointing to another one of my articles (http://www.inter-sections.net/2007/11/13/how-to-recognise-a-good-programmer/). Other articles are not getting any hits at all - a handful have 1 hit.

    I'm not sure why WordPress.com stats is doing that, I haven't been able to come up with a possible explanation. Any help and/or suggestions would be welcome, as I'd like to get WordPress.com stats working again since I quite like it. I've tried asking this on the channel, but no one had any suggestions (rmccue suggested that I wait for photo_matt to get online!).

    Thanks,

    Daniel

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Your "Other Musings" section has a list of your posts in it. This is using a Loop to do its job. Because this Loop interferes with the main posts query, the stats plugin thinks that all your posts are the last one listed in that loop (post #6, "Introduction").

    Also, you're using WordPress 2.1.2, a very old version.

    My recommendation:
    1. Upgrade to WordPress 2.3.2, it has some fixes for this sort of problem.
    2. Upgrade the stats plugin to the latest version (1.1.1). Same thing, it has some fixes for this sort of problem.
    3. If you have code in your sidebar.php using a query_posts() type of Loop, then either:
    a) Switch to Widgets and use the Recent Posts Widget instead, or
    b) Rewrite the sidebar code to use a new WP_Query() type of Loop instead of a query_posts() type of Loop. This type of Loop won't interfere with the stats plugin.

  3. swombat
    Member
    Posted 6 years ago #

    Otto - thank you very much for the reply. I'll have a look into it!

  4. swombat
    Member
    Posted 6 years ago #

    Thank you so much! Upgrading WordPress fixed the stats tracking. I'll upgrade the plugins and mess with the sidebar later, but just wanted to report that the WP version fixed it.

Topic Closed

This topic has been closed to new replies.

About this Topic