2017 © Pedro Peláez
 

mediawiki-extension piwik-integration

The Matomo (ex-Piwik) extension inserts your Matomo tracking code to the bottom of every page.

image

mediawiki/piwik-integration

The Matomo (ex-Piwik) extension inserts your Matomo tracking code to the bottom of every page.

  • Wednesday, February 7, 2018
  • by DaSchTour
  • Repository
  • 2 Watchers
  • 15 Stars
  • 6,694 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 13 Forks
  • 3 Open issues
  • 9 Versions
  • 15 % Grown

The README.md

Mamoto extension for MediaWiki

Version 5.0.0 - Last update: 27 October 2023, (*1)

This the Mamoto (ex-Piwik) integration extension for MediaWiki software. The extension is only useful if you've got a MediaWiki installation; it can only be installed by the administrator of the site., (*2)

Minimum requirements

  1. MediaWiki 1.34+, (*3)

  2. A Matomo (0.4+) installation with the site configured, (*4)

Installation instructions

Please, read them carefully. They're not very difficult to understand, but ALL steps are necessary:, (*5)

  1. Create a folder called "Matomo" in your extensions directory, (*6)

  2. Upload extension.json and Matomo.hooks.php in the "Matomo" folder you've just created, (*7)

  3. Edit your LocalSettings.php and, at the end of the file, add the following:, (*8)

    wfLoadExtension( 'Matomo' );
  4. Configure the Matomo URL and site-id. To do so; edit the LocalSettings and set up the following variables:, (*9)

    $wgMatomoURL = "matomo-host.tld/dir/";, (*10)

    $wgMatomoIDSite = "matomo_idsite";, (*11)

    IMPORTANT Do not define the protocol of the $wgMatomoURL, (*12)

    Note: Change the value of $wgMatomoURL with the URL, without the protocol but including the domain name, where you installed Matomo. Remember to add the trailing slash!, (*13)

  5. Enjoy our extension!, (*14)

    Note: to check if the extension has succesfully installed; go to your wiki and check if the Matomo extension is present on the bottom of the Wiki source code., (*15)

Custom variables

  • Disable cookies by setting the $wgMatomoDisableCookies variable to false., (*16)

    For example: $wgMatomoDisableCookies = false;, (*17)

  • Ignore regular editors: set $wgMatomoIgnoreEditors to true, (*18)

  • Do not ignore Bots: set $wgMatomoIgnoreBots to false (by default bots are ignored)
  • Do not ignore sysop users: set $wgMatomoIgnoreSysops to false (by default sysops are ignored), (*19)

  • To define custom javascript tags in the Matomo javascript code, its possible to define the $wgMatomoCustomJS variable. For example if you have a single setting to insert; use the following code:, (*20)

    $wgMatomoCustomJS = "_paq.push(['trackGoal', '1']);", (*21)

    If you have multiple variables to define; use an array. For example:, (*22)

    $wgMatomoCustomJS = array( "_paq.push(['setCustomVariable', '1','environment','production']);", "_paq.push(['setCustomVariable', '1','is_user','yes']);" );, (*23)

  • If you want to change the title of your pages inside the Matomo tracker, you can set $wgMatomoActionName inside your LocalSettings.php file., (*24)

  • In case you want to include the title as, for example, "wiki/Title of the page", you can set $wgMatomoUsePageTitle to true and set $wgMatomoActionName to wiki/. The extension will print matomo_action_name = 'wiki/Title of the page';, (*25)

  • If you want to track the username of the visitor with the Matomo feature User ID (needs Matomo >= 2.7.0) set the $wgMatomoTrackUsernames to true in LocalSettings.php., (*26)

Troubleshooting

On MediaWiki 1.39.0–1.39.4 and 1.40.0, the tracking code is included twice: this can be fixed by upgrading MediaWiki to 1.39.5 and 1.40.1 (see this Phabricator task., (*27)

The Versions

07/02 2018

dev-dev-rename-4.0

dev-dev-rename-4.0 https://www.mediawiki.org/wiki/Extension:Matomo

The Matomo (ex-Piwik) extension inserts your Matomo tracking code to the bottom of every page.

  Sources   Download

GPL-2.0-or-later

The Requires

 

by Isb1009

mediawiki piwik matomo

07/02 2018

dev-master

9999999-dev https://www.mediawiki.org/wiki/Extension:Piwik_Integration

The Piwik Integration extension inserts your Piwik tracking code to the bottom of every page.

  Sources   Download

GPL-2.0+ GPL-2.0-or-later

The Requires

 

by Isb1009

mediawiki piwik

07/02 2018

v3.1.0

3.1.0.0 https://www.mediawiki.org/wiki/Extension:Piwik_Integration

The Piwik Integration extension inserts your Piwik tracking code to the bottom of every page.

  Sources   Download

GPL-2.0+

The Requires

 

by Isb1009

mediawiki piwik

30/11 2017

v2.4.4

2.4.4.0 https://www.mediawiki.org/wiki/Extension:Piwik_Integration

The Piwik Integration extension inserts your Piwik tracking code to the bottom of every page.

  Sources   Download

GPL-2.0+

The Requires

 

by Isb1009

mediawiki piwik

30/11 2017

v3.0.0

3.0.0.0 https://www.mediawiki.org/wiki/Extension:Piwik_Integration

The Piwik Integration extension inserts your Piwik tracking code to the bottom of every page.

  Sources   Download

GPL-2.0+

The Requires

 

by Isb1009

mediawiki piwik

15/11 2017

v2.4.3

2.4.3.0 https://www.mediawiki.org/wiki/Extension:Piwik_Integration

The Piwik Integration extension inserts your Piwik tracking code to the bottom of every page.

  Sources   Download

GPL-2.0+

The Requires

 

by Isb1009

mediawiki piwik

07/11 2014

v2.4.2

2.4.2.0 https://www.mediawiki.org/wiki/Extension:Piwik_Integration

The Piwik Integration extension inserts your Piwik tracking code to the bottom of every page.

  Sources   Download

GPL-2.0+

The Requires

 

by Isb1009

mediawiki piwik

07/05 2014

v2.4.1

2.4.1.0 https://www.mediawiki.org/wiki/Extension:Piwik_Integration

The Piwik Integration extension inserts your Piwik tracking code to the bottom of every page.

  Sources   Download

GPL-2.0+

The Requires

 

mediawiki piwik

23/01 2014

v2.4.0

2.4.0.0 https://www.mediawiki.org/wiki/Extension:Piwik_Integration

The Piwik Integration extension inserts your Piwik tracking code to the bottom of every page.

  Sources   Download

GPL-2.0+

The Requires

 

mediawiki piwik