Sub-domain Tracking in Google Universal Analytics

Feel weary trying subdomain tracking in Google Analytics? Upgrade to Universal Analytics and get it done in two easy steps.

Nothing stuff! As in Google Analytics, you neither configure nor customize the tracking code for measuring traffic to multiple subdomains. Universal Analytics standard tracking code is already customized for tracking traffic to sub-domains. All you have to do is create a filter for viewing traffic to all domains from the single profile and second filter for showing full path.

You may also create separate views for each sub-domain (recommended).

Show full path

By default, Google Analytics shows the home page as forwarding slash ‘/’. This makes you difficult to distinguish between multiple subdomains. It is even confusing when there are pages with the same URL path.

Suppose, you have the blog page of your main domain and your subdomain blog URL as

Analytics will display the above pages as /about-us/. You may not be able to identify which domain the about-us page belongs to.

To overcome this, you want to create a filter that will display the full URL.

  • Go to Admin
  • Click Filters
  • Choose New Filter and provide the filter a name.
  • Choose Custom Filter and select Advanced on the Filter type settings.
  • Under Advanced settings:
  • Field A should be set to Hostname
  • Field B should be set to Request URI
  • Output To –> Constructor to Request URI
  • Set the values for both Field A and Field B to (.*), which is an expression that captures all characters.
  • Set $A1$B1 as the value for Output To –> Constructor field.



If you want to only display the full path of a particular subdomain, the provide the website domain as value to Field A   Hostname

Creating Views

By setting up views, you can see the traffic reporting separately for each subdomain.

  • Go to Admin → Views
  • Click on the drop-down arrow and select Create new view
  • Provide a name to the view eg: SubDomain
  • Now, you need to apply a filter so that only the traffic to the specific subdomain
  • Choose Filters à New Filter
  • Provide filter name say: Traffic to the only Subdomain
  • Choose the Pre-defined filter and choose from the drop down Include only à traffic to the hostname à that contain
  • Set value to the Hostname as

Done! Repeat the same for each subdomain.

Need a hand? Send me to

Digital Media Planner and Inbound marketing specialist at Reach360 Digital with an established background working in the online marketing and advertising industry. She has proven skills in SEO, social media management, lead generation, content strategy, web strategy and Online Reputation Management (CRM). When she’s not researching the latest online marketing trends, you can find her in her Karate Dojo at home or singing on Smule!
Post Created 2

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Begin typing your search above and press enter to search. Press ESC to cancel.

Back To Top