README.txt 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. Module: Google Analytics
  2. Author: Alexander Hass <http://drupal.org/user/85918>
  3. Description
  4. ===========
  5. Adds the Google Analytics tracking system to your website.
  6. Requirements
  7. ============
  8. * Google Analytics user account
  9. Installation
  10. ============
  11. Copy the 'googleanalytics' module directory in to your Drupal
  12. sites/all/modules directory as usual.
  13. Usage
  14. =====
  15. In the settings page enter your Google Analytics account number.
  16. All pages will now have the required JavaScript added to the
  17. HTML footer can confirm this by viewing the page source from
  18. your browser.
  19. New approach to page tracking in 5.x-1.5 and 6.x-1.1
  20. ====================================================
  21. With 5.x-1.5 and 6.x-1.1 there are new settings on the settings page at
  22. admin/config/system/googleanalytics. The "Page specific tracking" area now
  23. comes with an interface that copies Drupal's block visibility settings.
  24. The default is set to "Add to every page except the listed pages". By
  25. default the following pages are listed for exclusion:
  26. admin
  27. admin/*
  28. batch
  29. node/add*
  30. node/*/*
  31. user/*/*
  32. These defaults are changeable by the website administrator or any other
  33. user with 'administer google analytics' permission.
  34. Like the blocks visibility settings in Drupal core, there is now a
  35. choice for "Add if the following PHP code returns TRUE." Sample PHP snippets
  36. that can be used in this textarea can be found on the handbook page
  37. "Overview-approach to block visibility" at http://drupal.org/node/64135.
  38. Custom dimensions and metrics
  39. =============================
  40. One example for custom dimensions tracking is the "User roles" tracking.
  41. 1. In the Google Analytics Management Interface you need to setup Dimension #1
  42. with name e.g. "User roles". This step is required. Do not miss it, please.
  43. 2. Enter the below configuration data into the custom dimensions settings form
  44. under admin/config/system/googleanalytics. You can also choose another index,
  45. but keep it always in sync with the index used in step #1.
  46. Index: 1
  47. Value: [current-user:role-names]
  48. More details about custom dimensions and metrics can be found in the Google API
  49. documentation at https://developers.google.com/analytics/devguides/collection/analyticsjs/custom-dims-mets
  50. Advanced Settings
  51. =================
  52. You can include additional JavaScript snippets in the custom javascript
  53. code textarea. These can be found on the official Google Analytics pages
  54. and a few examples at http://drupal.org/node/248699. Support is not
  55. provided for any customisations you include.
  56. To speed up page loading you may also cache the Google Analytics "analytics.js"
  57. file locally.