Skip to:
Content
Pages
Categories
Search
Top
Bottom

Site wide stats?

  • @paulhastings0

    Participant

    Does anyone know of a plugin that will collect site side stats for an MU install?

    Right now I’m using statcounter but that only collects stats for the main website and not for each of my user’s individual blogs.

    -Paul

Viewing 6 replies - 1 through 6 (of 6 total)
  • @boonebgorges

    Keymaster
    function here_are_my_stats() {
    ?>
    // Put your statcounter/google analytics/whatever javascript code here
    <?php
    }
    add_action( 'wp_footer', 'here_are_my_stats', 999 );

    Put it in a PHP file and drop into mu-plugins.

    If you use Google Analytics, you can filter by subdomains: http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55524

    @el_terko

    Participant

    Hi Boone, is your solution the same to add the Google code to the footer ? It’s been such a long time since I last dug into WP that maybe everything has changed…

    @boonebgorges

    Keymaster

    Yup, that code will add an arbitrary piece of code into the footer, just before the </body> tag.

    @el_terko

    Participant

    Gr8, glad Alzheimer hasn’t struck me (yet)

    @paulhastings0

    Participant

    @BooneGorges: And that should work on all the themes on our site as long as they call wp_footer.php ?

    @boonebgorges

    Keymaster

    It’ll work on any theme that has the line

    <?php do_action( 'wp_footer' ) ?>

    Any decently written theme will have this line. I have come across very few that don’t.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Site wide stats?’ is closed to new replies.
Skip to toolbar