damaskinos
damaskinos

Reputation: 11

Tracking root domain and subdomains in Google Analytics

Thanks in advance for helping. Here what i'm trying to do:

Let's say i have these 3 sites:

example.com     = US
ca.example.com  = Canada
fr.example.com  = France

1- I want to see traffic from ca.example.com and fr.example.com in example.com 2- But when i'm in ca.example.com i only want to see traffic from ca.example.com, same for fr.example.com

Here what i already tried:

All 3 sites have the same GA code. I created 3 views and applied advanced filter on each of them.

Create New Filter > Custom > Advanced

Field A > Hostname = (.*)
Field B > Request URI = (.*)
Output > Request URI = $A1$B1 

After i excluded example.com on the two subdomains

I don't know if this is the right method. When i visit any of the site, i always see the visit of all 3 views.

Hope this is details enough. Regards,

Upvotes: 1

Views: 498

Answers (1)

Neii
Neii

Reputation: 598

If i'm not wrong, you need to exclude traffic to hostnames for two views.

The "fr.example.com" view (predifined) filters can be:

  • "exlude" + "traffic to the hostame" + "that are equal to" + "example.com"
  • "exlude" + "traffic to the hostame" + "that are equal to" + "ca.example.com"

The "ca.example.com" view (predifined) filters can be:

  • "exlude" + "traffic to the hostame" + "that are equal to" + "example.com"
  • "exlude" + "traffic to the hostame" + "that are equal to" + "fr.example.com"

The "example.com" view filters can be:

  • left as it, all traffic to every hostnames will be collected into this view

Upvotes: 1

Related Questions