Tracking users’ journeys accurately is the most viable part of every analytics set-up, including the GA4 or Mixpanel setup. If you are a SaaS company, you can have the leading website on one domain and your product on another.
The basic GA4 setup won’t allow you to see the whole funnel of a user from visiting the landing page to the first product session. As a result, you won’t be able to attach the marketing campaign (Paid Ads, Social or Referral) to your lead or trial-to-paid conversions, and many other things will be limited to analyse for you.
All of that will make your analytics unreliable, and you will start to use the tool seldom and seldom. There is a solution, and it’s called implementing cross-domain tracking in Google Analytics 4.
When cross-domain tracking is enabled, you can see the user journey through multiple domains as one user and as one session. It will open new horizons in learning more about your end customers.
In this article, I will cover everything you need to know about cross-domain tracking in GA4 to track users’ journeys successfully.
What is cross-domain tracking in GA4?
Okay, firstly, let’s clarify what cross-domain tracking stands for. All in all, cross-domain tracking is a way to track a user through multiple domains as the same user using the same GA4 code.
As I mentioned above, SaaS companies usually have a website for the product where customers can use the product and the website which they use as the main one to acquire users. The last can consist of the homepage, feature pages, pricing and blogs.
By default, Google Analytics 4 doesn’t track users when they move from one website (the main website in my example above) to another as the same user. This can be resolved by implementing cross-domain tracking.
Why do you need to activate cross-domain tracking?
You should activate it mainly because Google Analytics 4 is structured to monitor the same user moving through different domains as different users.
Since it can’t understand that it’s the same users, it will show 2 users and 2 sessions, and two users’ profiles will have half of the information. One will have what a user did on the main website, and another will have what a user made during the first product session (on the website).
This skews the data; you won’t be able to see the full user path and won’t be able to make decisions based on that.
As a result, 99% of companies implement cross-domain tracking.
Now that we are on the same page let’s look at how to implement it in GA4.
How to implement cross-domain tracking in Google Analytics 4?
Unlike Universal Analytics, Google Analytics 4 allows you to activate cross-domain tracking via its interface. You don’t need to change the GTAG code or tag in GTM. It’s easy, robust and solid. Let’s look at the steps on how to configure it.
Time needed: 5 minutes
- Log in to Google Analytics 4 and Click on the Admin icon at the bottom left corner
- Select your Web Data Stream in “Data Streams”
- Select “Configure tag settings”
- Under “Settings” select “Configure your domains”
- Provide the list of domains you want to track. You can use different match types to shorten the variable. Remember to save your changes.
After you save it, the cross-domain tracking will automatically be activated in 5 minutes or less.
It’s also worth mentioning that all enhanced measurement events will use the new logic, and your outbound clicks will be tracked accurately. Moreover, Google Analytics won’t show your domains as referral sources anymore.
How to enable cross-domain tracking for subdomains?
Often SaaS companies use subdomains for their products. There is a question if you need to enable cross-domain tracking for subdomains. The answer is NO. You shouldn’t do anything.
GA4 automatically stores the data about your users in the root domain. For instance, when you visit “apps.vakulski-group.com”, GA4 cookies will be stored under “vakulski-group.com”. It allows GA4 to read cookies from every subdomain without code modifications.
As a result, you don’t need to worry about tracking subdomains.
How to verify that cross-domain tracking is working correctly?
After you install the cross-domain tracking, it can make sense to check if it’s working correctly. It’s easy to do. You need to go to your website, click on the link or button that redirects you to another website and see if there is a (_gl) parameter in the URL. For instance, the one you can see below.
As an additional check, you can enable GA4 debugview and see if GA4 tracks you correctly when you move from one domain to another. You can use page_view events and check page_location parameters to identify if GA4 receives events from your domains in one user profile.
If you find the parameter in the URL and verify it in GA4 debugview, you follow the instruction right. If you need help, read the next section of the blog to troubleshoot your implementation.
What to do if cross-domain tracking doesn’t work?
Although your implementation doesn’t work, it doesn’t mean that it can’t be fixed. The main reasons why cross-domain tracking doesn’t work can be:
- You could make a mistake when you specified the domains in GA4. Please review it once again.
- Your website is configured in a way that prevents cross-domain measurement from working correctly. The best way is to ask your developer to investigate why it happens. Some of the most common issues are the following ones.
- URL Redirects.
- Conflicts with other scripts.
If you need more information on these reasons, please don’t hesitate to read the official GA4 cross-domain documentation.
Because many SaaS companies use two websites for business purposes, tracking users across multiple domains has become a standard. Companies use cross-domain tracking to see the entire path of the user through many domains. It helps to avoid user and session duplication and assigns every acquisition variable to the end goal (conversion).
As a result, in this article, I explained to you how to configure cross-domain tracking in Google Analytics 4 successfully. If you found the article helpful, please don’t hesitate to comment below.
Cross-domain tracking is the solution to track the same user through multiple domains as one user using the same Google Analytics code.
Cross-domain helps you to see the user path from one website to another in one user profile. If you use one website for acquisition and another for the product (SaaS business), you can see the entire user journey using cross-domain tracking. Otherwise, you will see two users and two sessions in Google Analytics 4 instead of one user and one session.
To set up cross-domain tracking in Google Analytics 4, you need to follow a few steps:
#1 Login to Google Analytics 4 and Click on the Admin icon at the bottom left corner
#2 Select your Web Data Stream in “Data Streams”
#3 Select “Configure tag settings”
#4 Under “Settings” select “Configure your domains”
#5 Provide the list of domains you want to track. You can use different match types to shorten the variable. Remember to save your changes.
To track the user’s journey through multiple domains as one user and one session, it’s recommended to implement cross-domain tracking in GA4.
No, you don’t need to make additional changes. Google Analytics 4 tracks subdomains automatically.
One of the main reasons why cross-domain tracking doesn’t work are:
1) You could mistake when you specify the domains in GA4. Please review it once again.
2) Your website is configured in a way that prevents cross-domain measurement from working correctly. The best way is to ask your developer to investigate why it happens. Some of the most common issues are the following ones.
– URL Redirects.
– Conflicts with other scripts.