* More user friendly token validation with more helpful error message.
[project/google_analytics.git] / README.txt
CommitLineData
97110728 1// $Id$
2
0efd556a 3Module: Google Analytics
3ae24718 4Author: Alexander Hass <http://drupal.org/user/85918>
0efd556a
MC
5
6
7Description
8===========
9Adds the Google Analytics tracking system to your website.
10
11Requirements
12============
13
14* Google Analytics user account
15
16
17Installation
18============
19* Copy the 'googleanalytics' module directory in to your Drupal
037ccb3d 20sites/all/modules directory as usual.
0efd556a
MC
21
22
23Usage
24=====
037ccb3d 25In the settings page enter your Google Analytics account number.
5facbdc2 26
0efd556a 27All pages will now have the required JavaScript added to the
5facbdc2 28HTML footer can confirm this by viewing the page source from
0efd556a
MC
29your browser.
30
037ccb3d 31New approach to page tracking in 5.x-1.5 and 6.x-1.1
32====================================================
33With 5.x-1.5 and 6.x-1.1 there are new settings on the settings page at
097e118e 34admin/config/system/googleanalytics. The "Page specific tracking" area now
037ccb3d 35comes with an interface that copies Drupal's block visibility settings.
36
37The default is set to "Add to every page except the listed pages". By
38default the following pages are listed for exclusion:
39
97110728 40admin
41admin/*
42user/*/*
43node/add*
037ccb3d 44node/*/*
45
46These defaults are changeable by the website administrator or any other
97110728 47user with 'administer google analytics' permission.
037ccb3d 48
49Like the blocks visibility settings in Drupal core, there is now a
50choice for "Add if the following PHP code returns TRUE." Sample PHP snippets
51that can be used in this textarea can be found on the handbook page
52"Overview-approach to block visibility" at http://drupal.org/node/64135.
68c107f3 53
037ccb3d 54A code snippet that creates opt-out by role functionality for unchecked roles
55can be found in the Google Analytics handbook at http://drupal.org/node/261997.
68c107f3 56
26110623 57Custom variables
58=================
59One example for custom variables tracking is the "User roles" tracking. Enter
60the below configuration data into the custom variables settings form under
61admin/config/system/googleanalytics.
62
63Slot: 1
64Name: User roles
65Value: [current-user:roles]
66Scope: Visitor
67
68More details about Custom variables can be found in the Google API documentation at
69http://code.google.com/intl/en/apis/analytics/docs/tracking/gaTrackingCustomVariables.html
70
68c107f3 71Advanced Settings
72=================
037ccb3d 73You can include additional JavaScript snippets in the custom javascript
74code textarea. These can be found on the official Google Analytics pages
75and a few examples at http://drupal.org/node/248699. Support is not
76provided for any customisations you include.
68c107f3 77
97110728 78To speed up page loading you may also cache the Analytics ga.js
ffbad14e 79file locally.