Nowadays, running multiple domains and webshops is quite common, which necessitates tracking user behavior across domains to get a clearer picture of what’s clicking and what’s not.
Let’s explore how integrating the GA4 cross-domain tracking feature with GTM (Google Tag Manager) can solve all your user-tracking problems.
In the following blog, we will begin with understanding the importance of setting up cross-domain tracking in GA4. how to go about the process, and ways to test it. Let’s hit the throttle now, shall we?
Decoding cross-domain tracking and its importance
Cross-domain tracking helps you track the same users when they visit different websites that you own or manage.
Google Analytics uses two numbers to identify users and their visits. One number is for the user, referred to as the client ID, and the other is for the visit, also known as the session ID. These numbers are stored in small files called cookies on the user’s browser or device.
When users go from one website to another, these numbers are added to the links that take them there. This is done by adding a special part to the link’s address. This is important for two reasons.
First, it helps you see how users move from one website to another and what they do on each website. Second, it makes your reports more accurate and reliable.
Let’s look at an example.
Let’s say you have a marketing campaign that sends users to website A to learn about your product or service. Then, the users who are interested, go to website B to buy or sign up for your product or service.
If you don’t have cross-domain tracking set up:
- You won’t know which marketing campaign brought you the most sales or sign-ups
- Your reports will show more users and visits than there really are. This happens because each time a user goes from website A to website B, it will count as a new user and a new visit.
Now that you know why cross-domain tracking is important, let’s learn how to do it!
A step-by-step guide to setting up cross-domain tracking in GA4
You must use the same GA4 Property on all the websites you want to track together. This means you must have the same tracking code or measurement ID on each website. You should already have Google Analytics installed on your websites before you do this.
Step 1: To begin, you need to go to the Admin section of your GA 4 account. This should be on the bottom left corner of your account.
Step 2: Move over to the Property column, where you will encounter a list of options and select Data Stream.
You will see a section on the right side of your screen that has all the data streams connected to your account. These are your websites and apps.
Since we are currently experimenting with websites, click on Web and choose your stream.
Step 3: Scroll down to the bottom of the web stream details and select Configure tag settings.
Step 4: Demarcate your list of domains for carrying out cross-domain measurement in the Configure your domains section.
Step 5: Choose Add Condition to list the domains you want for executing cross-domain tracking.
Step 6: Under Match type, choose Contains.
Step 7: In the Domains section, you can register your domain.
Step 8: To include your second domain, repeat the process from the Add condition and click Save.
How do you verify that the cross-domain tracking is working properly?
Cross-domain measurement adds some extra parts to the links on your website. Sometimes, your website might have a problem and show an error or not start a download.
To check if cross-domain measurement is working:
- Go to a page on your website that has a link or a form that goes to another website that you set up for cross-domain measurement.
- Click the link or fill out the form to go to the other website.
- Make sure that the other website opens properly.
- Look at the address of the other website and see if it has _gl in it. For example: [https://www.example.com/?_gl=1abcde5].
If your website has any downloads, Go to a page with _gl in the address and start a download. Make sure that the download works.
Now that we have discussed the importance and process of setting up cross-domain tracking in your Google Analytics 4 account, we hope you are able to leverage these insights to your benefit. If you’d rather have experts handle your GA consulting needs, then team awesome @Mavlers is happy to help! Get in touch with us now!