WordPress.org

Ready to get started?Download WordPress

Forums

wp-stats Not Adding Javascript (4 posts)

  1. spamguy
    Member
    Posted 6 years ago #

    There have been numerous topics about why their wp-stats plugin is registering 0 hits regardless of the actual visitor count. The readme says to make sure <?php wp_footer() ?>' is present at the bottom of the theme -- it is, and so is<?php get_footer() ?>`.

    I understand that a properly wired-up stats gatherer has some Javascript at the bottom. By viewing the blog's source, I see it's not present, even with both the footers above added. I've disabled, trashed, and reinstalled the wp-stats plug-in a zillion times in an effort to get the Javascript inserted into one of the pages. I don't know where the file referenced by wp_footer() lies, so I can't check the file's write permissions. (Wouldn't wp-stats spit out an error if it failed to write, though?)

  2. DJ Doena
    Member
    Posted 6 years ago #

    I have exactly the same problem.

    I installed it yesterday and when I looked in the source I actually saw the inserted javascript.

    When I looked again this morning, it was gone and I haven't changed nothing at all.

  3. Eileron
    Member
    Posted 6 years ago #

    Do either of you use WP-Cache?

    I'm using WP-Cache, WP-Stats and WP 2.5 RC1. I threw in both Google Analytics and WP-Stats for good measure, went to the site, and nothing had happened. I made sure the stats plugin was uploaded DIRECTLY (put the PHP file in the plugin directory, not in a stats folder) as I'd had problems with something similar before. Turned off and cleared out WP-Cache, turned everything on, and voila, it works.

    At least, thus far it only works in Firefox, where I'm not logged in as an administrator. To test that out, I logged out, reloaded, and voila, everything's working.

    So my suggestions:
    - Make sure the link to wp_footer() is there (you don't need the other one).
    - Make sure the plugin is directly in the plugins directory, not in another folder
    - Turn everything on, reset WP-Cache
    - Log out of the administrator area.

    That should work. It did for me, anyway.

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

    Note that the stats plugin does nothing if you're logged in! Make sure you log out or view the site through another browser to see the code in the source.

Topic Closed

This topic has been closed to new replies.

About this Topic