Analytics
2.5K members online now
2.5K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

Comparing TLD Traffic to Subdomain Traffic

Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

Hello,

 

I have a main, or top-level domain (TLD), of www.mydomain.com and a subdomain of subdomain.mydomain.com.

 

On the TLD homepage, there is an account sign in link that goes to: subdomain.mydomain.com/home/login

 

I currently have a view that has a filter that shows only TLD traffic. The regex for this filter is: ^(www\.|^)mydomain\.com$

 

In this view, only sessions (or traffic) on the TLD is recorded. So, if a user came to www.mydomain.com but clicked on the sign link that goes to subdomain.mydomain.com/home/login, then that session is not included.

 

However, I want to see what the sessions metric would look like (and other metrics in the Audience Overview) if I did include sessions where users clicked on the sign in link and went to subdomain.mydomain.com/home/login. For example, if 100 sessions are recorded for TLD traffic only, but then I include sessions that include the account login page on the subdomain page, I would expect that number to increase.

 

I tried creating a custom segment to include sessions to the subdomain, but it didn't work. Any idea why? Is it because of the filter that is being applied?

 

Any ideas on how to compare metrics/sesisons for TLD traffic only vs metrics/sessions that include TLD traffic and sessions involving the subdomain.mydomain.com/home/login pageview? Can this be achieved with a custom segment, or do I need to create a separate view and apply a filter? If a filter is needed, what regex would I need?

 

Ideally, I'd like to have the graph in the Audience Overview show an overlay, like how it does when comparing date ranges.

 

Also, in viewing the All Pages report in Behavior > Site Content, only the URI is shown, not the full URL like "www.mydomain.com/pricing." Only "/pricing" is shown. How do I get the hostname (www.mydomaincom) to show in this report? Is there a regex expression for this?

 

Thank you in advance for any suggestions/input. It's very much appreciated.

1 Expert replyverified_user

Comparing TLD Traffic to Subdomain Traffic

Rising Star
# 2
Rising Star

Hi Andrew,

 

First, I disagree with this statement  "In this view, only sessions (or traffic) on the TLD is recorded. So, if a user came to www.mydomain.com but clicked on the sign link that goes to subdomain.mydomain.com/home/login, then that session is not included"

 

That session would be included but not the subsequent pageviews in the subdomain. 

 

Here is how I recommend that you tackle this using views rather than segments (there is nothing wrong with doing by segments but if this is how you want to look at the data, views is the right way to go).

 

View 1:  Unfiltered

View 2:  Testing (test new Filters Here)

View 3:  Rollup of TLD and all subs

View 4:  Subdomain A

View 5:  Subdomain B

 

Or View 4 could be subdomain(s).

 

You can use segments in the rollup to compare or use data studio to overlay the data from the views.

 

Lastly, you can combine the hostname and URI in your rollup by following this guide:

 

https://support.google.com/analytics/answer/1012243?hl=en

 

Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Comparing TLD Traffic to Subdomain Traffic

Follower ✭ ✭ ☆
# 3
Follower ✭ ✭ ☆

Hi Theo,

 

Thanks so much for taking the time to respond to my post. Much appreciated. If sessions are included if users click on the Sign In link and go to subdomain.mydomain.com/home/login, but not subsequent pages within the subdomain, then when I go to Behavior > Site Content > All Pages, why don't I see the subdomain.mydomain.com/home/login page listed under the Pages column? But the session is still counted?

Comparing TLD Traffic to Subdomain Traffic

Rising Star
# 4
Rising Star

Hey Andrew,

 

Imagine this scenario:  A user lands on your TLD homepage.  This landing starts a session, sends a pageview to the GA servers, the hit is parsed, filters applied and it's added to your reports.   The user then navigates to the sub-domain, (assuming same GA tracking there) the pageview happens and is sent to GA servers and is discarded from this view as the hostname pattern does not match.  So because you are filtering out the sub-domain (by including the TLD) you would only see the homepage and not the pages on the subdomains. 

 

In essence, the filter is applied hit by hit, does that make sense?  

 

Best,

 

Theo

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Comparing TLD Traffic to Subdomain Traffic

Follower ✭ ✭ ☆
# 5
Follower ✭ ✭ ☆

Ah-ha! Now I understand. Very clear and precise explanation. Now, if I wanted to use segments instead of views, would I exclude sessions or users? Would I exclude by Page? I've been fiddling around with segments and nothing seems to be working. Maybe a regex is needed, and should be applied to Pages? I don't see 'subdomains' or 'hostnames' available.

Comparing TLD Traffic to Subdomain Traffic

Rising Star
# 6
Rising Star

Hey Andrew,

 

Segments will work fine.  Hostname is an available dimension for segmentation.  That said, you need to be collecting these hits somewhere.  If you only have one view and it has the filter applied that you mentioned... all of those hits from the sub domains would be permanently discarded.

 

To use hostname, you'll need to go to Advanced>>Conditions in the segment builder.  You can include or exclude and you would use either sessions or users based upon what kind of data you wanted.  Based on what you described, you'll probably want session.

 

Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Comparing TLD Traffic to Subdomain Traffic

Explorer ✭ ✭ ✭
# 7
Explorer ✭ ✭ ✭

Theo,

I have hard time to digest if some one excluded the whole traffic from the reporting views from subdomains to only see tld traffic how only  sessions count page views not?

I think if we exclude it will also exclude sessions and page views both.

If you have time i am interested to have a chat regarding this as I am new on this

Comparing TLD Traffic to Subdomain Traffic

Rising Star
# 8
Rising Star

Hey Soumik,

 

The pageview and sessions would be excluded if they matched the pattern.  In this example the session begins with the pageview on the TLD and is included in the view.  Once subsequent hits happen on the sub domain, they are thrown out by the filter.  The first hit on the TLD remains and the session would likely expire in 30 minutes (unless the user returned to the TLD).  

 

Think if you had an interstitial page on example.com and the only thing a user could do was click a link to mysite.com and continue.  You own both domains and have GA tracking on each with an include hostname filter.  There is no reason for GA to throw out the session just because the user continued to a site that did not match the hostname pattern, right? 

 

 

 

Hope that helps!

 

Cheers,

 

Theo

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Comparing TLD Traffic to Subdomain Traffic

Explorer ✭ ✭ ✭
# 9
Explorer ✭ ✭ ✭

Yes I understand suppose i have a website domain.com and another sudomain called mysubdomain.domain.com now both have same GA code installed in it.If i put a link on domain .com which leads to mysubdomain.domain.com I suppose session will count beginning form domain.com and also the pageviews.Now if i implement host name filter view only to include traffic from my domain.com i can only see page views and sessions of only domain.com But if i create a roll up property or an unfiltered view where there is no filter i can see both data from my domain and my sumdomain.Am i right?

Comparing TLD Traffic to Subdomain Traffic

Rising Star
# 10
Rising Star

Yes!  Correct.

 

Best,

 

Theo

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn