Extension:Matomo

This 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.11+


 * A Piwik installation with your 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, Piwiki.18n.php, Piwik_specialpage.php and piwik-mw.php to the "piwik" folder you've just created


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

require_once($IP.'/extensions/piwik/Piwik.php');

$wgPiwikURL = "http://piwik/url/"; $wgPiwikIDSite = "piwik_idsite";
 * Then, you need to define where Piwik is installed and the idsite. To do it, just add after the require_once:

Note: Change the value of $wgPiwikURL with the URL where you installed Piwik. Remember to add the trailing slash!

Change the value of $wgPiwikIDSite with the number inside piwik_idsite in your Piwik code. For example, in:

<a href="http://piwik.org" title="Web analytics" onclick="window.open(this.href);return(false);"> <script language="javascript" src="http://piwik/url/piwik.js" type="text/javascript"> <script type="text/javascript">

Web analytics <img src="http://stats.astronomipedia.es/piwik.php" style="border:0" alt="piwik"/> </a> the $wgPiwikIDSite is 1

$wgPiwikCustomJS = 'piwik_hosts_alias = ["hostname1.com", "hostname2.com"]; // the current tracked website is added to this array anyway piwik_install_tracker = 0;'
 * You can also set $wgPiwikCustomJS if you want to add custom javascript tags (see http://piwik.org/javascript-tag-documentation/ for further information). For example:


 * If you want to change piwik_action_name</tt>, you can set $wgPiwikActionName</tt> inside your LocalSettings.php file.

For further installation instructions, check the README