Digital Marketing

How to Display Subdomains in Your Google Analytics Reports

Feb 5, 2025

How to Display Subdomains in Your Google Analytics Reports
How to Display Subdomains in Your Google Analytics Reports
How to Display Subdomains in Your Google Analytics Reports

Are you struggling to differentiate traffic between your website's main domain and its subdomains? If so, you’re not alone. Properly configuring subdomains in your Google Analytics reports can transform the way you analyze and understand your web traffic. This guide will walk you through setting up a hostname filter in Universal Google Analytics to ensure you accurately track and report on subdomains, making it easier to gain actionable insights from your data.

Why Displaying Subdomains in Google Analytics Matters

When your website includes multiple subdomains—such as blog.example.com or shop.example.com—Google Analytics can aggregate data under a single domain, which might obscure the true source of your traffic. Without clear separation, it can be challenging to identify how users interact with each subdomain and make informed decisions based on this data.

By displaying subdomains in your reports, you can:

●     Improve Data Accuracy: Understand traffic sources and user behavior on each subdomain individually.

●     Enhance Marketing Analysis: Tailor marketing strategies based on performance metrics specific to each subdomain.

●     Optimize User Experience: Identify which subdomains attract the most engagement and adjust content strategies accordingly.

Setting Up a Hostname Filter in Universal Analytics

Follow these steps to configure a hostname filter for subdomain tracking:

1. Access Your Google Analytics Admin Panel

●     Go to your Google Analytics Admin panel and sign in with your credentials.

2. Select the Correct Account, Property, and View

●     If you have multiple accounts, properties, or views, ensure you select the appropriate ones. Filters are applied at the view level, so it's crucial to choose the right view to avoid affecting your main data.

3. Add a New Filter

●     Click on Filters in the Admin panel.

●     Click Add Filter to create a new filter.

4. Configure Your Filter

●     Name Your Filter: Choose a descriptive name like "Subdomain Tracking Filter."

●     Filter Type: Select Custom from the filter type dropdown.

●     Filter Field: Choose Hostname from the dropdown.

●     Filter Pattern: For the field settings, use the following configuration:

○     Field A -> Extract A: (.*)

○     Field B -> Extract B: (.*)

○     Output To -> Constructor: $A1$B1

Example Filter Configuration:

5. Save Your Filter

●     Click Save to apply the filter to your view. You should now see the filter listed in your Filter table.

Important Considerations and Potential Impacts

Impact on Existing Data
Implementing a hostname filter can affect existing data:

●     Destination Goals: If you have goals using the "Equals to" or "Begins with" match type, they might be impacted. Update these goals to include your subdomain information if needed.

●     Custom Reports and Dashboards: Any custom reports or dashboards using the “Page” dimension might require adjustments to reflect the new filter settings.

Historical Data
This change will only apply to data collected after the filter is implemented. Historical data will remain unchanged. For continuity, consider applying this filter to a new view to preserve your existing data setup.

Verifying Your Filter

To ensure your hostname filter is working correctly, follow these steps:

1. Test the Filter

●     Open your website using Chrome.

●     Add the Google Tag Assistant Chrome Extension to your browser.

●     Click Record to start capturing data.

●     Refresh your page and then click Stop Recording.

●     Click Show Full Report.

Example of Tag Assistant Report:

2. Review the Google Analytics Report

●     Select Google Analytics Report from the full report options.

●     Choose the view you want to test and click OK.

●     In the report, scroll down to the Flow section.

●     Check Page Load 1 and Hit 1 to ensure the mutation subsection displays the correct transformation of your reported hits.

Best Practices for Subdomain Tracking

To optimize your subdomain tracking setup, consider these best practices:

1. Regularly Review Filter Settings

Periodically review your filter settings to ensure they continue to meet your tracking needs as your website evolves.

2. Maintain Accurate Goal Tracking

Update your goals and reports to align with the new filter settings to avoid disruptions in your analytics data.

3. Use Separate Views for Testing

Create separate views for testing filters and other changes. This approach helps you avoid unintended impacts on your primary analytics data.

4. Educate Your Team

Ensure that all team members responsible for analytics are aware of the filter changes and understand how to interpret the new data.

Conclusion

Displaying subdomains in your Google Analytics reports is essential for gaining accurate insights into traffic across your main domain and subdomains. By setting up a hostname filter, you can better understand user behavior on individual subdomains, which helps improve data accuracy, optimize marketing strategies, and enhance the overall user experience. When implementing this change, consider testing the filter in a separate view, updating goals and reports accordingly, and regularly reviewing filter settings to ensure consistent, reliable data. This approach will provide you with a more comprehensive view of your web traffic, enabling better decision-making.

Copyright © 2024 VirtualSherpa.com | All Right Reserved

Mikko Rosillon

Copyright © 2024 VirtualSherpa.com | All Right Reserved

Mikko Rosillon

Copyright © 2024 VirtualSherpa.com | All Right Reserved

Mikko Rosillon