Cross-Domain Tracking with GTM

Cross Domain Tracking

If you have the multiple domains and you’d like to analyze the users in a single analytics view. Setting up the cross-domain tracking with GTM can be very useful.

Cross-domain tracking is a way to analyze visitors across multiple websites in a single analytics view.

As it will measure those visits as one. Without this tracking, Google Analytics will consider this user as two separate visitors.

As a result, will increase the number of users appear in your reports.

This occurs even if both domains use the same Tag Manager container and Analytics account.

A prime example we commonly see is within the ecommerce industry, where many sites use a third-party payment domain such as Google Pay.

When customers make a purchase, they are redirected to a Google Pay domain and then redirected back to the ecommerce site following payment.

Without cross-domain tracking, the user experience is split into 2 unique sessions and the acquisition medium/source for the purchase is set to referral/Google Pay, instead of retaining the original medium/source (which was most likely not referral/Google Pay but something like organic/google).

To set up cross-domain tracking using the Tag Manager:

  1. Open the Google Analytics settings variable in GTM to configure the cross domain tracking.
  2. Click on More Settings > Cross Domain tracking
  3. In the Auto Link Domains field, enter a comma-separated list of domains.
  4. To receive incoming links from other domains, navigate to More Settings then Fields to Set and add a field with a Field Name of allowLinker and a Value of true.
  5. Save your changes and publish the container.

Note: The preferred method is to make changes to the Google Analytics Settings variable for cross-domain tracking with GTM, so that changes are shared across multiple tags. In Universal Analytics tags, click Enable overriding settings in this tag to expose the More Settings option.

Need help with Digital Analytics? Get in touch:

Leave a comment