Piwik

From YobiWiki
Revision as of 17:21, 21 April 2008 by <bdi>PhilippeTeuwen</bdi> (talk | contribs) (New page: ==Installation== cf http://piwik.org/ apt-get install php5-gd /etc/init.d/apache2 restart wget http://piwik.org/last.zip Unzip it under e.g. <your website>/piwik <br>And prepare a Mysq ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Installation

cf http://piwik.org/

apt-get install php5-gd
/etc/init.d/apache2 restart
wget http://piwik.org/last.zip

Unzip it under e.g. <your website>/piwik
And prepare a Mysq database:

mysql> create database piwik;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL ON piwik.* TO piwik@localhost IDENTIFIED BY 'piwikpassword';
Query OK, 0 rows affected (0.00 sec)

Now you can visit http://<your website>/piwik and follow instructions to add the first site.
For more than one site, log in and check admin/sites

Injection

of the javascript code into

Mediawiki

Edit the wiki page called MediaWiki:Common.js and copy/paste the Piwik Javascript code.

Gallery2

cf http://codex.gallery2.org/Gallery2:How_To_Add_Google_Analytics_to_my_Gallery_2

Create directory /usr/share/gallery2/themes/<mytheme>/templates/local
Copy /usr/share/gallery2/themes/<mytheme>/templates/theme.tpl to /usr/share/gallery2/themes/<mytheme>/templates/local/theme.tpl, edit that copy and add just above the </body> tag the Piwik javascript