Nov 18, 2019

Two domains, one site - How to separate domain data?

I've got two domains that both point to the one site. I've added Global site tags for both domains to the main page code (two lots of code) which collects data for both sites.

Currently all data goes to both sites for example if a user visits site a.com then that data is collected to both a.com and b.com ie both a.com and b.com get the same data so look the same.

Is there a way I can separate the two lots of data?
Locked
Informational notification.
This question is locked and replying has been disabled.
Community content may not be verified or up-to-date. Learn more.
All Replies (4)
Nov 18, 2019
Hi,

Since you are using the common Google Analytics tracking code for both domains. Due to that, all user activities are being recorded into the Common Google Analytics view.

If you would like to record the separate activities for both domains, I would recommend to create separate analytics views for a.com and b.com.

Here is the detailed information about how to create GA views https://support.google.com/analytics/answer/1009714?hl=en.

Hope this helps!

Thanks!
Nov 18, 2019
Create a view for each domain and create a filter for each that only includes the HOSTNAME for each domain. This way you exclude the other property's data and also on that rare occasion where other websites use your GA ID on their site for spam reasons
Nov 18, 2019

Thanks for the help, I now have it working using filters.

I had previously tried this, it turns out it was working all along. I was looking at the realtime stats to test it, the issue is that the realtime stats update immediately when someone connects to the site, but take some time clearing the "active users on site" data when someone leaves. If you're not careful this can make it look like the data isn't being filtered out when in fact it just needs more time to stop showing recent connections.

Anyway, thanks again!
Nov 20, 2019
Hi ABT,

In real-time section, you will see the real interactions which are happening on your website, make sure you assigned the right filters to the specific GA views.
false
8084862767918311780
true
Search Help Center
true
true
true
true
true
69256
false
false
Search
Clear search
Close search
Main menu