Correctly collect all the traffic data that comes to the domains that are under your control and analyze how users interact across them in Google Analytics
To correctly implement and test cross-domain tracking in Google Analytics 4
Ideal outcome
You will be able to correctly collect all the traffic data that comes to the domains that are under your control and analyze how users interact across them
Why it matters
Cross domain tracking makes it possible to unify what would otherwise be considered as two (or more) separate sessions that occur under two (or more) of your domains. The specific steps on this SOP apply only to Universal Google Analytics (not Google Analytics 4). If you followed other SOPs to create your Google Analytics account or if you set up Google Analytics before October 2020 you most likely have a Universal Analytics property
Before you start
• To follow this SOP you will need to have installed Google Tag Manager on all your domains. If you haven’t done so already and you are using WordPress you can follow SOP 004 (web version). • You will also need to have Google Analytics running on all your domains. if you don’t have it yet, you can follow the steps described in SOP 009 (web version)
Key steps
27 steps
What is inside
30 headings
1Setting up Cross-domain tracking8
Go to your GA4 account and sign in with your account details.
On the left navigation menu, click ‘Admin’ on your bottom left.
Next, click ‘Data Streams’.
Click ‘Add Stream’, select ‘Website’ and enter your domain after.
Once you have added a stream, click on it, scroll down to ‘Google Tag,’ and click ‘Google tag settings.’
Next, click ‘Configure your domains’.
Click ‘Add condition’ and enter your domain. You can add multiple match types based on the drop-down menu. Add each domain you want to include in the cross-domain measurement:
Remember to hit ‘Save’ on your top right corner and that’s it!
2Adding your new domain to the referral exclusion list:7
Open your Google Analytics 4 account settings by clicking here or clicking 'Admin' in the sidebar.
Select the correct Google Analytics 4 Account and Property
Click 'Tracking Info' → 'Referral Exclusion List'
You should see your root domain on the list:
Click '+Add Referral Exclusion'
Type your new domain:
Click 'Create', and that’s it! You should now see your other domain in the Referral Exclusion List:
3Check if cross-domain tracking is working as intended12
Go to your GA4 account and sign in with your account details.
On the left navigation menu, click ‘Admin’ on your bottom left.
Under ‘Property’, click on ‘Tracking Info’ followed by ‘Tracking Code’.
Add Google Tag Assistant Chrome Extension to your browser.
Follow the same steps for the destination domain and check if the property ID is the same.
Alternatively, once the page loads click again on the Google Tag Assistant Chrome extension and click 'Stop Recording' and then click 'Show Full Report':
Select 'Google Analytics 4 Report':
Select the view that you want to test and click 'Ok':
Check the 'Alerts' section and make sure you’re not seeing an alert regarding the Cross Domain implementation.
Scroll down in the report until you find the 'Flow' section. You should see at least 2 Page loads there:
You can also validate the same using the 'Inspector' tool. Simply right click on the page and select 'inspector'. In the network console, filter for collect in the header you would see the property ID shown as below.
That’s it, if everything looks good your property will start collecting data correctly from both domains.
The document
13 pages
The file is locked
It comes with 2 DAY GEN AI ENGINEERING MASTERMIND, or
with the full library.