By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
marketing-data-engineer-logo-white marketing-data-engineer-logo
  • Home
  • Google Tag Manager
  • Marketing Analytics
  • Data Visualization
  • Data Engineering
  • About
Reading: How to Set Up Cross-Domain Tracking with Google Tag Manager
SUBSCRIBE
Marketing Data EngineerMarketing Data Engineer
Aa
  • Google Tag Manager
  • Marketing Analytics
  • Data Visualization
  • Data Engineering
  • About
Search
  • Home
    • Marketing Analytics
    • Data Analytics
    • Data Engineering
  • About
Have an existing account? Sign In
Follow US
  • Home
  • Web Analytics
  • Google Analytics
  • Data Engineering
  • About
© Foxiz News Network. Ruby Design Company. All Rights Reserved.
Marketing Data Engineer > Google Analytics > Google Tag Manager > How to Set Up Cross-Domain Tracking with Google Tag Manager
Google AnalyticsGoogle Tag Manager

How to Set Up Cross-Domain Tracking with Google Tag Manager

zingermk@gmail.com 5 Min Read
Share
online-store-website
SHARE

If you run a small business with multiple websites or checkout platform you might be missing key insights in your Google Analytics 4 (GA4) reports.

Contents
What Is Cross-Domain Tracking And Do You Even Need It?Let’s break it down with an example: Quick Checklist: Do You Need Cross-Domain Tracking?What You'll Need Before You StartStep-by-Step: How to Set Up Cross-Domain Tracking in GTMStep 1: Add Domains to Your GA4 Configuration Tag in GTMStep 2: Add Domains in GA4 Admin SettingsStep 3: Enable Auto Link DomainsHow to Test If It's WorkingOption 1: Use GTM Preview ModeOption 2: Use Tag Assistant in ChromeTroubleshooting: Common Issues and Fixes❌ Sessions Still Splitting?❌ Referral Traffic Showing Up From Your Own Site?❌ Page Paths Look Broken?Real-World Example: Online Shop & External Checkout

 

Ever notice your traffic numbers don’t add up? Or that visitors suddenly become “new users” halfway through their journey?

That’s where cross-domain tracking comes in.

 

And don’t worry, it sounds more technical than it really is. I’ll guide you through the process using Google Tag Manager (GTM), real-life examples, and step-by-step instructions you can follow today.

What Is Cross-Domain Tracking And Do You Even Need It?

Cross-domain tracking connects user sessions across multiple domains so Google Analytics sees them as one journey, not separate visits.

 

Let’s break it down with an example:

 

You own a service business and your main website is:

 

www.mybookstore.com

 

You take bookings through a third-party system like:

 

mybookstore.bookingplatform.com

 

Without cross-domain tracking, GA4 sees this as two separate users and two sessions even though it’s the same person!

That means:

 

  • Your source/medium attribution gets lost
  • Your funnels break
  • Your conversion data is incomplete

 

Quick Checklist: Do You Need Cross-Domain Tracking?

✅ You send users between two or more different domains

✅ You use third-party platforms for checkout or forms

✅ You want clean attribution and complete user journeys in GA4

 

If you said yes to any of these—you’re in the right place!

What You'll Need Before You Start

Before we dive in, here’s what you’ll need:

 

  • Access to Google Tag Manager (GTM)
  • Access to your GA4 account
  • A list of all domains you want to track
  • (Optional) Chrome + Tag Assistant Extension for testing

Step-by-Step: How to Set Up Cross-Domain Tracking in GTM

Step 1: Add Domains to Your GA4 Configuration Tag in GTM

  1. Open Google Tag Manager

  2. Go to Tags → GA4 Configuration

  3. Under Fields to Set, add:

    • Field Name: allowLinker → Value: true
    • Field Name: linker → Value: { 'domains': ['domain1.com', 'domain2.com'] }

    Replace domain1.com and domain2.com with your actual domains.

