I am using a Drupal Multiple Site (several sites running on 1 Drupal installation). Each site is part of a subdomain.

For example:

  • mysite.com
  • store.mysite.com
  • blog.mysite.com

Each site has its own separate database. Do I set up Google Analytics on just the main site or on all the sites?

In this post, it says you need to set it up on all the sites. However, it also says you need to "show the ".domain setting" in footer". I can't find this setting anywhere in the UI.

2 Answers 2


You will need to install the module on each site using the same UA# (assuming these should all be tracked under the same account).

All you need to do is select One domain with multiple subdomains for everything to track properly.

enter image description here


The answer of the question depending on how you want to track each website in GA.

First off, since you have multiple configurations/databases, you'll need to setup GA (@ /admin/config/system/googleanalytics) on each the site if you're wanting to track each one, regardless how you track the sites in GA.

Next, if you're wanting to track each site separately in a different GA property (each with its own independent tracking metrics/dimensions/etc), you want to use the A single domain (default) option with each site having a different Web Property ID (e.g. UA-xxxxxxx-yy).

If you're wanting to track all these interrelated sites on one GA property, you'll need to use the One domain with multiple subdomains option. You'll be using the Web Property ID across all sites, but you'll have to make additional configurations to accommodate GA:

  • If you're not using Universal Analytics, this means that the $cookie_domain (in settings.php) needs to tweaked so that it reports to GA the same .mysite.com domain (this is what your linked d.o. is addressing).
  • If you are using Universal Analytics, then just setting the One domain with multiple subdomains option is fine.

Note, if you go with the One domain with multiple subdomains option, you'll need to make some additional changes on the GA side so that filters show the domain. Otherwise, you're going to see various domain URLs mixed into the GA property.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.