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

Get data from different subdomains in same property

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

Hi,

 

I m not sure how to do this, or even if it is possible. I want to track, on the same report :

https://subdomain2.mydomain.com

https://subdomain.mydomain.com

and https://mydomain.com/subdirectory

 

Meaning I want to have all the visits from https://subdomain2.mydomain.com, https://subdomain.mydomain.comand https://mydomain.com/subdirectory

added up on the same report.

 

I tried creating one common property (all the above have the same code) and adding 3 personnalized filters (2 subdomains and one subdirectory).

 

Yet it takes my visits down to 0.

What did I do wrong ?

 

Thank you very much Smiley Happy

 

1 Expert replyverified_user

Re: Get data from different subdomains in same property

Rising Star
# 2
Rising Star
Hi Yoann,

Your first step to commonly code the subdomains / subdirectories is correct. In fact, typically the entire site or pathway for a user journey should be commonly coded regardless of subdomains, etc.

No where you fell down is in your attempt to create a filtered view. Filters are cascading, that is the output of the first applied filter is fed to the 2nd filter and the output of the 2nd to the 3rd, and so on.

In your case you are then adding a (it should be one filter) for the subdomains the result of which will be some dataset that does not include any data for the main site and the subdirectory. You are taking the "subdomain" data set and asking for only the maindomain/subdirectory pages but, alas, they have already been filtered out by your subdomain filter.

You can easily create a segment that gives you the data that you seek. More on segments here:
https://support.google.com/analytics/answer/3124493?hl=en#create

If sampling is a concern, then you need to come up with ONE common way. to lump those disparate pages. Normally, in a situation like this I recommend that you pass a virtual pageview/directory onto the subdomain pages so that you can use one common subdirectory filter.

Hope that helps!

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Get data from different subdomains in same property

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Yes thanks Theo that's clearer. Not sure what you mean by "I recommend that you pass a virtual pageview/directory onto the subdomain pages" though ; I tried to agregate this subdomain and subdirectory to the main domain by using segments in the "sequences" part (under "advanced") and playing with the OR operator but I do not find a way to combine trafic from subdomains / subdirectories there (shall I use behaviour > entrances ?).

Thanks for our answer(s) Smiley Happy

Re: Get data from different subdomains in same property

Rising Star
# 4
Rising Star
Hey Yoann,

So for your segment you don't necessarily need to use sequences unless you want to follow a particular pathing. In segments you can add conditions for the hostname matching your sub-domains and an or condition based on page for matching your sub-directory. (You'll need to do this in the Advanced>>Conditions section of advanced segments) If you do this, you will see all the other pages someone touches and you can further filter these out in your pages report but your audience, acquisition, and conversion reports will be spot on.

What I mean by virtual pageviews is that you can take https://subdomain.mydomain.com and prepend the URI with the subdirectory name e.g. subdomain.mydomain.com/subdirectory/ that way your one request URI filter will match both.

More on virtual pageviews here:
https://developers.google.com/analytics/devguides/collection/analyticsjs/pages#modifying_page_urls

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Get data from different subdomains in same property

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Thanks Theo for your answers Smiley Happy
So I created segments for my root domain, for my subdomain and for my subdirectory and if I look at the numbers of users on each segment, it shows different stats, which proves it works. Yet... If i have a look at "Content drilldown" and if I want to see all the content that a particular segment receives, for instance, i get these kind of results for the url /about-us/ :
I get 30 visits on the root domain, 26 on the subdirectory and 88 on the subdomain. Which does not make sense because the page /about-us/ only exists on the root domain (mydomain.com/about-us/ exists, but not subdomain.mydomain.com/about-us/ nor mydomain.com/subdirectory/about-us/).

What did I do wrong then ? Smiley Happy Thanks for your answer !

Re: Get data from different subdomains in same property

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭
Hey anyone has an idea (even a rough one) about this ? Thanks !!
Marked as Best Answer.
Solution
Accepted by topic author Yoann H
July 2016

Re: Get data from different subdomains in same property

Rising Star
# 7
Rising Star
Hey Yoann,

Sorry I missed your earlier response. I'm not sure how you are looking a your content drilldown -- I assume you have your segments applied. So with segments, you are asking for users or sessions (either is an option) that match your segment. This doesn't necessarily filter all hits based on that just users (and all their sessions) or the sessions where someone was on these pages. When you look at content reports you will see the entire sessions(s) including the hits from pages that aren't included in your segments. Put more simply: If a user starts at subdomain.mydomain.comand they will match your segment and you will see all of their pages in session in the content reports; including the hit that happened when they navigated to mydomain.com/about-us. To clean up the content reports, you could filter for the pages or groups you wnat to analyze, or you could pull in a secondary dimension and then use the advanced filter to filter for the hostname in which you have interest.

Hope that helps!

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Get data from different subdomains in same property

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭
Thanks a lot, really, for your help Theo. You are the best ! Smiley Happy

Re: Get data from different subdomains in same property

Rising Star
# 9
Rising Star
Cheers! Happy to help.

Best,

Theo
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn