* All product/brand names, logos, and trademarks are property of their respective owners.
In today’s data-driven world, tracking user behavior across your entire digital ecosystem is crucial especially if your business runs on multiple domains. Whether you're managing a website with a separate blog, a checkout process hosted elsewhere, or multilingual versions spread across different URLs, you need a way to connect user sessions across all domains. That’s where cross-domain tracking in GA4 comes into play.
With the release of Google Analytics 4 (GA4), the way we handle cross-domain tracking has evolved. GA4 is more powerful and flexible than Universal Analytics, but it also introduces new challenges particularly around session continuity, referral exclusion, and configuration. The good news? Once set up correctly, GA4 allows you to seamlessly track users as they navigate from one domain to another, giving you accurate insights into user journeys, conversions, and campaign performance.
Let’s take a common real-world example in Pakistan: Imagine you're running an online clothing store your main site is hosted on mystore.pk
, your blog is on blog.mystore.pk
, and your payment processing is handled on a secure third-party domain like checkoutpartner.com
. Without cross-domain tracking, GA4 would treat each domain visit as a new session breaking the journey, skewing reports, and hurting attribution accuracy.
This guide is your complete, step-by-step walkthrough to setting up cross-domain tracking in GA4 the right way. We’ll start from scratch covering what it is, how to configure it (with or without Google Tag Manager), how to test if it’s working properly, and how to fix common issues like self-referrals.
Whether you’re a marketer, analyst, or business owner in Pakistan (or beyond), by the end of this guide, you'll be equipped to make smarter data-driven decisions with clean, connected analytics.
Before you jump into configurations, it’s important to lay the groundwork:
List All Domains You Want to Track
Write down every domain and subdomain where you want session continuity. For example:
www.mystore.pk
(main site)
blog.mystore.pk
(content hub)
checkoutpartner.com
(payment gateway)
Having clarity upfront prevents mistakes later.
Ensure GA4 Is Installed Everywhere
If you’re using the global site tag (gtag.js), it must be placed on all your domains.
If you’re using Google Tag Manager (GTM), make sure GTM is deployed across all domains.
Check Admin Access
You’ll need editor-level access in GA4 to configure settings and possibly container-level access in GTM.
Tip: Many Pakistani businesses outsource website management, so make sure you coordinate with your developer or agency before making changes.
GA4 gives you a direct way to set up cross-domain tracking. Here’s the exact process:
Go to Admin in your GA4 property.
Under Property, click Data Streams.
Choose your website data stream.
Scroll down to Configure Tag Settings.
Click Configure Your Domains.
Add all the domains you want to measure together. Example:
mystore.pk
blog.mystore.pk
checkoutpartner.com
Once you save, GA4 automatically appends the _gl parameter to URLs. This is what links sessions across different domains.
If you’re managing GA4 through Google Tag Manager, you’ll need an additional step:
Open your GTM container.
Edit your GA4 configuration tag.
Under Fields to Set, add:
Field Name: allowLinker
Value: true
Go to Cross-Domain Tracking and enter the list of domains you want tracked.
Publish your container.
Don’t forget to add these domains to the Referral Exclusion List in GA4. Otherwise, GA4 may treat traffic between domains as a referral, which breaks your session continuity.
Pro Tip: If your checkout is hosted on a third-party provider, always double-check that domain is included in your GA4 cross-domain settings. Many eCommerce stores in Pakistan lose accurate purchase attribution because of missed exclusions.
After setting up cross-domain tracking, testing is a must otherwise, you’re flying blind. Here’s how to confirm it’s working:
Use GA4 DebugView
Open your site in Chrome with Google Tag Assistant enabled.
Navigate across your domains (e.g., from mystore.pk
to checkoutpartner.com
).
In GA4’s DebugView, check whether your events are tied to the same user session.
Check the _gl Parameter
When you click from one domain to another, you should see a parameter like ?_gl=...
in the URL.
This is GA4’s way of linking sessions. If you don’t see it, something is misconfigured.
Look for Consistent Session Counts
Compare sessions before and after enabling cross-domain tracking.
If implemented correctly, you’ll notice fewer “new sessions” when users cross between your sites.
Even with proper setup, problems often show up in reports. Here are the most common ones:
Problem: Self-Referrals from Your Own Domains
Cause: You didn’t add all domains in GA4’s referral exclusion list.
Fix: Go to GA4 Admin → Data Stream → More Tagging Settings → List Unwanted Referrals. Add your domains here.
Problem: Sessions Breaking Between Domains
Cause: Missing or incorrect _gl parameter.
Fix: Double-check domain configuration in GA4 and GTM.
Problem: Checkout or Third-Party Tools Not Passing Parameters
Cause: Some platforms strip query parameters.
Fix: Contact your provider or use server-side GTM as a workaround.
Tip: In Pakistan, many payment providers use hosted checkout pages. Always test if those pages keep GA4 parameters intact. If not, you may need advanced setups like server-side tracking.
To ensure your data stays accurate over time:
Name Domains Clearly
Use clear and consistent naming for all tracked domains.
Exclude Query Parameters
If your site generates messy URLs with tracking IDs, exclude unnecessary parameters in GA4 settings.
Create Custom Reports for Cross-Domain Journeys
Use GA4’s Explorations to visualize how users move across domains.
Monitor Referrals Regularly
Check your traffic sources report for unusual referrals. If you see your own domains listed, you know something broke.
Audit Quarterly
Businesses evolve new subdomains, new landing pages, new payment providers. Review your GA4 setup every few months to avoid data gaps.
Not all businesses operate under a single website. Many have:
A main brand site (e.g., brandname.pk
)
A blog on a subdomain (blog.brandname.pk
)
A store on a separate domain (brandstore.com
)
A checkout provider (checkoutpartner.com
)
Without cross-domain tracking, GA4 would split user activity into separate sessions for each property. By linking all domains, you get a complete picture of the user journey: from blog discovery → to product page → to checkout → to conversion.
Example: A Pakistani travel agency might run travelwithus.pk
for trip details, blog.travelwithus.pk
for stories, and process bookings via payments.travelpartner.com
. With GA4 cross-domain tracking, every click and interaction stays tied to one user session.
For most setups, the GA4 interface + GTM handles cross-domain tracking just fine. But in advanced cases, you may need additional tools:
Measurement Protocol
If your systems send backend events (e.g., CRM, booking system), use GA4’s Measurement Protocol to link user IDs and maintain continuity.
Server-Side GTM
If your checkout provider strips query parameters or blocks tracking scripts, server-side GTM ensures GA4 parameters still pass between domains.
This setup requires a cloud server but gives you more control, better privacy compliance, and cleaner data.
While many businesses in Pakistan don’t yet use server-side GTM, it’s worth considering if you run large-scale eCommerce or financial platforms.
E-Commerce Brand (Clothing Store)
Domain 1: shopfashion.pk
(storefront)
Domain 2: blogfashion.pk
(style blog)
Domain 3: checkoutpartner.com
(hosted payment)
Benefit: Sales attribution remains intact when customers discover a product via the blog, move to the store, and finally pay via checkout.
Educational Platform
Domain 1: courses.pk
Domain 2: lmsprovider.com
(external learning platform)
Benefit: User engagement, course sign-ups, and purchases all tracked under a single session.
Travel Business
Domain 1: travelwithus.pk
Domain 2: payments.travelpartner.com
Benefit: Accurate tracking of ad campaigns leading to final bookings without broken journeys.
Pro Insight: Adding User-ID tracking on top of cross-domain tracking gives even stronger results, letting you follow logged-in users across devices and domains.
Cross-domain tracking in Google Analytics 4 (GA4) isn’t just a “nice-to-have” it’s a necessity for businesses that operate across multiple websites, subdomains, or third-party checkout systems. Without it, your analytics becomes fragmented, your reports misleading, and your marketing decisions risky. With it, you gain a complete, connected view of the customer journey.
We’ve walked through:
The setup process inside GA4 and Google Tag Manager
How to test and troubleshoot common issues like self-referrals
Best practices to keep your reports clean
Advanced use cases such as server-side tracking and real-world examples from Pakistani businesses
The result? You’ll have a single source of truth in GA4 that shows how users move from one domain to another, where they convert, and how your campaigns perform end-to-end. This accuracy directly impacts your bottom line ensuring marketing spends are measured correctly and growth opportunities are never missed.
If you’re an eCommerce brand, an educational platform, or a service provider in Pakistan (or anywhere in the world), now is the time to ensure your GA4 is properly configured for cross-domain tracking.
Next Step for You: Audit your current GA4 setup today. If you find broken sessions, referral spikes, or incomplete journeys, follow this guide step by step to fix them. And if you’re ready to take things further, consider exploring User-ID tracking or server-side GTM for even cleaner, privacy-compliant analytics.
Your data is the foundation of your growth don’t let gaps in tracking hold you back.
11 September 2025
No comments yet. Be the first to comment!