How to See Subdomain Traffic in Google Analytics 4
Seeing how much traffic your subdomains get in Google Analytics 4 can feel like a hidden feature, but it's essential for understanding your entire online presence. Unlike its predecessor, GA4 is built to track users across subdomains like blog.yourwebsite.com and shop.yourwebsite.com automatically with a single setup. This article will show you exactly how to find and analyze that subdomain traffic so you can see the complete picture of your user's journey.
Why You Need to Track Subdomain Traffic
First, what is a subdomain? It's a prefix added to your main domain name to organize different sections of your website. Common examples include:
blog.yourwebsite.com(for your blog)shop.yourwebsite.com(for your e-commerce store)app.yourwebsite.com(for your web application)support.yourwebsite.com(for your help center)
Tracking the traffic to these distinct areas is more than just a vanity metric, it’s fundamental to understanding your business performance. When you can see data for each subdomain, you can answer critical questions:
- How do users move between your properties? Do people read a blog post on
blog.yourwebsite.comand then navigate toshop.yourwebsite.comto make a purchase? Mapping this journey is impossible if your data is siloed. - Which content is most effective? You can analyze which blog posts are driving the most sign-ups on your main app or which support articles reduce customer service inquiries.
- What is the ROI of your content marketing? By tracking traffic from the blog to your main conversion pages, you can directly attribute revenue and leads to your content efforts.
- Are your marketing campaigns landing in the right place? If you're running ads to a landing page on a subdomain, you need to isolate its performance from the rest of your site's organic traffic.
Without a clear view of subdomain traffic, you're only seeing a fraction of the story and likely misinterpreting user behavior and campaign effectiveness.
How GA4 Handles Subdomain Tracking (The Good News)
If you remember wrestling with Universal Analytics, you’ll be happy to know that GA4 has made cross-subdomain tracking dramatically easier. In the old days, you had to manually configure settings like the "cookie domain" and update tracking code to make sure users weren't counted as new visitors every time they hopped from your blog to your main site.
Google Analytics 4 simplifies this with its "data stream" model. As long as you use the same GA4 measurement ID (e.g., G-XXXXXXXXXX) across your primary domain and all its subdomains, GA4 automatically recognizes them as part of the same website. It considers a user the same person whether they are on yourwebsite.com or blog.yourwebsite.com.
This "enhanced measurement" feature is enabled by default and does the heavy lifting for you. However, just because GA4 collects the data automatically doesn't mean it presents it clearly in its standard reports. The default views tend to lump all traffic together, hiding the very insights you need. The key is knowing which dimension to use to separate the traffic again: the Hostname dimension.
Viewing Subdomain Traffic: Two Step-by-Step Methods
Before you start, double-check that your setup is correct. The most crucial prerequisite is that the exact same Google Tag (with the same GA4 Measurement ID) is installed in the <head> section of every page on your primary domain and every subdomain you want to track. You can verify this by using the "View Page Source" feature in your browser or with the Tag Assistant Companion Chrome extension.
Once you've confirmed your setup, here are two effective ways to analyze your subdomain traffic.
Method 1: Customizing a Standard Report
This is the quickest way to get a simple breakdown of traffic by subdomain within the reports you already use. We'll use the Pages and screens report as an example.
- Navigate to the Pages report: In the left-hand menu of GA4, go to Reports > Engagement > Pages and screens.
- Add a Secondary Dimension: By default, this report shows metrics for each page path (e.g.,
/blog/my-first-post). To see which subdomain each page is on, click the blue plus-sign icon next to the primary dimension header ("Page path and screen class"). - Select the 'Hostname' Dimension: A search box will appear. Type "Hostname" and select it from the Platform / device category.
The report will now update to show two columns: "Page path" and "Hostname." You can now clearly see traffic metrics for each individual page and the subdomain it belongs to, like blog.yourwebsite.com or shop.yourwebsite.com. You can click on the "Hostname" column header to sort the data and group your subdomains together for easier analysis. To analyze the aggregate traffic for subdomains instead of individual pages, you can also switch the report's primary dimension to Hostname.
Method 2: Using the 'Explore' Section for a Deeper Dive
For more control, flexibility, and the ability to save your report for future use, the 'Explore' section is your best bet. Creating a custom 'Free form' exploration allows you to build a report from scratch that focuses exclusively on subdomain performance.
Building a Simple Hostname Report
- Open Explorations: In the left-hand GA4 menu, click on Explore.
- Start a New Exploration: Select the "Free form" template at the top.
- Import Dimensions: In the "Variables" column on the left, click the plus sign next to "Dimensions." Search for and import the following:
- Import Metrics: Next to "Metrics" in the same column, click the plus sign. Search for and import the metrics you care about, such as:
- Build the Report: Now, drag and drop the dimensions and metrics you imported into the "Tab Settings" column.
Instantly, a clean table will populate on the right, showing you a precise breakdown of your chosen metrics for each hostname (your main domain and each subdomain). This view is an excellent starting point for high-level analysis.
Advanced Analysis in an Exploration
The real power of Explore is the ability to dig deeper.
- Drill Down to Specific Pages: Drag
Page path and screen classinto theRowssection, right belowHostname. Now you can see the top-performing pages on each of your subdomains in one organized view. - Filter for Specific Subdomains: In the "Tab Settings" column, drag
Hostnameinto theFilterssection at the bottom. Configure the filter to "exactly matches" and enter the specific subdomain you want to analyze, such asblog.yourwebsite.com. This is great for creating a dedicated report for just your blog's performance. - Analyze traffic sources: Swap
HostnameforSession source / mediumin theRowsbox and keep your subdomain filter active. Now you can see which channels (organic, paid, social) are driving traffic specifically to your blog, not just your website as a whole.
Remember to give your exploration a name (e.g., "Subdomain Performance Report") so you can easily come back to it later.
Important Settings and Common Issues
To keep your subdomain data clean and accurate, there are a couple of additional things to keep in mind.
1. Set Up Referral Exclusions
One of the most common mistakes is not excluding your own domains from the referral traffic list. If you don't do this, GA4 might mistakenly start a new session when a user clicks a link from your blog to your main website. This breaks the user journey and incorrectly attributes the user to a "referral" from your own site!
Here's how to fix it:
- Navigate to the GA4 Admin section (the gear icon in the bottom-left).
- Under the "Property" column, select Data Streams and click on your website's data stream.
- Under "Google tag," click Configure tag settings.
- On the next screen, click Show all, then select List unwanted referrals.
- Under "Match type," select "Referral domain contains" and enter your main domain name (e.g.,
yourwebsite.com). Do not add subdomains likeblogorshop— simply adding the root domain will cover all of them.
This single setting tells GA4 to treat traffic moving between your subdomains as internal traffic, preserving the original source/medium and giving you a much more accurate view of attribution.
2. Understanding "(not set)" Hostname
In your reports, you might occasionally see (not set) in the Hostname dimension. This typically means GA4 recorded an event but couldn't associate it with a specific hostname. This often happens with data sent via the Measurement Protocol from a server where the hostname isn't specified, or in some cases with app data. A small amount of (not set) traffic is normal and usually not a cause for concern.
Final Thoughts
Tracking subdomain traffic in GA4 is simple once you know where to look. By ensuring all your properties share the same measurement ID and using the Hostname dimension in either a default or custom exploration report, you can finally unlock a complete view of how users interact with your entire brand online. This holistic data is crucial for making informed decisions, optimizing your marketing funnels, and proving the true value of your content.
Of course, even with GA4's improvements, creating custom reports and remembering where to apply the right filters can add friction to your weekly reporting process. With Graphed, we remove that step entirely. After connecting your Google Analytics account in a few clicks, you can just ask in plain English: "Show me a comparison of traffic to blog.yourwebsite.com vs shop.yourwebsite.com for this quarter." We instantly build a live dashboard for you, saving you from having to build and save custom reports every time a new question comes up.
Related Articles
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.