How to Set Up Cross-Domain Tracking in Google Analytics 4
If your customers travel across multiple websites before they convert and you have not set up GA4 cross-domain tracking, you could short-change your marketing campaigns.
Let’s say your display ad sends customers to mydomain.com, but they don’t convert on mydomain.com. They travel to myotherdomain.com and convert on this second website.
WITHOUT cross-domain tracking, conversions on myotherdomain.com will be attributed to the referring site mydomain.com, NOT the display ad campaign.
WITH cross-domain tracking, the conversion will be attributed to the display ad.
How Do I Set-up Cross-Domain Tracking in Google Analytics 4?
If you’re currently using Universal Analytics, setting up cross-domain tracking requires custom work in Google Tag Manager.
With GA4, it’s much simpler. You can set up cross-domain tracking using just the Google Analytics 4 user interface. No GTM set up work needed!
Thankfully the GA4 cross-domain setup process is fairly straightforward.
Note that you must have Editor access privileges.
1 – Click on your Admin settings button (The gear at the bottom left of the screen).
2 – Under the Property column, click Data Streams.
3 – Select the data stream for which you want to configure GA4 cross-domain tracking.
4 – Scroll down to where it says “Configure Tag Settings” and click.
5 – Next, click “Configure your domains”
6 – Click on “Add condition” to add the domains you want to track.
- Select the necessary match type, and enter the Domain in the field next to the Match Type.
- Add the domains your users and prospects traverse
- Your configuration should look like this:
7 – When you’ve added all the domains you want to include in cross-domain tracking, be sure to click the “Save” button on the top right.
8 – Always verify your work.
Confirm this is working by looking for the _gl query parameter appended to the second domain when you click through.
In this hypothetical example, clicking from mydomain.com to myotherdomain.com, should show:
myotherdomain.com?_gl=103e8abcd29437snduoe5
And vice versa. If I were to click from myotherdomain.com to mydomain.com, a _gl parameter should be appended to mydomain.com.
If this is what you see, congratulations! You’ve successfully implemented cross-domain tracking in Google Analytics 4.
How do I set up Sub-Domain Tracking?
In GA4, sub-domain tracking is automatically enabled across all subdomains with the same top-level domain.
Going through the process above is NOT necessary to enable GA4 cross-domain tracking across sub-domains.
For example, if users travel across:
- mydomain.com
- blog.mydomain.com
- portal.mydomain.com
… you only need to add mydomain.com using the “contains” match type.
You do not need to add either blog.mydomain.com or portal.mydomain.com.
We’ve verified this using Exploration reports with our GA4 clients.
Got questions? Drop us a comment, and describe your biggest challenge or frustration.
Other posts in our 12 Days of Google Analytics 4 series:
1.GA4 “Configure” is Moving to Admin
2.How to Set Up Cross-Domain Tracking in Google Analytics 4
3.Get Your Hands on Real GA4 Data Today with the Google Analytics 4 Demo Account
4.What is Engagement Time in GA4?
5.Why your GA4 Looker Studio Report is Broken
6.Did your Looker Studio GA4 Numbers Increase After Applying Filters?
7.How is Engagement Time Reported in GA4?
8.How Ecommerce Tracking in GA4 is Different from UA
9.How to Create and Modify Events in GA4
10.When to Use GA4 Rollups & Subproperties
11.What in GA4 replaces Universal Analytics’ Views? Hint: It’s NOT GA4 Data Streams
12.Why am I seeing blank rows or (not set) in my GA4 Landing Page Report?