Drupal Module for Performancing Metrics

Dave Reids PMetrics WordPress Plugin has been very well received but what about users of other blogging systems? Well Drupal is the particular favourite of the Performancing team so I have put together a module for Drupal.

I would love for you to try this module out, have a look at the code and give me some really good feedback.


  • Automatic Metrics script inclusion
  • Exclude hits from a specified user role
  • Show charts and/or text stats in a “block”
  • Choose the blog to show stats for
  • Select the chart you wish to display

Due to the change in the way forms work between Drupal 4.6 and 4.7 there are two versions of the code unfortunately. Just download the  appropriate zip for your version and extract and upload to your modules directory.

After enabling the module in your “modules” control panel you should see a new “block” plus “Metrics” under “settings”. You will need to enter your Performancing username and password in the settings, after submitting your user details the remaining settings will appear to allow you to select your blog and display choices.

24 thoughts on “Drupal Module for Performancing Metrics

  1. I like this module so much more than the plugin we currently have for WordPress. Is there any way someone could please hook a brother up? 🙂 I’d love to have this displayed in my sidebar.

  2. If you go into your metrics control panel at performancing how many visitors should it be showing? You might need to enable public stats in your metrics blog settings

  3. After installing the 4.7 version (and removing the earlier script changes from the tpl.php files) I just see a white square with a red cross where the ‘Visitors Today’ graph should be. Same result whether I select or clear the ‘show chart’ checkbox.

    The ‘VISITS TODAY:’ figure displays correctly.

  4. The ‘Show Chart’ setting confused me for a while as it says ‘Show the chart in your sidebar’, but even with it checked the chart did not display in the sidebar.

    Of course the block was not enabled, so it could not be displayed.

    Would ‘Show chart in the metrics block’ be a clearer explanation?

  5. It turns out that the error occurs if you have the script in your template AND you use the module, if you are going to use the module remove it from the script first. Looks like the browser doesnt like all the iterations the metrics script performs if you get it to do everything twice!

  6. I installed the module on my 4.6 driven site. No problems when viewing in Firefox, but IE pops up an error every time I click a link: stack overflow at line: 72.

    In the Drupal logs I see things like:

    in_array(): Wrong datatype for second argument in /www/wizard/docs/modules/4.6/metrics.module on line 27.:

    Yes, I did notice that the pop-up and the log message reffer to different lines (27 and 72), but both of them started appearing after installation of the module.


    I found the following in the Firefox JavaScript sonsole:

    Error: too much recursion
    Source File: http://metrics.performancing.com/basicstats.js
    Line: 71

    That’s this part of the script:

    if (link.oldonclick () == false) {
    return false;

    Any ideas? Need the URL?

  7. CarLBanks that means that your blog can not communicate with performancing.com for some reason but http urls are allowed. Do you have telnet access to your hosting to see if you can ping performancing.com from your server?

    kambiz which version are you using?

  8. The module works fine other than that. I would like it to work as I have a lot of returning visits to the site that I would like not be factored into my metrics.

  9. When I installed this I got an error on my site saying “Cannot read RSS data file.” I deleted the module and it fixed it! I’m using Drupal 4.7

  10. I have 1 additional role, called administrator over the two default ones (authenticated user, and anon). I do not see any option in the pull down menu, rather I just see “None”.

  11. Actually yeah, there should be anonymous and authenticated, it just reads the roles from the drupal db

  12. If he hasnt added any roles, shouldnt there be at least “authenticated user”?

  13. I just installed it and got it up and running however I do not see how I can “Exclude hits from a specified user role”. While I see the setting, under administration >> settings >> metrics, when I click on the menu there’s only ‘None’ selected with no option of me selecting the role I want to omit.

Comments are closed.