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

Creating Filters to Track Subdomains

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

The website I am working on has a primary domain and 6 subdomains that I wish to track in Google Analytics. To set this up, I have created new views for each subdomain (adding the primary domain as the URL in View Settings) and added a filter to each.  I created a "predefined filter" which "include only" "traffic to the hostname" "that contains" [my subdomain]




Each subdomain is tracking very view sessions per day and sessions aren't showing in the Real Time view.  My question is, did I set these up correctly and if not, how would I adjust them so they start tracking correctly?


Thank you!

1 Expert replyverified_user
Marked as Best Answer.
Accepted by topic author Rachel J
November 2015

Re: Creating Filters to Track Subdomains

Top Contributor
# 2
Top Contributor
Hi Rachel,

this is how the filter should look like - :
Custom filter: Include Hostname
Expression: ^sub\.domain\.com$

Jus change the sub, domain and com with your own values - filters may need some time to be applied. Real time for new views may need some time to work as well.

Check if there are no additional filters applied. Check if you do use some Analytics blockers such as opt out extension, ghostery, adblock or similar.

Implementation can be checked only in case if you post the site address.

Kind regards,
Web analyst @

Re: Creating Filters to Track Subdomains

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thank you Zorin! This is very helpful. I will create a custom filter for each of the subdomains.

Re: Creating Filters to Track Subdomains

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

I am facing the same problem..kindly help me with this in details.

What is this ? ^sub\.domain\.com$
I have a website (For Example) and a subdomain

How can I track both ?