Table of Contents
- 0.1 What Is Subdomain Tracking?
- 0.2 Good News: GA4 Tracks Subdomains Automatically
- 0.3 Step-by-Step: How to Set Up Subdomain Tracking
- 0.4 Step 2 — Install GTM on All Subdomains
- 0.5 Step 3 — Verify Cookie Sharing
- 0.6 Step 4 — Test in GA4 DebugView
- 0.7 Step 5 — Fix Self-Referral Issues (If Needed)
- 0.8 Fix:
- 0.9 How to View Subdomain Data in GA4
- 0.10 Method 1 — Use “Hostname” Dimension
- 0.11 Method 2 — Use Page Location
- 0.12 Method 3 — Create Custom Reports
- 0.13 Common Subdomain Tracking Mistakes
- 0.14 ❌ Using Different GA4 Properties
- 0.15 ❌ Not Installing GTM on Subdomains
- 0.16 ❌ Seeing Self-Referrals
- 0.17 ❌ Different Cookie Values
- 1 When You DO Need Cross-Domain Tracking
- 2 Real-World Insight (From Marketers)
- 3 Best Practices for Subdomain Tracking
- 4 Final Thoughts
If your website uses multiple subdomains like:
- blog.yoursite.com
- shop.yoursite.com
- app.yoursite.com
Then one question becomes critical:
👉 Are you tracking users correctly across all of them?
Because if not, your data may show:
- Duplicate users
- Broken sessions
- Incorrect attribution
The good news?
GA4 makes subdomain tracking much easier than before.
In this guide, you’ll learn:
- How subdomain tracking works in GA4
- Whether you need to configure anything
- Step-by-step setup
- Common issues and fixes
What Is Subdomain Tracking?
Subdomain tracking means measuring user behavior across different subdomains under the same main domain — as one continuous journey.
Example:
User flow:
- Visits → blog.example.com
- Then → shop.example.com
- Then → checkout
👉 Ideally, this should be tracked as one session, one user, one journey
Without proper tracking, GA4 might treat this as multiple users or sessions — breaking attribution.
Good News: GA4 Tracks Subdomains Automatically
Unlike Universal Analytics, GA4 handles subdomain tracking out of the box.
👉 As long as:
- You use the same GA4 Measurement ID
- Tracking is installed on all subdomains
GA4 will track users across subdomains correctly.
Why This Works
GA4 uses first-party cookies that are shared across subdomains.
So when a user moves from:
- blog.example.com → shop.example.com
The same cookie is used, keeping:
- User identity
- Session continuity
Step-by-Step: How to Set Up Subdomain Tracking
Even though it’s automatic, you still need to configure things correctly.
Step 1 — Use the Same GA4 Measurement ID Everywhere
This is the MOST IMPORTANT step.
👉 Install the same GA4 tag on:
- Main domain
- All subdomains
❌ Wrong:
- Separate GA4 properties for each subdomain
✅ Correct:
- One GA4 property
- One data stream
- One Measurement ID




Show GA4 Measurement ID in Admin → Data Stream
Step 2 — Install GTM on All Subdomains
Make sure your Google Tag Manager container is present on:
- blog.yoursite.com
- shop.yoursite.com
- main site
👉 Without GTM installed, no data will be tracked.
Step 3 — Verify Cookie Sharing
Open browser developer tools:
- Go to Application → Cookies
- Look for _ga cookie
👉 Check:
- Cookie domain = .example.com
- Same value across subdomains
This confirms GA4 is tracking users correctly.



Step 4 — Test in GA4 DebugView
- Enable Preview mode in GTM
- Navigate across subdomains
- Open GA4 → DebugView
👉 You should see:
- One user session
- Continuous event flow
Step 5 — Fix Self-Referral Issues (If Needed)
Sometimes GA4 shows your own subdomain as a referral source.
👉 Example:
- blog.example.com → referral
This breaks attribution.
Fix:
Go to:
- Admin → Data Streams
- Configure Tag Settings
- List unwanted referrals
Add:
example.com
This prevents self-referrals.




Show referral exclusion settings
How to View Subdomain Data in GA4
Here’s where many marketers get confused.
By default, GA4 doesn’t clearly show subdomains.
Method 1 — Use “Hostname” Dimension
- Go to Reports
- Add secondary dimension → Hostname
👉 This shows:
- blog.example.com
- shop.example.com
Method 2 — Use Page Location
This shows full URLs including subdomains.
Example:
https://blog.example.com/article
Method 3 — Create Custom Reports
Best approach for clarity:
- Go to Explore
- Add dimension: Hostname
- Add metrics: Users, Sessions
👉 This gives full subdomain performance view
Common Subdomain Tracking Mistakes
❌ Using Different GA4 Properties
This causes:
- New sessions when switching subdomains
- Broken attribution
❌ Not Installing GTM on Subdomains
No tag = no tracking
❌ Seeing Self-Referrals
Fix with referral exclusion list
❌ Different Cookie Values
This indicates:
- Incorrect setup
- Separate measurement IDs
When You DO Need Cross-Domain Tracking
Important clarification:
👉 Subdomains ≠ Cross-domain tracking
You only need cross-domain tracking when:
- example.com → differentdomain.com
Subdomains are handled automatically in GA4.
Real-World Insight (From Marketers)
A common issue seen in practice:
Tracking works in GTM… but not in GA4
This usually happens because:
- GA4 Measurement ID is missing on subdomain
- Or different properties are used
Best Practices for Subdomain Tracking
✔ Use one GA4 property
✔ Use one data stream
✔ Install GTM everywhere
✔ Test with DebugView
✔ Monitor referrals
✔ Use hostname in reports
Final Thoughts
Subdomain tracking in GA4 is much simpler than before — but only if implemented correctly.
Most issues don’t come from GA4 limitations…
👉 They come from setup mistakes.
When configured properly, GA4 gives you:
- Unified user journeys
- Accurate attribution
- Better conversion insights
And that’s exactly what modern marketing depends on.
👉 “Struggling with tracking across subdomains? At Incisive Ranking, we help businesses implement clean, accurate GA4 and GTM setups that actually reflect real user journeys.”

