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.

Minimum requirements

 * MediaWiki 1.14+
 * A Piwik (0.4+) installation with the site configured

Custom variables
Disable cookies by setting the   variable to  . For example:

'''To define custom javascript tags in the Piwik javascript code, its possible to define the $wgPiwikCustomJS variable. For example if you have a single setting to insert; use the following code: '''

If you have multiple variables to define; use an array. For example:

If you want to change the title of your pages inside the Piwik tracker, set  inside your  LocalSettings.php file

'''In case you want to include the title as, for example, "wiki/Title of the page", you can set  to   and set   to. The extension will print piwik_action_name = 'wiki/Title of the page';'''

Tracking with MobileFrontend
Due to a bug in Hooks/SkinAfterBottomScripts, Piwik Integration will not function when 'Mobile view' mode is used with the MobileFrontend Extension.

For those desiring to track across both views, comment or delete the Piwik Integration entries in  and add to the file:

Then paste the Piwik tracking code generated in the Piwik dashboard into http://www.example.com/wiki/MediaWiki:Common.js. Piwik will now track users in both Desktop view and Mobile view. Take care: This workaround currently breaks the VisualEditor Extension. (2015-10-01)