# Cross-domain tracking with Google Tag Manager

> Configure cross-domain measurement via Google tag domain settings and Conversion Linker so sessions stay intact across checkout hosts. Nov 2026.

Source: https://mentionx.ai/learn/gtm/gtm-cross-domain-tracking  
Author: Dipuck Jones, founder of MentionX  
Updated: 5 November 2026  
Level: Practitioner

**Cross-domain tracking keeps a user journey intact when someone moves from your site to another domain you own or control (marketing site → shop subdomain on another root, or to a SaaS checkout host). Without it, GA4 and Ads may see a new user mid-funnel. Configure domains in the Google tag and verify the `_gl` linker parameter.**

> **Key takeaways**
>
> - List every domain in the journey under Google tag "Configure your domains".
> - Conversion Linker can auto-link domains for Ads click data.
> - Verify `_gl` appears on the destination URL after click.
> - Exclude payment providers you do not control carefully — some should be referral exclusions instead.

*Checked 5 November 2026 (CET) against Google Tag Manager Help, Google tag platform developer docs, Google Ads Help, Analytics Help and Meta Business Help where cited. Google Tag Manager, GA4 and Ads UIs change often, so confirm labels in your own accounts. "Our view" marks MentionX opinion. Ledgerline is a fictional company used for illustration.*

## The problem in one story

User lands on `www.brand.com` from a Google Ad, browses, then checks out on `pay.partner-checkout.com`. Without linking, the purchase may look like a new direct or referral session, breaking attribution and confusing Smart Bidding.

Google’s cross-domain docs explain that tags decorate outbound URLs with a `_gl` parameter and the destination tag reads it to restore first-party cookies.

## Configure domains on the Google tag

Per Google Tag Manager / Google tag settings Help:

1. Open Google tag settings → **Configure your domains**.
2. Add conditions for each domain in the journey (`brand.com`, `partner-checkout.com`).
3. Save.
4. Ensure both domains load compatible Google tags / GTM containers that accept linker params.

Accept recommendations when Google detects related domains — but still verify manually.

## Conversion Linker auto link

In the Conversion Linker tag, enable linking across domains and list **Auto Link Domains**. That appends linker parameters to matching outbound links. Optional: decorate forms if POSTs navigate across domains.

## Referral exclusions vs cross-domain

Different tools:

- **Cross-domain:** stitch identity across domains you measure as one journey.
- **Unwanted referrals / referral exclusions:** prevent gateways (PayPal, login SSO) from appearing as referrers when they should not restart attribution.

