Cross Domain Tracking in GA4 or Universal Analytics (GA3 or old Google Analytics) allows you to track multiple domains in one Google Analytics property and treat the user journey as if it is one domain.
Why do you need cross-domain tracking?
What does cross-domain tracking do?
Google Analytics uses first-party cookies to identify each user and session to a website/domain.
By default, without cross-domain tracking, new cookies are set for each domain a user visits. Analytics count these new cookies with new identifiers as separate users with separate sessions.
By using cross-domain tracking, the same cookie information is passed from one site/domain to another via a URL parameter identified by the key _gl:, thus attributing the visit to the same user as the user goes from one domain to another.
How do I add another domain to Google Analytics 4 for cross-domain tracking?
To set up cross-domain tracking follow these steps
- Go to the admin panel of the GA4 property.
- Click on Data Streams (under property)
- Click on the data stream that you want to enable cross-domain tracking for.
- On the next screen (streams details), scroll to the bottom and click on "More tagging settings"
- On the next screen (More tagging settings), click on "Configure Your Domains"
- On the next screen, click on "Add Conditions" and add your domains using one of the match types i.e. contains, exactly matches, regex, begins with or ends with.
- Once done, hit "Save"
- Your cross-domain tracking is ready. Make sure to use the same Measurement ID for both sites.
How do I know if cross-domain tracking is working?
Other Google Analytics 4 posts that might like
- GA4 Debug View: How To Enable and Use GA4 Debugger
- GA4 Segments Explained
- GA4 Audiences: How to create, edit, archive, and use Custom Audience
- Comparisons in Google Analytics 4 (GA4)
- 35+ Things About Google Analytics 4 That Will Make You Look Like a Genius
- How to Upgrade Google Analytics to Google Analytics 4 (GA4)?
- Google Analytics 4 (GA4) - Get Answers to Common Questions
Where to get more help with Google Analytics 4?
- Get your team ready for GA4 with this online self-paced course - Google Analytics 4 Masterclass
- Workshop - We offer onsite customized workshops. Reach out to us for more details.
- Consulting - We can get you up and running with Google Analytics 4 as well as train your and your team to use it effectively. Reach out to us for more details.
- Freelancers - Join our network and get support to help your clients with Google Analytics 4 and more.