Projet

Général

Profil

Paste
Télécharger (2,4 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / matomo / README.txt @ 60283730

1

    
2
Module: Matomo Analytics
3
Author: Alexander Hass <http://www.hass.de/>
4

    
5

    
6
Description
7
===========
8
Adds the Matomo tracking system to your website.
9

    
10
Requirements
11
============
12

    
13
* Matomo installation
14
* Matomo website account
15

    
16

    
17
Installation
18
============
19
* Copy the 'matomo' module directory in to your Drupal
20
sites/all/modules directory as usual.
21

    
22

    
23
Usage
24
=====
25
In the settings page enter your Matomo website ID.
26

    
27
You will also need to define what user roles should be tracked.
28
Simply tick the roles you would like to monitor.
29

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

    
34

    
35
Custom variables
36
=================
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/matomo.
40

    
41
Slot: 1
42
Name: User roles
43
Value: [current-user:matomo-role-names]
44
Scope: Visitor
45

    
46
Slot: 1
47
Name: User ids
48
Value: [current-user:matomo-role-ids]
49
Scope: Visitor
50

    
51
More details about custom variables can be found in the Matomo API documentation
52
at http://matomo.org/docs/javascript-tracking/#toc-custom-variables.
53

    
54

    
55
Advanced Settings
56
=================
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 Matomo pages. Support is not provided for any customisations
60
you include.
61

    
62
To speed up page loading you may also cache the matomo.js
63
file locally. You need to make sure the site file system is in public
64
download mode.
65

    
66

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

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

    
75
   [Session]
76
   session.save_handler = files
77

    
78
2. With Apache you may overwrite the PHP setting for the Matomo directory only.
79
   If Matomo is installed in /matomo you are able to create a .htaccess file in
80
   this directory with the below code:
81

    
82
   # PHP 4, Apache 1.
83
   <IfModule mod_php4.c>
84
     php_value session.save_handler files
85
   </IfModule>
86

    
87
   # PHP 4, Apache 2.
88
   <IfModule sapi_apache2.c>
89
     php_value session.save_handler files
90
   </IfModule>
91

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