Skip to content

mattfarina/google_analytics_node_tracking

Repository files navigation

Google Analytics Node Tracking

This module/feature provides the ability for Google Analytics to track the node types on pages that are nodes and provides a block tracking the most popular nodes for each node type.

Notes

  • A url with the custom variable is not seen as the same as a url without the custom variable added. So, the analytics with the variable tracking included in this module do not follow all the stats for the site before the module was enabled with the additional data is provides.

  • If you are using custom variables for Google Analytics already you will need to alter the code of this module/feature and the variable within the Google Analytics module.

  • This version is compatible with the 6.x-2.x branch of the Google Analyics module. The 6.x-3.x branch uses async for Google Analytics and the Google Analytics variable would need to be handled differently.

  • The data available from the API is from yesterday on back. If you enable the module wait a day before placing the blocks. The blocks will show no data for the first day the module is enabled.

Installation

  1. Enable block caching on /admin/settings/performance. Without block caching being enabled a request is made to Google Analytics on ever page load. With caching enabled the blocks are cached site wide until the cache is cleared. At a minimum the cache is regularly cleared when the cron is run.

  2. Install, enable, and configure (with your code) the Google Analytics module at http://drupal.org/project/google_analytics.

  3. Install and enable the Google Analytics API module at http://drupal.org/project/google_analytics_api.

  4. Authorize your domain to access the analytics and select the profile to use at /admin/settings/google-analytics-api. You will need to do this for your domain and any development domains. In your 'My Account' settings within Google Analytics you can later revoke access for domains.

  5. Give anonymous and authenticated user the 'administer Google Analytics settings'. This permission name is a misnomer. The way it is implemented is as an access permission not an administer permission. Users who do not have this permission cannot view the results of a query to the Google Analytics API. The admin permissions are handled through a core permission.

  6. Enable Google Analytics Node Tracking and place your blocks displaying the results.

About

A Drupal Feature for tracking node types within Google Analytics and displaying popularity content for each node type.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages