| 1 |
// $Id: README.txt,v 1.5 2008/11/27 23:12:09 hass Exp $
|
| 2 |
|
| 3 |
Module: Google Analytics
|
| 4 |
Author: Mike Carter <www.ixis.co.uk/contact>
|
| 5 |
|
| 6 |
|
| 7 |
Description
|
| 8 |
===========
|
| 9 |
Adds the Google Analytics tracking system to your website.
|
| 10 |
|
| 11 |
Requirements
|
| 12 |
============
|
| 13 |
|
| 14 |
* Google Analytics user account
|
| 15 |
|
| 16 |
|
| 17 |
Installation
|
| 18 |
============
|
| 19 |
* Copy the 'googleanalytics' 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 Google Analytics account number.
|
| 26 |
|
| 27 |
You can also track the username and/or user ID who visits each page.
|
| 28 |
This data will be visible in Google Analytics as segmentation data.
|
| 29 |
If you enable the profile.module you can also add more detailed
|
| 30 |
information about each user to the segmentation tracking.
|
| 31 |
|
| 32 |
All pages will now have the required JavaScript added to the
|
| 33 |
HTML footer can confirm this by viewing the page source from
|
| 34 |
your browser.
|
| 35 |
|
| 36 |
New approach to page tracking in 5.x-1.5 and 6.x-1.1
|
| 37 |
====================================================
|
| 38 |
With 5.x-1.5 and 6.x-1.1 there are new settings on the settings page at
|
| 39 |
admin/settings/googleanalytics. The "Page specific tracking" area now
|
| 40 |
comes with an interface that copies Drupal's block visibility settings.
|
| 41 |
|
| 42 |
The default is set to "Add to every page except the listed pages". By
|
| 43 |
default the following pages are listed for exclusion:
|
| 44 |
|
| 45 |
admin
|
| 46 |
admin/*
|
| 47 |
user/*/*
|
| 48 |
node/add*
|
| 49 |
node/*/*
|
| 50 |
|
| 51 |
These defaults are changeable by the website administrator or any other
|
| 52 |
user with 'administer google analytics' permission.
|
| 53 |
|
| 54 |
Like the blocks visibility settings in Drupal core, there is now a
|
| 55 |
choice for "Add if the following PHP code returns TRUE." Sample PHP snippets
|
| 56 |
that can be used in this textarea can be found on the handbook page
|
| 57 |
"Overview-approach to block visibility" at http://drupal.org/node/64135.
|
| 58 |
|
| 59 |
A code snippet that creates opt-out by role functionality for unchecked roles
|
| 60 |
can be found in the Google Analytics handbook at http://drupal.org/node/261997.
|
| 61 |
|
| 62 |
Advanced Settings
|
| 63 |
=================
|
| 64 |
You can include additional JavaScript snippets in the custom javascript
|
| 65 |
code textarea. These can be found on the official Google Analytics pages
|
| 66 |
and a few examples at http://drupal.org/node/248699. Support is not
|
| 67 |
provided for any customisations you include.
|
| 68 |
|
| 69 |
To speed up page loading you may also cache the Analytics ga.js
|
| 70 |
file locally.
|