[[PageOutline(2-5, Table of Contents, floated)]] = Piwik Web Stats = The Piwik webstats server is available at: https://stats.transitionnetwork.org/ The site is currently running on wiki:PenguinServer#stats.transitionnetwork.org via Nginx, previously there was a live site on Quince and a dev site on Kiwi using Apache, see the old Apache PiwikServerInstall notes. == Accessing the stats == If you need access to the stats for one of more site please contact webproject@transitionnetwork.org or chris@webarchitects.co.uk to request an account and state which sites you need access to. If you have an android or iOS mobile phone then you can install the Piwik app for your device from the apple store or google play, see http://piwik.org/mobile/ == Sites == Currently stats are generated for the following sites: 1. [http://www.transitionnetwork.org/ Transition Network] 2. [http://www.intransitionmovie.com/ Transition Movie] 3. [http://wiki.transitionnetwork.org/ Transition Wiki] 4. [http://2010.archive.transitionnetwork.org/ 2010 Archive] 5. [http://2011.archive.transitionnetwork.org/ 2011 Archive] 6. [http://static.transitionnetwork.org/ Static Archive] 7. [http://tech.transitionnetwork.org/ TTech Trac] 9. [http://parrot.transitionnetwork.org/ Parrot Server] 10. [http://earthinheritors.net/ Earth Inheritors] 11. [http://www.reconomy.org/ REconomy] === Adding a site === To add a site you need to contact webproject@transitionnetwork.org or chris@webarchitects.co.uk and they can login and and use the [https://stats.transitionnetwork.org/index.php?module=SitesManager sites manager] to add a site and get the tracking code for the site, they should add the site to the PiwikServer#Sites list above. They should then [https://stats.transitionnetwork.org/index.php?module=UsersManager create a user] and grant the new user access to the stats for the sites they need access to. If the new site is running a content management system such as Drupal or Wordpress then please install the plugin for your CMS, see http://piwik.org/integrate/ == Tickets == Current Piwik tickets: [[TicketQuery(status=accepted|new|assigned|reopened&component=Piwik,order=id,desc=1,format=table,col=summary|owner|reporter)]] Closed Piwik tickets: [[TicketQuery(status=closed&component=Piwik,order=id,desc=1,format=table,col=summary|owner|reporter)]] == Updates == To update Piwik, switch off the recording of stats by setting {{{record_statistics}}} to {{{0}}} in {{{/web/stats.transitionnetwork.org/piwik/config/config.ini.php}}}: {{{ [Tracker] record_statistics = 0 }}} Backup the config file: {{{ cd /web/stats.transitionnetwork.org/ cp piwik/config/config.ini.php . }}} Download, extract, and update the database and restart php-fpm: {{{ export PIWIK="2.5.0" wget "https://builds.piwik.org/piwik-$PIWIK.tar.gz" wget "https://builds.piwik.org/piwik-$PIWIK.tar.gz.asc" gpg --verify piwik-$PIWIK.tar.gz.asc tar -zxvf piwik-$PIWIK.tar.gz cp config.ini.php piwik/config/ chown -R www-data:www-data piwik/ php /web/stats.transitionnetwork.org/piwik/console core:update /etc/init.d/php5-fpm restart }}} Note that sometime the `.tar.gz` files are not available at the same time as the `.zip` files so you might need to use the following steps: {{{ export PIWIK="2.5.0" wget "https://builds.piwik.org/piwik-$PIWIK.zip" wget "https://builds.piwik.org/piwik-$PIWIK.zip.asc" gpg --verify piwik-$PIWIK.zip.asc unzip piwik-$PIWIK.zip cp config.ini.php piwik/config/ chown -R www-data:www-data piwik/ php /web/stats.transitionnetwork.org/piwik/console core:update /etc/init.d/php5-fpm restart }}} Switch recording of stats back on by setting {{{record_statistics}}} to {{{1}}} in {{{/web/stats.transitionnetwork.org/piwik/config/config.ini.php}}}: {{{ [Tracker] record_statistics = 1 }}} Login and do a [https://stats.transitionnetwork.org/index.php?module=Installation&action=systemCheckPage&idSite=1&period=day&date=today system check]. Past update tickets: * 2.14.3 ticket:869 * 2.14.1 ticket:866 * 2.14.0 ticket:861 * 2.13.0 ticket:848#comment:3 * 2.13.0-rc1 ticket:848 * 2.12.1 ticket:840 * 2.12.0 ticket:838 * 2.11.2 ticket:835 * 2.11.1 ticket:833 * 2.10.0 ticket:817 * 2.9.1 ticket:810 * 2.9.0 ticket:807 * 2.8.3 ticket:801 * 2.8.1 ticket:800 * 2.8.0 ticket:796 * 2.7.0 ticket:791 * 2.6.1 ticket:782 * 2.5.0 ticket:776 * 2.4.1 ticket:756 * 2.4.0 ticket:752 * 2.3.0 ticket:732 * 2.2.2 ticket:729 * 2.2.1 ticket:726 * 2.2.0 ticket:720 * 2.1.0 ticket:697 * 2.0.3 ticket:672 * 2.0.2 ticket:664 * 2.0.1 ticket:660 * 1.12 ticket:556 * 1.11.1 ticket:515 * 1.11 ticket:509 * 1.10.1 ticket:470#comment:13 * 1.9.1 ticket:436 * 1.8.4 ticket:418 == Logo == For a while there was an error because we have overwritten three logo files, see ticket:672, but now the Transition Network logo is now uploaded via the web interface, see ticket:697#comment:3 and this isn't an issue. == Cron == Archiving of Piwiki stats is done by this crontab, {{{/etc/cron.d/piwik-archive}}}: {{{ MAILTO="root@localhost" #5 * * * * www-data /web/stats.transitionnetwork.org/piwik/console core:archive --url=http://stats.transitionnetwork.org/ >> /var/log/piwik-archive.log 5 2-23 * * * www-data /web/stats.transitionnetwork.org/piwik/console core:archive --url=http://stats.transitionnetwork.org/ >> /var/log/piwik-archive.log }}} It doesn't run at 5 past midnight or 5 past 1am as there were often errors when it ran at this time, probably because the MySQL database backup is also running, see ticket:768#comment:6. The log file that is created, {{{/var/log/piwik-archive.log}}} is rotated by logrotate which is configured with {{{/etc/logrotate.d/piwik}}} which contains: {{{ /var/log/piwik-archive.log { daily missingok rotate 30 compress delaycompress notifempty } }}} This crontab was created on ticket:726#comment:2 and updated on ticket:768#comment:4 and ticket:768#comment:5. == Server Log Analytics == Following a failed attempt to get wiki:AwStatsInstall working Piwik has been set up to analyse the Nginx logs from wiki:PuffinServer. The Nginx logs from wiki:PuffinServer are copied to wiki:PenguinServer as documented on the wiki:AwStatsInstall page. The logs are imported using the wiki:PiwikImportScript which is run by the www-data user using this crontab: {{{ 30 07 * * * /usr/local/bin/piwik-import > /dev/null }}} == Plugins == === Do Not Track === Upgraded to version 0.3 on ticket:414 == Penguin Server == See wiki:PenguinServer#stats.transitionnetwork.org and see ticket:470#comment:13 for the notes on the migration from Apache to Nginx. See also the initial research comments on the migration to Nginx, ticket:357#comment:14 ticket:357#comment:28. See the GeoIP install notes, ticket:470#comment:33 and the setup of the Mediawiki plugin ticket:470#comment:32 and the Nginx install ticket:470#comment:13 and cronjob ticket:470#comment:13 and the Nginx config ticket:470#comment:34