Google Analytics configuration setting for Drupal multisite (domain and submain) I am working on a Drupal mulsite project (using single database) and using Google Analytics module for this.

I have follow the below steps for GA configuration:


Created a domain name example1.com and a sub-domain name example2.com.
Create an account on GA and create property for both of this domain name in GA account. Both property give me two different Tracking ID (same as below screenshot).





Into the configuration setting of GA from drupal admin section I have added Web Property ID of example1.com and into domain setting added both the domain name example1.com and example2.com into the section of List of top-level domains (a same as attached screenshot).


 

Now this configuration is only working for emample1.com, not for example2.com. So can anyone please tell me how can I use Web Property ID of domain exmaple2.php to get the result?
As Kiamlaluno states, this is likely caused by the fact that the module only allows one UA, while you are trying to track two domains. According to the GA module documentation it can be overridden using code like this in settings.php:

&lt;?php
// Override Google Analytics Web Property ID per hostname. 
// Hostnames need to be lower-case!
switch ($_SERVER['HTTP_HOST']) {
  case 'www.example.com':
  case 'www.example.net':
  case 'forum.example.net':
    $conf['googleanalytics_account'] = 'UA-123456-2';
    break;

  case 'www.example.org':
    $conf['googleanalytics_account'] = 'UA-123456-3';
    break;

  default:
    $conf['googleanalytics_account'] = 'UA-123456-1';
}
?&gt;


Documentation can be found here