Select Moodle version:

General plugins (Local): Google Analytics

Adds the Google Analytics Snippet to moodle pages and translates developer urls into human readable urls. Original: course/view.php?id=2 Translated: /Category+Demos/Moodle+Features+Demo.
Maintained by: Picture of Bas Brands Bas Brands
for Moodle
2.0, 2.1, 2.2, 2.3, 2.4, 2.5
This plugin contains 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:




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

Comments RSS

Show comments
  • Capt. Moodle
    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.
  • Picture of Bas Brands
    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!

  • Picture of Bas Brands
    Tue, Sep 3, 2013, 8:19 PM
    Oh and added the source control, tracker and documentation URL's
  • Capt. Moodle
    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.
  • Capt. Moodle
    Thu, Sep 5, 2013, 1:49 AM
    Thanks Bas for helping to tidy things up. This plugin has been approved. Peace - Anthony
  • Picture of Elizabeth Dalton
    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.
Please login to post comments