Generic Statistics WordPress plugin

The Generic Stats WordPress Plugin is a plugin that allows you to add any statistics tracking code to your WordPress blog without having to edit your WordPress Template’s code.

It also allows you to specify whether you’d like the code to be place at the top of your page (before the <body> tag) or at the bottom of the page (just after or just before the closing </body> tag).

This option is due to the fact that some statistics packages, like Google Analytics, prefer that you place the statistics tracking scripts at the top of the page, whereas it is actually recommended that you place all external scripts (external to your site) at the bottom.

The reason it’s better to place the code at the bottom is just in case the external site is down, it won’t prevent your site from loading.

Click on the image at the below to see what the plugin looks like on the admin side:

Generic Stats WordPress plugin Admin Page

Click here to download the plugin

To be kept aware of updates, please subscribe to the comments feed on this page.

12 Responses to “Generic Statistics WordPress plugin”

  1. Lee W.  on March 17th, 2009

    Hi James,

    I have a question about your Generic Stats WordPress Plugin.

    My blog has a number of contributors. At contributor level they cannot get to a needed function, but when I bump them up to editor rights they can see and edit the Generic Stats plugin.

    Is there a place in the code to change the role level for access to the plugin?

    Thanks for any help!

    Lee W.

  2. James  on March 20th, 2009

    Hi Lee

    In the file genstats.php, search for the following (should be on lines 23 and 28):

    current_user_can(‘manage_options’)

    Change that to:

    current_user_can(‘edit_posts’)

    This should give you what you need…

  3. Lee W.  on March 20th, 2009

    Thanks James… great plugin!!!!

  4. James  on November 2nd, 2009

    Well, just in case anybody’s using this, I’ve just updated the plugin.

    Please let me know if there are any issues.

    Thanks

  5. totalsuper  on November 5th, 2009

    It’s not working with HeatMap Adsense Theme (http://heatmaptheme.com) by Stuart Wider (http://stuartwider.com). I have header and footer stats saved and it’s not inserting them in the rendered page, although it works fine with several other WP 2.8.5 installations I administer using different themes.

  6. James  on November 8th, 2009

    Hi totalsuper: check out the theme and see if there’s a “get_header()” in the header file, and a “get_footer()” in the footer php file.

  7. totalsuper  on November 9th, 2009

    No, they are both in the index.php, page.php, archive.php, single.php, etc., files instead.

  8. James  on November 9th, 2009

    Do you have to pay for the theme? Could you email it to me? james @ (this website).co.za

    I can then test/debug it on my side. It might be a conflict of some sorts.

  9. HeatMap User  on November 20th, 2009

    You dont even need to use this plugin with HeatMap Theme. Support for google analytics and others is already built into the theme!


Leave a Reply