Provided with the Statistics plugin is an implementation which wraps around the Piwik statistics platform. This guide explains how to configure your Indico instance to interface with your Piwik installation of choice. It assumes that you have access to a Piwik server and the ability to login and retrieve both the siteId and token_auth variables which the Piwik API provides. For more information on how to obtain these values, please refer to the current Piwik documentation.
The Piwik implementation provided wraps around the native Piwik API providing methods for serverside tracking and retrieval of information relative to the current request. It consists of two components:
Underneath the global plugin options you will see each implementation has a tab for its unique configuration specifics. Piwik exposes the following options:
NOTE: It is recommended that you create a separate site specifically for Indico statistics tracking in Piwik if you are also using Piwik for general analytics also as having both general analytics and these specific statistics utilising the site ID will result in duplicated, non-sensical results.
The two components provided are mutually excluse and, therefore, may be enabled / disabled independently at your convenience. A server restart is not required for the change to go into effect, it is instantaneous upon saving settings.
IMPORTANT: By design, the scope of this implementation extends only into injecting the tracking code into Conference, Material and Contribution display pages. It is not a general purpose, site-wide tracking utility. If this is the functionality that you seek, please refer to the Analytics options offered by Indico.
This component determines if the page being viewed is a Conference, Meeting or Contribution and dyanmically creates the relevant JavaScript required to track remotely with the unique identifiers associated with the Conference and/or Contribution. The code is based on the asynchronous version provided in the Piwik documentation to ensure compatibility amongst browsers in testing.
NOTE: To modify the JavaScript hook, modify the contents of piwik/tpls/JSHook.tpl
This component consists of a listener which sends a tracking REST query to the Piwik instance on every file download or material display. It is entirely serverside and, therefore, is subject to a timeout condition as it relies on the Piwik instance defined in the plugin configuration being available.