Extension:Matomo

The Piwik Integration extension inserts your Piwik tracking code to the bottom of every page. It excludes the views of the users with 'bot' privileges (bots) and the 'protect' privileges (sysops). It also adds a Special Page to some of the statistics.

Requirements

 * A Piwik installation with your site configured

Installation instructions
$wgPiwikURL = "piwik-host.tld/dir/"; $wgPiwikIDSite = "piwik_idsite";
 * Extract the downloaded files into your extensions directory.
 * Add  to the bottom of LocalSettings.php.
 * Initial installation can now be verified through Special:Version of your wiki.
 * Then, you need to define where Piwik is installed and the idsite. To do it, just add after the require_once:

Change the value of $wgPiwikIDSite with your site ID. For example, in:

the $wgPiwikIDSite is 3

$wgPiwikCustomJS = "piwikTracker.trackGoal(1); // logs a conversion for goal 1 piwikTracker.setDownloadExtensions( \"jpg|png|gif\" ); // we now only track clicks on images";
 * You can also set $wgPiwikCustomJS if you want to add custom javascript tags (see http://piwik.org/docs/javascript-tracking/ for further information). For example:


 * If you want to change the title of your pages inside the Piwik tracker, you can set $wgPiwikActionName inside your LocalSettings.php file.
 * In case you want to include the title as, for example, "wiki/Title of the page", you can set $wgPiwikUsePageTitle to true and set $wgPiwikActionName to "wiki/".