Monday, March 4, 2024

Latest Posts

Setup Cross-Domain Tracking In Google Tag Manager

If you plan to track more than one domain within one account of Google Analytics, you will need to make some changes to your tracking code. This is because Google Analytics might not properly track the same user between two domains out of the box. In the initial time, cross-domain tracking used to be a huge pain. However, with the help of universal analytics, things have become much easier now. 

Among all the other things linker.js plugin is the most helpful that allows configuring the cross-domain settings when the tracker is in the process of making. With the arrival of Google Tag Manager, things have become even simpler than they used to be. With the help of it, you can sort all your cross-domain needs in less than an hour. Yes, it is that good and effective. 

So, you want to find out how to configure cross-domain tracking using the Google Tag Manager? Here is the step-by-step process in detail that will help you a lot. 

Cross-Domain Tracking With Google Tag Manager – Step By Step Process 

Before we get started with the process, you need to know some things. This is mostly for beginners who are not sure what they are searching for. So, if you are planning to track users in different subsections in a single domain, you need to show more interest in the subdomain tracking. Then, using Google Analytics, you can get good results. 

However, coming back to the process of cross-domain tracking with Google Tag Manager. Make sure to go through every step to learn how to do it. 

Step 1: Create The Auto Link Domains Variable 

In the first step, you need to create a brand new contrast variable, as the name suggests. Then, you have to set it to the comma-separated in the domains list that you want to track in the property during your creation. 

  • If you are planning to track the links to all subdomains of the domain, then just enter the hostname without entering any subdomain. For example, you have to enter for and
  • If you plan to track links to a specific subdomain of any external domain, you have to provide the full hostname. For example, you have to enter for But do not enter it for 

Step 2: Add All The Auto Link Domains To the Preview Tag 

After you are done with the first step, you need to enable pageview tag cross-domain tracking. You can do it by opening the Universal Analytics Pageview Tag from the Google Tag Manager

Go to the tag creation wizard and then configure the option and click on “More Settings.” Under this one, you will also get a Cross-domain tracking option. In addition, there is a field of auto-link domains available where you have to enter {{Auto Link Domains}}. It helps Google Analytics to understand and decorate any links that it finds. 

Step 3: Add AllowLinker Field

Now, Google Analytics understands which links need decoration, you have to make sure to tell it to use the special parameters when it detects them in the page path. To do this, you have to click on “Fields To Set” and click on “Add Field.” 

After that, enter the allowLinker into the place of Field Name. There is another field at the side of the field name called value. You have to type “true” in that field. After doing this part, you are more than 90% done through the process but do not publish them yet. You have some more steps to follow. 

Step 4: List Of Referral Exclusion Update

This is the domain names list that Google Analytics does not treat as referrals; instead, they are treated as direct traffic. When someone enters your website from the domain that is listed on the list of exclusion, Google Analytics rewrites the medium/source. So, you have to add all the domains you set in the Auto Link Domains to the referral exclusion list. 

Otherwise, it will not work as it is expected. To update your Referral Exclusion List, you have to enter the Admin Panel of Google Analytics and select the Tracking info menu to select the Referral Exclusion item. Now, add all the hostnames that you would like to exclude. 

When all of these steps are complete, you need to proceed with testing the Cross Domain Tracking. Ensure that it is configured properly and check all the little details very carefully. After you are done testing them, make sure to add different filters to the prepend hostnames. Although it is optional, it is highly recommended. 


If you want to find out more about Cross Domain Tracking In the Google Tag Manager, you can go through this guide to find out the details. Here is the step-by-step process that you can read in detail to find out the details. You will also find some other information on both cross-domain tracking and Google Analytics.

Kacee Christian is a freelance content writer and enthusiastic blogger. She is the co-founder of Exclusiverights & also contributes to many authority blogs such as worldtech24.

Latest Posts

Featured Posts

Stay in touch

To be updated with all the latest news, offers and special announcements.