Google Analytics

General plugins (Local) ::: local_googleanalytics
Maintained by Bas Brands
This plugin is replaced by the local_analytics plugin which can communicate with Google Analytics and Piwik!
Latest release:
93 sites
17 fans
Current versions available: 1

This plugin is outdate. Please use the local_analytics plugin instead.

Potential privacy issues

Due to its ubiquity, Google Analytics raises some privacy concerns. Whenever someone visits a website that uses Google Analytics, if Javascript is enabled in the browser then Google tracks that visit via the user's IP address in order to determine the user's approximate geographic location. Read more on:


Screenshot #0


Bas Brands (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Anthony Borrow
    Mon, Sep 2, 2013, 12:27 PM
    Bas - Many thanks for sharing your plugin with the Moodle community. I've installed the plugin but not actually tested it on a site that i have Google Analytics running on. The code looks reasonably straight forward. Please provide the source control, tracker and documentation URLs so that users know where to report issues and collaborate with you on maintaining the code. Peace - Anthony
  • MD shot of me from his iphone4
    Mon, Sep 2, 2013, 1:04 PM
    We used this on and David Mudrak had made a couple of modifications to it.
  • Tue, Sep 3, 2013, 8:19 PM
    Thanks for reviewing this. The version used on is somewhat different from this version. This version is not depending on the theme. The theme version uses logic from the breadcrumb, this version's lib.php is loaded before the breadcrumb is constructed and gets it's info from the context_info_array.

    It would be very interesting to have a look at David Mudrak's modifications!

  • Tue, Sep 3, 2013, 8:19 PM
    Oh and added the source control, tracker and documentation URL's
  • Anthony Borrow
    Wed, Sep 4, 2013, 10:29 AM
    Bas - Thanks for sharing the documentation and tracker URLs. I didn't see the source control one but that is obvious given the tracker URL. One suggestion would be if you could rename the repository to moodle-local_googleanalytics I think we would be good to go. Peace - Anthony
  • MD shot of me from his iphone4
    Wed, Sep 4, 2013, 11:34 AM
    David described his changes in MDLSITE-2397 - he might've been looking at making the changes so it could into core.
  • Anthony Borrow
    Thu, Sep 5, 2013, 1:49 AM
    Thanks Bas for helping to tidy things up. This plugin has been approved. Peace - Anthony
  • Sat, Jan 11, 2014, 4:45 AM
    We actually installed this primarily for the human-readable URLs. Do we need to have a GA key to get the URL change? I've enabled the plugin, but as far as I can tell, it hasn't changed anything.
  • Thu, May 15, 2014, 9:58 PM
    Clarification: we thought that the human-readable URLs would be usable as aliases on the Moodle site, but this doesn't seem to be the case. How difficult would it be to add this kind of feature?

    Separately, it would be very helpful to be able to define user profile parameters as custom variables for site analytics purposes. For example, we have faculty identified in their user profiles, and if this was reflected in the analytics, we could distinguish faculty interactions from students. We would also identify administrative staff this way. We are also looking at identifying students by program, so if we could use this as a variable in Google analytics, we could see which of our programs are generating the most site interactions, where the students are by program, etc.

    Finally, with the URL conversions, all pages at the site level outside of courses are treated the same in the analytics, as subsets of root. We'd like to be able to see if certain features like the "My Courses" page are being used. Does anyone have a suggestion for how to pull out views of this particular page?
  • Mon, Jun 2, 2014, 4:12 PM
    Hi Elizabeth,

    This plugin provides some basic analytics data. It can easily be extended by a developer showing detailed information.

    At the moment I do not have any spare time to work on this plugin. But there are Moodle Partners and plugin developers that could help you tailor it to your needs.

  • Thu, Mar 19, 2020, 6:45 PM
    Hi Bas

    I can see the version on Github, is updated, and newer than the version that can be downloaded here.
    Are you going to commit the updated code to as a version for newer Moodle?
  • Thu, Mar 19, 2020, 8:54 PM
    Hi there,

    Please use the local_analytics plugin instead. This one is outdated.
Please login to post comments