Release status: beta
|Description||Inserts Piwik script into MediaWiki pages for tracking and adds a Special Page. Based on Google Analytics Integration by Tim Laqua.|
|Author(s)||Isb1009, DaSch, Youri van den Bogert|
|Last version||2.2.0 (2013-05-07)|
|License||GNU General Public Licence 2.0|
|Check usage and version matrix|
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.
Minimum requirements 
- MediaWiki 1.14+
- A Piwik (0.4+) installation with the site configured
Installation instructions 
Please, read them carefully. They're not very difficult to understand, but **ALL** steps are necessary:
- Create a folder called "piwik" in your extensions directory
- Upload Piwik.php, Piwik.hooks.php, to the "piwik" folder you've just created
- Edit your LocalSettings.php and, at the end of the file, add the following:
- Configure the Piwik URL and site-id. To do so; edit the LocalSettings and set up the following variables:
$wgPiwikURL = "piwik-host.tld/dir/"; $wgPiwikIDSite = "piwik_idsite";
IMPORTANT: Do not define the protocol of the $wgPiwikURL
- Enjoy the extension!
Note: to check if the extension has succesfully installed; go to your wiki and check if the Piwik Extension is present on the bottom of the Wiki source code.
Custom variables 
Disable cookies by setting the
$wgPiwikDisableCookies variable to
For example: $wgPiwikDisableCookies = false;
$wgPiwikCustomJS = "_paq.push(['trackGoal', '1']);"
If you have multiple variables to define; use an array. For example:
$wgPiwikCustomJS = array( "_paq.push(['setCustomVariable', '1','environment','production']);", "_paq.push(['setCustomVariable', '1','is_user','yes']);" );
If you want to change the title of your pages inside the Piwik tracker, 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
true and set
wiki/. The extension will print piwik_action_name = 'wiki/Title of the page';