AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
3.6K members online now
3.6K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Tracking traffic from a domain and multiple sub-domains

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am trying to track related sub-domains and I think the URL is causing some issues.

 

Here is my configuration:

 

We are still using the old tracking code (ga.js).

 

My main site is www.domain.com and has been successfully tracking properly for years.

 

Recently, we have implemented the following sub-domains:

 

sub1.www.domain.com

sub2.www.domain.com

sub3.www.domain.com

etc.

 

On the new subdomains, we implemented the same ga.js snippet as the original domain, including the same tracking code.

 

While a look at the http traffic shows that the sub-domain tracking code is making a call to the Google, I am unable to filter the reports using the sub-domain URLs as I would hope to be able to do (e.g. Show me all traffic to sub2.www.domain.com).

 

I'm wondering if my configuration is causing issues: since I am tracking www.domain.com as a separate URL is that interfering with my ability to track the sub-domains using the same tracking code, but filter out reports to show only sub-domain traffic (since the original/primary property URL is the same as the subs).

 

Would implementing of the Universal Tracking code help the situation?  I'm reluctant to try it, for fear of interrupting/impacting the primary domain tracking.

 

Other than implementing the Universal code, my other thought is to create a second tracking ID and implement it on the sub-domains, leaving the original tracking ID for the primary domain.

 

Thoughts?

 

1 Expert replyverified_user

Re: multiple sub-domains + same code base

Top Contributor
# 2
Top Contributor
Hi Todd,

by filtering do you mean:
1. Creating a separate view for only traffic coming to and hits originating from sub.domain.com or
2. Filtering landing pages where you want to see all landing pages which are on sub.domain.com

For case 1 use hostname field to separate / filter views.
For case 2 use a view filter in an additionally created view which will add Hostname to URI so instead of seeing /mylandingpage in your report you will see sub.domain.com/mylandingpage

Hope this helps!

Kind regards,
Zorin
Web analyst @ escapestudio.net

Re: multiple sub-domains same code base

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Actually, I'm not seeing the data from the sub domains at all. Remember also that I'm not tracking sub1.domain.com and sub2.domain.com. I'm tracking www.domain.com, sub1.www.domain.com, sub2.www.domain.com, etc. I have had some success using advanced filtering to overwrite the URI to include the hostname (so the full path shows up in the reports and can then be used for filtering). I still wonder if upgrading to the Universal tracking code is the best way to go...might have to test that.

Re: multiple sub-domains same code base

Top Contributor
# 4
Top Contributor
Hi Todd, (yes good catch with the sub.www)

1. please check the Audience > Technology > Network > Hostname report where you will see where your hits generate from (which hostname) - this value can be used for filtering
2. If you apply the Hostname to URI yes this can help answering your question traffic to subN.www.domain.com
3. Transfer to Universal as soon as you can for both main and subdomain as subdomain stracking becomes much more easier (if you need to preserve the session) - and migrate to GTM if in any way possible

Kind regards,
Zorin
Web analyst @ escapestudio.net