Ready to get started?Download WordPress


False site statistics caused by prefetch (1 post)

  1. Rod Whiteley
    Posted 10 months ago #

    I've just discovered that the Firefox browser (and maybe others) has a prefetch feature that loads extra pages the user may never see. This can make your site statistics wrong, as they'll show visits to pages that were never really visited.

    Firefox 23.0.1 (current at the time of writing) also reloads pages it has already prefetched, bumping up site statistics for some pages that really were visited.

    This behaviour is triggered by tags that WordPress adds by default. They look like: <link rel='next' ... Although it's not the only way to fix the problem, statistics plugins can remove these tags by calling:

    remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);

    If you find the tags in your site and you're interested in accurate statistics, you might want to modify your statistics plugin to remove them. I don't know any way to fix statistics based on server logs.

    I notice that the tags don't appear on WordPress.com blogs, or on the WordPress News blog here (running a WordPress 3.7 alpha version).


You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 10 months ago by Rod Whiteley
  • This topic is not a support question
  • WordPress version: 3.6