Home » Google Analytics » Cross-domain Tracking – Google Analytics 4

Cross-domain Tracking – Google Analytics 4

Cross-domain tracking has been completely rebuilt for Google Analytics 4 (GA4) properties. Previously, the configuration was done outside of Google Analytics primarily within Google Tag Manager or by editing the hard-coded tags by enabling the linker/autolink settings. Simo has some great guides on a few ways we used to do cross-domain tracking. This guide will cover how to enable cross-domain tracking for GA4.

I’ve also published a video guide for you as well: https://youtu.be/jl8E-yLVvEk

GA4 Cross-Domain Tracking Setup

  1. Ensure you have admin permissions for your GA4 property and click admin->data streams->stream. Note: if you set up your different websites as separate streams, you may need to duplicate your setting in each stream.

2. After selecting your stream, click on “tagging settings.” Note: if you do not see tagging settings it is possible the feature has not yet fully rolled out to you yet. If this is the case, check back in a few days.

3. Click on “configure your domains”

4. Click the ‘Add condition’ button to enter your domains. Note: there is an important note/exception for anyone that also uses Universal Analytics on this step. If you use Universal Analytics you will want to ensure your settings also match.

5. You can enter each domain you want to link as a separate condition or change the match type to regex to do multiples at once. It appears the number of domains you can list is quite generous, as I was able to create over 100 conditions. In this example, I’m trying to link analyticspros.com and adswerve.com, so you can see I’ve entered both.

6. Once you hit save, your cross-domain tracking is now live. If you visit your site and click any links between your domains you will see a new _gl parameter. Here is an example of what the URL would look like in the browser: https://adswerve.com/?_gl=1j8b8y7_gaNTc3NDEzNDA1LjE1NzA1NzI1NjI._ga_X026J06Q11MTYwMzgzODI2Ni4xNjMuMS4xNjAzODM4Mjk2LjMw_ga_VMWSTP89JM*MTYwMzgzODI2Ni4xNTUuMS4xNjAzODM4Mjk2LjMw.

This is all there is! Your GA4 properties will now properly track users navigating between your domains with link clicks as a single user and session.

Other GA4 Cross-Domain Tracking Notes

Google also added a nice feature in this for enhanced measurement, which automatically tracks outbound links as events. The feature update is when you enter domains in your cross-domain settings, those domains will no longer be tracked as outbound links, which makes sense since you are telling Google they are really internal links.

It is going to be extremely important to pay attention to the callout earlier in this guide about matching configuration settings if you also use Universal Analytics on your site. If you don’t you could impact how users/sessions are tracked unintentionally.

Overall, this is a really nice feature improvement. As you can see in this guide you can potentially configure cross-domain tracking without ever having to manually modify your code by editing your tags or pushing an update in Google Tag Manager. Instead, we can do everything directly in the UI, which saves you time and helps you end up with more data integrity.

Leave a Reply

Your email address will not be published. Required fields are marked *