A client of mine has requested that I setup google analytics for each main path, allowing different google accounts to access those unique stats?

For example http://www.testdomain.com/cars would have one specific google analytics account.

And http://www.testdomain.com/ducks would have an entirely different set of google analytics data and account.

Each would be enabled by role.

I suspect this is not a short quick hack, but I thought I would double check with the makers of google analytics module before trying to customize something.

Any feedback would be greatly appreciated.

Thanks,

Robbie Jackson
The Canadian Drupal Guy
Where Beer, Hockey, and The Good life are

Comments

hass’s picture

Category: feature » support
Status: Active » Fixed

Try to add the path list to your settings.php (may be to early for path lookups) or use preprocess_page in your theme. Override the googleanalytics_account dynamically for each path with the GA account number you'd like to use. No need to change one line in the module for this edge case.

I'm not sure if there is already a module available that allows you to override Drupal variables per path, but if not you can write one... Maybe someone else can benefit from it, too.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.