You often need both. See also GA4 referral settings discussions in the [GA4 track](https://mentionx.ai/learn/ga4/ga4-for-marketers).

## QA checklist

1. From domain A, click to domain B.
2. Confirm destination URL contains `_gl=`.
3. Confirm page loads (rare server issues with long query strings — Google documents troubleshooting).
4. In GA4 DebugView, confirm the same client seems continuous (session debugging takes care).
5. Test primary buttons and key CTAs, not only a footer link.

Linker parameters expire quickly (Google notes a short expiry window measured in minutes), so they are added at click time.

## Worked example: Ledgerline

*Ledgerline is a fictional accounts-payable software company. Details are illustrative.*

Ledgerline used a billing vendor on `billing.ledgerline-pay.com`. Paid conversions looked like referrals from the billing host. They added both domains to Google tag domain config, enabled Linker auto-link, and added the billing host to unwanted referrals as appropriate. Assisted conversion paths started showing the original Google Ads click again.

### Walkthrough

1. List every hostname in the signup → pay → success path.
2. Add them to Configure your domains.
3. Update Conversion Linker auto-link list.
4. Publish to staging; click through with Tag Assistant recording.
5. Confirm `_gl` and conversion attribution on a test click.

> **Pro move:** keep a diagram of domains in the container notes — new microservices hosts appear quietly.

## Third-party checkouts you do not control

If the destination cannot install your Google tag, true cross-domain stitching may be impossible. Options then: payment provider integrations, gateway referral exclusion plus careful campaign tracking, or server-side matching later. Be honest in reporting about the limitation.

## Form POSTs across domains

If a form POSTs to another domain, enable decorate forms on the Linker where applicable and test. GET navigations are easier to verify because you can see `_gl` in the address bar.

## Debug recipe

1. Clear cookies.
2. Land on domain A with a fresh `gclid`.
3. Navigate to domain B via the primary CTA.
4. Confirm `_gl` present.
5. Complete conversion on B.
6. Confirm Ads/GA4 attribution still knows the click.

## Linker configuration details

In the Google tag / Conversion Linker settings, list domains that should receive linker parameters. Include bare domains and `www` variants intentionally. Forgetting `www` vs apex is a classic break: users bounce between both and stitching fails half the time.

## When `_gl` is stripped

Security tools, email scanners, and some redirectors strip query parameters. If marketing automation wraps links, test the full redirect chain. Intermediate domains that are not linker-aware will drop `_gl`.

## Referral exclusion vs linking

Excluding a payment domain as a referral in GA4 prevents the payment host from showing as the source — useful, but it is not the same as preserving the original campaign click across domains. You often need both: linker for user stitching and referral exclusion for clean source reports ([GA4 referrals lesson](https://mentionx.ai/learn/measurement/ga4-custom-channel-group-ai-referrals) patterns still apply to channel design).

## Subdomains

`shop.example.com` and `www.example.com` usually share cookies if the cookie domain is set to `.example.com`. Confirm Google tag cookie configuration. Subdomains are easier than separate root domains — do not over-engineer Linker if a cookie-domain fix suffices.

## iFrames and embedded checkouts

If checkout is an iframe from another domain, Linker decoration on top-level clicks may never touch the iframe navigation. Options: vendor-native GA4 integration inside the iframe app, postMessage bridges designed with engineering, or accepting broken stitching and using server-side order matching. Be explicit in dashboards when iframe checkout means campaign→purchase is probabilistic.

## Login walls across domains

SSO flows that bounce through `auth.example.com` need that host in the linker domain list too. Otherwise the auth hop drops `_gl` before the app domain loads. Map the full redirect graph once with a network waterfall and a test Google click.

## Step-by-step linker QA script

1. Note domains in scope (example: `www.ledgerline.example`, `app.ledgerline.example`, `checkout.ledgerline.example`).
2. Confirm Google tag / Linker domain list includes each host you navigate across.
3. Open an incognito window; disable extensions.
4. Click a test ad or manually append a dummy `gclid=testdebug001` on domain A (understand Ads may ignore fake gclids for reporting — you are testing decoration behaviour).
5. Navigate via the real CTA to domain B.
6. Confirm the URL on B contains `_gl=` (or that first-party cookies continued on subdomain without needing `_gl`).
7. Complete a test conversion on B.
8. In GA4 DebugView / Ads diagnostics, confirm the session is not a brand-new (direct) dead-end if you expected campaign continuity.
9. Record pass/fail in the inventory sheet with date.

## WWW and HTTPS redirects

If `http://example.com` → `https://www.example.com` redirects strip query params incorrectly, `_gl` dies before GTM runs. Test the redirect chain with query strings. Fix redirects at the edge (CDN/load balancer) — GTM cannot recover parameters that never arrived.

## Linker and consent together

Conversion Linker and Google tag linking still respect consent. If `ad_storage` is denied, advertising identifiers may not persist as they would under grant — which is intended. When debugging cross-domain Ads attribution, always re-test on a grant path. A deny-path "failure" is often compliance working correctly, not a broken domain list. Document both outcomes in QA notes so media buyers do not "fix" consent to chase attribution.

## App deep links and store redirects

If a CTA sends users to an app store or opens an app via deep link, browser GTM cross-domain linking will not stitch that journey the way web-to-web `_gl` does. Measure app conversions with the appropriate SDK / Firebase / AppsFlyer-style stack and accept a break in the web session. Trying to force Linker onto store URLs wastes time — document the handoff as a known measurement boundary for media buyers.

## Try it yourself

Map your funnel hostnames. If more than one registrable domain appears, schedule cross-domain QA this week.

## Quick quiz

**1. What query parameter should appear on linked destination URLs?**

*Answer:* `_gl`.

**2. Are `www` and bare domain different registrable domains?**

*Answer:* Usually the same registrable domain; still list what you actually use and test redirects.

**3. Cross-domain vs referral exclusion?**

*Answer:* Cross-domain stitches identity; referral exclusion stops unwanted referrer resets.

## What should you check before the next lesson?

- Domain list complete.
- `_gl` verified on a real click path.

Previous: [Ecommerce data layer](https://mentionx.ai/learn/gtm/gtm-ecommerce-data-layer). Next: [Debug with Preview and Tag Assistant](https://mentionx.ai/learn/gtm/gtm-debugging-preview-tag-assistant). Or return to the [GTM for Marketers track](https://mentionx.ai/learn/gtm/gtm-for-marketers).

## Common questions

**When needed?** Multi-domain journeys under your measurement.

**Subdomains?** Usually not "cross-domain" in the registrable sense.

**`_gl`?** Linker parameter for cookie restoration.

## Sources

- Google Tag Platform, [Measure activity across multiple domains](https://developers.google.com/tag-platform/devguides/cross-domain)
- Google Tag Manager Help, [Conversion linker](https://support.google.com/tagmanager/answer/7549390)
- Google Tag Manager Help, [Configure your Google tag settings](https://support.google.com/tagmanager/answer/12131703)
- All accessed 5 Nov 2026.

## Frequently asked questions

### When do I need cross-domain tracking?

When a single journey spans multiple root domains (for example marketing site + checkout vendor) and you need one user/session story.

### Is subdomain tracking cross-domain?

Usually no. Subdomains of the same site are typically handled by cookie domain settings; cross-domain is for different sites.

### What is the _gl parameter?

A linker parameter appended to URLs so the destination can restore first-party measurement cookies.

---

Written and reviewed by Dipuck Jones for MentionX Learn. The HTML version of this page: https://mentionx.ai/learn/gtm/gtm-cross-domain-tracking
