2 Module: Piwik - Web analytics
3 Author: Alexander Hass <http://www.hass.de/>
8 Adds the Piwik tracking system to your website.
14 * Piwik website account
19 * Copy the 'piwik' module directory in to your Drupal
20 sites/all/modules directory as usual.
25 In the settings page enter your Piwik website ID.
27 You will also need to define what user roles should be tracked.
28 Simply tick the roles you would like to monitor.
30 All pages will now have the required JavaScript added to the
31 HTML footer can confirm this by viewing the page source from
37 One example for custom variables tracking is the "User roles" tracking. Enter
38 the below configuration data into the custom variables settings form under
39 admin/config/system/piwik.
43 Value: [current-user:piwik-role-names]
48 Value: [current-user:piwik-role-ids]
51 More details about custom variables can be found in the Piwik API documentation at
52 http://piwik.org/docs/javascript-tracking/#toc-custom-variables.
57 You can include additional JavaScript snippets in the advanced
58 textarea. These can be found on various blog posts, or on the
59 official Piwik pages. Support is not provided for any customisations
62 To speed up page loading you may also cache the piwik.js
63 file locally. You need to make sure the site file system is in public
69 Drupal requirements (http://drupal.org/requirements) tell you to configure
70 PHP with "session.save_handler = user", but your Piwik installation may
71 not work with this configuration and gives you a server error 500.
73 1. You are able to workaround with the PHP default in your php.ini:
76 session.save_handler = files
78 2. With Apache you may overwrite the PHP setting for the Piwik directory only.
79 If Piwik is installed in /piwik you are able to create a .htaccess file in
80 this directory with the below code:
84 php_value session.save_handler files
88 <IfModule sapi_apache2.c>
89 php_value session.save_handler files
92 # PHP 5, Apache 1 and 2.
94 php_value session.save_handler files