Set Up Cross-Domain Tracking in GA4

Learn how to set up cross-domain tracking in GA4 to get a thorough view of a user's journey across domains

Once you set up cross-domain tracking in Google Analytics 4, it allows you to see sessions from two related sites (such as an e-commerce site and a separate shopping cart site) as a single session rather than two separate sessions.

Google Analytics uses 1st-party cookies to set an identifier for each unique user and session to a website.

Without cross-domain measurement , new cookies with new identifiers are set for each domain a user visits. Analytics count these new cookies with new identifiers as separate users with separate sessions.

With cross-domain measurement , the same identifiers are passed from one site to another via a URL parameter identified by the key '_gl:', for example: 'https://www.mysite.com/?_gl=1*abcde5*.'

How to Set up Cross-Domain Tracking in GA4?

For your Universal Analytics property, you used to configure cross-domain measurement via code (either in source code via analytics.js or gtag.js or via Google Tag Manager). For your Google Analytics 4 property, however, you can do this via the Admin page.

Follow the steps below to set up your cross-domain tracking:

Now that you have completed all the steps above;

Open a page of your site that contains a link or a form that points to a domain you configured for cross-domain measurement.

Then, click the link or submit the form to navigate to the destination domain.

Verify that the URL in the destination domain contains the linker parameter '_gl'; for example: - https://www.mysite.com/?_gl=1*abcde5*.

Table Of Contents