Tracking Subdomains in Google Analytics

google_analyticsIn one of my recent project, a requirement for tracking subdomains via Google Analytics came up. If you are using Universal analytics, there is no need to make any changes to the JavaScript code. In this posts, we’ll learn the step by step procedure to track subdomains via GA.

Creating view

It is advised that you create a view for your subdomains without applying any kind of filter.

  1. Click on Admin tab after logging in.

Admin tab

  1. Click on Create a new view.

Create a new view

  1. Provide the Reporting View Name and click on Create View.

Create view

Adding Filter

  1. After creating the view, click on the Admin tab.
  2. Select the view in the dropdown menu and click on Filters.

Subdomain view

 

3. Now write the name of the filter and click on Custom tab.

  1. Select the Include radio button and configure it as per the image given below.

Sub domain filter

 

  1. Click on Save and you are done.

Testing the Configuration
1. Click on Home tab present in the top navigation.
2. Click on the view you created in the first part of this tutorial.
3. Click on Real-Time and then on Overview.
Realtime overview
 

 

  1. Now visit the subdomain page of your website.
  2. After a few seconds in the Google Analytics real-time section, you will see your subdomain listed in the Top Active Pages.

You may also like...

Leave a Reply

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