You are here

README.txt in Piwik Web Analytics 8

Same filename and directory in other branches
  1. 5 README.txt
  2. 6.2 README.txt
  3. 6 README.txt
  4. 7.2 README.txt
  5. 7 README.txt
Module: Piwik - Web analytics
Author: Alexander Hass <http://drupal.org/user/85918>


Description
===========
Adds the Piwik tracking system to your website.

Requirements
============

* Piwik installation
* Piwik website ID


Installation
============
* Copy the 'piwik' module directory in to your Drupal 'modules'
directory as usual.


Usage
=====
In the settings page enter your Piwik website ID.

All pages will now have the required JavaScript added to the
HTML footer can confirm this by viewing the page source from
your browser.

Page specific tracking
====================================================
The default is set to "Add to every page except the listed pages". By
default the following pages are listed for exclusion:

/admin
/admin/*
/batch
/node/add*
/node/*/*
/user/*/*

These defaults are changeable by the website administrator or any other
user with 'Administer Piwik' permission.

Like the blocks visibility settings in Drupal core, there is a choice for
"Add if the following PHP code returns TRUE." Sample PHP snippets that can be
used in this textarea can be found on the handbook page "Overview-approach to
block visibility" at http://drupal.org/node/64135.

Custom variables
=================
One example for custom variables tracking is the "User roles" tracking. Enter
the below configuration data into the custom variables settings form under
admin/config/system/piwik.

Slot: 1
Name: User roles
Value: [current-user:piwik-role-names]
Scope: Visitor

Slot: 1
Name: User ids
Value: [current-user:piwik-role-ids]
Scope: Visitor

More details about custom variables can be found in the Piwik API documentation
at http://piwik.org/docs/javascript-tracking/#toc-custom-variables.


Advanced Settings
=================
You can include additional JavaScript snippets in the custom javascript
code textarea. These can be found on various blog posts, or on the
official Piwik pages. Support is not provided for any customisations
you include.

To speed up page loading you may also cache the Piwik "piwik.js"
file locally.

Known issues
============
Drupal requirements (http://drupal.org/requirements) tell you to configure 
PHP with "session.save_handler = user", but your Piwik installation may
not work with this configuration and gives you a server error 500.

1. You are able to workaround with the PHP default in your php.ini:

   [Session]
   session.save_handler = files

2. With Apache you may overwrite the PHP setting for the Piwik directory only.
   If Piwik is installed in /piwik you are able to create a .htaccess file in
   this directory with the below code:

   # PHP 4, Apache 1.
   <IfModule mod_php4.c>
     php_value session.save_handler files
   </IfModule>

   # PHP 4, Apache 2.
   <IfModule sapi_apache2.c>
     php_value session.save_handler files
   </IfModule>

   # PHP 5, Apache 1 and 2.
   <IfModule mod_php5.c>
     php_value session.save_handler files
   </IfModule>

File

README.txt
View source
  1. Module: Piwik - Web analytics
  2. Author: Alexander Hass
  3. Description
  4. ===========
  5. Adds the Piwik tracking system to your website.
  6. Requirements
  7. ============
  8. * Piwik installation
  9. * Piwik website ID
  10. Installation
  11. ============
  12. * Copy the 'piwik' module directory in to your Drupal 'modules'
  13. directory as usual.
  14. Usage
  15. =====
  16. In the settings page enter your Piwik website ID.
  17. All pages will now have the required JavaScript added to the
  18. HTML footer can confirm this by viewing the page source from
  19. your browser.
  20. Page specific tracking
  21. ====================================================
  22. The default is set to "Add to every page except the listed pages". By
  23. default the following pages are listed for exclusion:
  24. /admin
  25. /admin/*
  26. /batch
  27. /node/add*
  28. /node/*/*
  29. /user/*/*
  30. These defaults are changeable by the website administrator or any other
  31. user with 'Administer Piwik' permission.
  32. Like the blocks visibility settings in Drupal core, there is a choice for
  33. "Add if the following PHP code returns TRUE." Sample PHP snippets that can be
  34. used in this textarea can be found on the handbook page "Overview-approach to
  35. block visibility" at http://drupal.org/node/64135.
  36. Custom variables
  37. =================
  38. One example for custom variables tracking is the "User roles" tracking. Enter
  39. the below configuration data into the custom variables settings form under
  40. admin/config/system/piwik.
  41. Slot: 1
  42. Name: User roles
  43. Value: [current-user:piwik-role-names]
  44. Scope: Visitor
  45. Slot: 1
  46. Name: User ids
  47. Value: [current-user:piwik-role-ids]
  48. Scope: Visitor
  49. More details about custom variables can be found in the Piwik API documentation
  50. at http://piwik.org/docs/javascript-tracking/#toc-custom-variables.
  51. Advanced Settings
  52. =================
  53. You can include additional JavaScript snippets in the custom javascript
  54. code textarea. These can be found on various blog posts, or on the
  55. official Piwik pages. Support is not provided for any customisations
  56. you include.
  57. To speed up page loading you may also cache the Piwik "piwik.js"
  58. file locally.
  59. Known issues
  60. ============
  61. Drupal requirements (http://drupal.org/requirements) tell you to configure
  62. PHP with "session.save_handler = user", but your Piwik installation may
  63. not work with this configuration and gives you a server error 500.
  64. 1. You are able to workaround with the PHP default in your php.ini:
  65. [Session]
  66. session.save_handler = files
  67. 2. With Apache you may overwrite the PHP setting for the Piwik directory only.
  68. If Piwik is installed in /piwik you are able to create a .htaccess file in
  69. this directory with the below code:
  70. # PHP 4, Apache 1.
  71. php_value session.save_handler files
  72. # PHP 4, Apache 2.
  73. php_value session.save_handler files
  74. # PHP 5, Apache 1 and 2.
  75. php_value session.save_handler files