Step 2: Add Domains in GA4 Admin Settings

  1. Go to GA4 → Admin → Data Streams
  2. Click your data stream
  3. Scroll to Tagging Settings → Click Configure your domains
  4. Add all domains you want to track, like:

www.mybookstore.com

booking.mybookstore.com

 

Step 3: Enable Auto Link Domains

 

If you didn’t do it manually in GTM, GA4 can try to auto-decorate links:

  1. In GA4 → Admin → Data Stream
  2. Under Tagging Settings, enable Cross-domain auto linking

Manual setup is more reliable, especially if you have embedded forms or iframes.

How to Test If It's Working

Now that you’ve set it up, let’s test it to make sure it works.

 

Option 1: Use GTM Preview Mode

  • Click Preview in GTM
  • Enter your main website URL
  • Navigate through to the second domain
  • Make sure the GA4 configuration tag fires properly

Option 2: Use Tag Assistant in Chrome

  • Install the Google Tag Assistant
  • Start recording
  • Click from one domain to the next
  • Check that the client ID stays the same in both GA4 hits

Troubleshooting: Common Issues and Fixes

❌ Sessions Still Splitting?

 

  • Double-check that allowLinker is set to true in GTM
  • Verify that you added all domains in both GTM and GA4

❌ Referral Traffic Showing Up From Your Own Site?

 

  • Go to GA4 → Admin → Data Settings → Traffic definitions
  • Add your domains under List unwanted referrals

❌ Page Paths Look Broken?

 

  • Consider setting a custom dimension to track full URLs

Real-World Example: Online Shop & External Checkout

Let’s say you run an ecommerce store:

 

  • Main domain: www.handmadebyjen.com
  • Checkout: checkout.shopify.com

Without cross-domain tracking, you won’t know which Instagram ad drove the sale—because GA4 loses the referral data as soon as someone moves to checkout.shopify.com.

Once cross-domain tracking is properly set up, you can follow that visitor from Instagram → product page → checkout → purchase in one seamless report.

Congrats! You just leveled up your GA4 tracking with cross-domain setup using Google Tag Manager.

 

Now you’ll be able to:

 

  • Accurately track full user journeys
  • Improve your marketing attribution
  • Make better data-driven decisions

zingermk@gmail.com 06/18/2025
Share this Article
Facebook Twitter Email Copy Link Print
Previous Article url-code-tracking-with-utm-codes 5 UTM Tracking Mistakes That Kill Your Campaign Insights
Next Article AI Overview is Changing Search, Here’s How to Track Your Traffic with UTM codes
Leave a comment Leave a comment

Leave a Reply Cancel reply

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

Facebook Like
Instagram Follow
- Sponsored-
Ad image

You Might Also Like

Google-Tag-Manager-Trigger-Setup
Google AnalyticsGoogle Analytics 4Web Analytics

Tracking Custom Events in GA4: A Beginner’s Guide to Getting Started

Measuring user engagement and behavior on your website is now…

9 Min Read
Google Analytics 4 Events Report
Google AnalyticsGoogle Analytics 4Web Analytics

Boost Your Bottom Line: How Events in GA4 Can Help Your Business

In today's data-driven landscape, you must leverage advanced analytics to…

8 Min Read
Google-Analytics-Create-Account
Google AnalyticsGoogle Analytics 4

Setting Up GA4 to Optimize Your Marketing Strategy

Drive Business Success with Data Insights: A GA4 Setup Guide…

7 Min Read
data-analytics-dashboard
Google Analytics

Boost Your Business: How Google Analytics 4 Can Enhance Your Marketing Strategy

Are you leveraging the full potential of Google Analytics 4…

5 Min Read
Marketing Data EngineerMarketing Data Engineer
Follow US

© Marketing Data Engineer. All Rights Reserved.

  • Cookie Policy
  • Privacy Policy
marketing-data-engineer-logo
Welcome Back!

Sign in to your account

Lost your password?