Google Analytics Injection
Categories
Component ID
2230693
Component name
Google Analytics Injection
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Downloads
285
Component created
Component changed
Component body
The module injects any Javascript code right after the _gaq.push(["_setAccount", "UA-XXXXXXX-X"]) call. This module is not a submodule of Google Analytics, but can extend it.
It can be used for adding any custom GA tags, like _gaq.push(["_setPageGroup"...]);
The module does not provide any UI, it only fires the hook.
Requirements
- JS Alter module.
- Tracking code is added with
drupal_add_js(..., 'inline', ...)call. - Google Analytics module is optional since the condition above is true.
Usage
Implement hook_google_analytics_inject() in your custom module. The function should return any additional GA code, like _gaq.push(["_setPageGroup"...]);
Development is sponsored by SmartWolverine.net. The maintainer is always available for paid customizations and consultations.
