Recently I came across a website having a single domain with multiple extensions. By extensions, I mean the hostname was single. For example, for a website www.abc.com, the extensions were www.abc.co.uk, www.abc.fr, www.abc.mx and etc.
The website was same but it has multiple clones for different locations and languages. The objective was to track all these extensions within a single analytics account.
If you have this kind of website, you will have to setup cross domain tracking. This was an woocommerce website and we have to setup enhanced ecommerce tracking via GTM.
For this kind of website, you will have a single GTM container and single GA property. Add your GTM tracking code to the main domain that is www.abc.com.
Setting up cross domain tracking is quite easy in GTM. let’s go through a step by step guide to help you understand easily.
Step1: Setup GTM & GA
As mentioned above, you will have to setup GTM tracking code on the main website. You will then connect GA with GTM using the pageview tag.
Add all the GA tags that you want to use for sending ecommerce of event data to analytics. Make sure the data is appearing in Google Analytics.
Step2: Setup Cross Domain Tracking
To setup cross domain tracking, you will have to use Google analytics configuration settings.
Go to admin>> data streams>> configure tag settings >> configure your domains
Add the fields as shown in the image below
save changes.
Step3: Add All Extensions to Referral Exclusion List
If you don’t add all the extensions to your referral exclusion list, you will see these extensions listed in referral report. It is important that you always add your domain name plus any third party extension that you are using for transactions i.e paypal.com to the referral exclusion list.
So, this was a very simple way to track data from multiple extensions and I hope this helped you. If you have any questions related to this topic, please let us know on Twitter.