Your Moodle version

General plugins (Local): Analytics

Maintained by Picture of Bas Brands Bas Brands
A local Moodle Module adding Analytics. This plugin currently supports 3 Analytics modes, Piwik, Google Universal Analytics and Google Legacy Analytics.
Moodle 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7


A local Moodle Module adding Site Analytics

The plugin features the following options:
- exclude tracking of admin users
- build full navigation tree for Piwik course category and activity tracking
- image based tracking in case javascript is disabled (for Piwik)
- advanced analytics for Google analytics (based on Bas Brands and Gavin Henricks work in 2013)

The plugin currently supports 3 Analytics modes, Piwik, Google Universal Analytics and Google Legacy Analytics.

For installation instruction on Piwik, please visit


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3


Picture of Bas Brands
Bas Brands (Lead maintainer)
David Bezemer: Original author
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Bas Brands
    Thu, Sep 10, 2015, 8:15 PM
    Hi Josick,

    This plugin does not install piwik for you. If you want to use Piwik you should install it just like any other web based PHP application like Moodle / Joomla or Wordpress. So it is a separate system.
    This plugin only creates clean URL's that can be pushed to Google Analytics or Piwik that are more human readable. It fakes GA / Piwik into believing the user access a URL like this


    instead of


    So you did nothing wrong, you just need to install Piwik
  • Picture of Josick Guermeur
    Thu, Sep 10, 2015, 8:33 PM
    Thanks, it wasn't quite clear.
    I'll get to this smile
  • Picture of Josick Guermeur
    Thu, Sep 10, 2015, 10:16 PM
    Hello I've installed piwik through softaculous actually, pretty easy, I copied the code in moddle html and I'm getting statistics.
    But those statistics refer to page like this:
    Nothing so "human" as you said so I do not quite understand what's the use of the plugin or if it works at all.
    Also I'd like to know if it is possible to distinguish users who log in clasicaly from visitors who log in anonimously

  • Picture of Josick Guermeur
    Fri, Sep 11, 2015, 4:58 AM
    Some sort of answers to my previous post?
  • Picture of Samuel Than
    Fri, Sep 11, 2015, 6:58 AM
    I've did my own additional coding to make the plugin more useful.
    By adding something like this in the function i was able to track users by their firstname and lastname

    if(isset($USER->username)) {
    $username = $USER->username;
    $firstname = $USER->firstname;
    $lastname = $USER->lastname;
    $userid= $username."-".$firstname.".".$lastname;
    else {
    $username = "User not logged in";
  • Picture of Josick Guermeur
    Fri, Sep 11, 2015, 3:50 PM
    Hi Samuel
    Just tried it I did put it before the closure is that right? Also found out that my site id was 1 on the plugin as Piwik had affected 2 to the site I monitored as I don't seem to be able to change it in Piwik, I did the change in the plugin. Guess it's gonna make a difference smile
  • Picture of Josick Guermeur
    Fri, Sep 11, 2015, 4:45 PM
    Hi Samuel
    Doesn't work for me and my pages are still recorded in Piwik in moodle style:
    I wonder if this plugin works at all and why it wouldn't and no developper seems to be keen to answer.
    Of course I know it's a free service but silence is rude, anyway, ain't it?
  • Picture of Bas Brands
    Fri, Sep 11, 2015, 5:23 PM
    Hi Josick,

    Maybe you have not enabled the clean url setting. And please don't say it's rude if I do not answer you fast enough.
  • Picture of Josick Guermeur
    Fri, Sep 11, 2015, 6:30 PM
    Ok sorry but at least, it got me an answer smile.
    And the clean url setting is enabled so how do I check if that plugin works or not?
  • Picture of Bas Brands
    Fri, Sep 11, 2015, 9:54 PM
    Have you tried turning it off and on again?
  • Picture of Josick Guermeur
    Sat, Sep 12, 2015, 12:26 AM
    I just did I'll leave like that for a while see what the visits look like on Piwik, then turn it on again.
    I'll let you know
  • Picture of Josick Guermeur
    Sun, Sep 13, 2015, 11:43 PM
    I did let Piwik on for a few hours without the plugin and for a few hours with it. I do not see the slightest difference.
    Pages are annouced similarly:
    In the visitor's log they look in both case laike this:
    Cours : Induction Standard
    In the pages tree: moodle like
    in the page title: plain text, I insist, with or without the plugin on.
    I would very much like to know what is supposed to be different with the plugin on and what is its use?

  • Picture of Josick Guermeur
    Mon, Sep 14, 2015, 3:46 PM
    So can Bas or anyone tell me what should be the difference in Piwik with and without this plugin?
  • Picture of phuong hoang
    Sun, Oct 11, 2015, 6:27 PM
    Hi Bas & David,
    Does it work on moodle 2.8 or newer version? I let visitors self register and open my site to everyone that's why I need that plugin.
    Love it,
  • Picture of Bas Brands
    Mon, Oct 12, 2015, 10:41 PM
    Hi there.

    Yes I do think it works okay for 2.8 and 2.9. But I'll plan some time to create new versions for these releases soon.
1 2 3 4 5
Please login to post comments