AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

2.6K members online now
2.6K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

Sub domain tracking - Classic Analytics through GTM

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi Everyone,


I have an issue relating to sub/cross-domain tracking in Classic Analytics. I use the Google Tag Manager (GTM) to deploy the same pageview tag for the same property for the Main and Sub domain. The typical flow for a visitor is to enter the main domain, go to the subdomain (checkout) and return to the main domain after a completed transaction. Therefore, in Google Analtyics, I see a lot of referral traffic coming from both the main domain and the sub domain. Especially attributing transactions to the original source is a pain. Hence, we are trying to implement sub domain tracking. This is the first bandaid. We hope to later build up to cross domain tracking, because the domain changes for different countries, but we whish to get the sub domain tracking done first.


Both domains (main and sub) are managed by the same company. Perhaps important to note is that the sub domain is an iFrame. I deployed GTM and the pageview tag is firing and both the main and sub domain. The pageview tag is constructed as follows:


Domain name: (Example main domain name) 

Referrers to Ígnore:

Trigger: All pages (window loaded)


After I had implemented this tag, i still saw transactions being attributed to referrals from both the main and sub domain. I think this is due to the transation at the end of the checkout, when visitors are redirected from the sub to the main domain. But i am not sure. Does anybody know how to fix this issue? Has anyone had any experience with this in the past? Remember, I use GTM with Classic Analytics. There is a lot written about subdomain tracking for Universal Analytics, but not for Classic Analytics deployed through GTM.


Can someone please help me out? I could really use your help.


Kind regards,


Re: Sub domain tracking - Classic Analytics through GTM

Follower ✭ ☆ ☆
# 2
Follower ✭ ☆ ☆
Some additional info. I used this Google Productforum post for my initial subdomain tracking implementation:!topic/tag-manager/YQMAURf9TkU. Help would still be greatly appreciated.