README.txt 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 variables
  39. =================
  40. One example for custom variables tracking is the "User roles" tracking. Enter
  41. the below configuration data into the custom variables settings form under
  42. admin/config/system/googleanalytics.
  43. Slot: 1
  44. Name: User roles
  45. Value: [current-user:role-names]
  46. Scope: Visitor
  47. More details about Custom variables can be found in the Google API documentation at
  48. http://code.google.com/intl/en/apis/analytics/docs/tracking/gaTrackingCustomVariables.html
  49. Advanced Settings
  50. =================
  51. You can include additional JavaScript snippets in the custom javascript
  52. code textarea. These can be found on the official Google Analytics pages
  53. and a few examples at http://drupal.org/node/248699. Support is not
  54. provided for any customisations you include.
  55. To speed up page loading you may also cache the Analytics ga.js
  56. file locally.