The existing module allows to setup a single Tracking Code for multiple top-level domains and collects data through cross domain tracking. This method is difficult to setup and the results are not accurate.

Is it possible to add a separate Tracking Code for each Domain (Domain Access)?
How to do that?

Comments

Londova created an issue. See original summary.

Londova’s picture

Title: Multi tracking Code for Domain Access (multi-site) » Separate tracking Code for each Domain (multi-site)
hass’s picture

Category: Feature request » Support request
Status: Active » Fixed

You need to install domain variables module. Than you can configure variables per domain.

Carlos Miranda Levy’s picture

Title: Separate tracking Code for each Domain (multi-site) » Separate tracking Code for each Domain (multiple sites using domain access)

Updated the title to show that the issue relates to using the Domain Access module, not to standard multisite configurations.

Londova’s picture

@hass
There is NO such module "domain variables" in Drupal 8 (only Drupal 7).
Does it mean that this issue will never be covered by Google Analytics module?

hass’s picture

Than you may need to develop domain variables for D8... maybe the migration is in progress... you need to talk with the maintainers. At least I currently think this is not in the scope of the module.

You may also look into https://www.drupal.org/project/domain that may has the feature, too.

golddragon007’s picture

You don't need, you can use domain_config modul for D8. There's no UI for this, but if you import in the right way the right config file, it will take effect.

You need to do like this:
domain.config.[domain machine name].google_analytics.settings.yml

You need to write only those keys, which you want to overwrite. In this case this:

account: UA-xxxxxxx-yy

And that's all. (don't forget to import you config file, maybe a cache rebuild needed and a custom cache by domain).

Status: Fixed » Closed (fixed)

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