I am a newbie when it comes to GA. I've created a new project that is available on the web through 6 different domains. I want to measure which domain gather the most traffic. To easily compare traffic between all the domains I was thinking about using one Google Analytics code for all the domains. But then in stats visits for every domain are acumulated togheter under one endpoint "/". How should I set it up properly?


your title states subdomains, however your post states domains.

If you wish to track a domain and/or it's subdomains and to be able to easily compare the traffic, this can be done with a single GA Property and it's tracking code with the single, same tracking id (eg UA-123456-1) placed onto the domain and it's subdomains. If you copy/paste the tracking code from the GA interface, by default, the snippet should already have the cookie domain set to auto.

Following GA "best practices", keep the default All Website Data view without any filters applied to it.

Create a new view, and apply a filter that prepends the Hostname to the Request URIs in the GA reports. It will prevent the issue you mention of the pageviews being reported in aggregate as if via a single domain.

Filter Type: Custom filter > Advanced
Field A --> Extract A: Hostname = (.*)
Field B --> Extract B: Request URI = (.*)
Output To --> Constructor: Request URI = $A1$B1
Click Save to create the filter.

You then also have the option of creating further Views and applying an Include Hostname filter to each one, applicable to the particular subdomain, should you wish to also track each of the subdomains separately.

If they are each different domains, the same above method can also be used, however be sure to add each domain to the Property's Referral Exclusion List.

If you need to track visitors moving between different domains via links between the sites or similar, then you need a cross domain tracking setup in order to share the cookie information and session and referral data.


First of all, as I understand, you want to track multiple site in single dashboard for comparison of analytics.

You can do this in two way.

use single account

You can use single account and single property to track analytics data from different site also can keep it in saparate view

Google allows you to have 100 accounts, each account can have maximum of 50 properties and each property can have maximum of 25 views

You can generate Google analytics code say for one site In Google analytics account id, you can use UA-12345678-1 and UA-12345678-2 and upto 25 And use it on different sites you have.

with different account

You can create different account under admin section of Google analytics and create different properties under it, you can then create a dashboard to put components from each accounts there to compare and so.

I have found these point on link https://www.webnots.com/add-multiple-site-in-google-analytics/

Let me know if this works for you. Your question is really interesting and helpful for many. Great.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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