User:Isb1009/newpiwik

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).

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 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:

  

Web analytics   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:

For further installation instructions, check the README