Analytics
2K members online now
Discuss regaining access to Analytics accounts, restoring accounts, changing user access levels, and navigating the homepage
 
Guide Me
star_border
Reply

Cross Domain and subdomain tracking

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

HI,

 

I am working on cross domain and subdomain tracking for my client. I have implemented those using GTM, but have some question about cookiedomain

 

  •  cookiedomain=auto :  I set this field for PageView tags. Should i do the same for event tags as well? The events may or may not take users across domains

 

Appreciate your response.

 

Thanks,

Harin

 

Cross Domain and subdomain tracking

[ Edited ]
Participant ✭ ✭ ✭
# 2
Participant ✭ ✭ ✭

Hi Harin,


It's important to include this in the tag that creates the cookie. However, the safest way is to configure this in all the tags just because of the gtm.js async library.

If your tag that doesn't have "cookieDomain: auto" fires before you page view tag (you page view tag fails to load for some reason), you'll have a problem (Client ID will change and a new session will be initiated). It's rare but possible. That's why I recommend using "cookieDomain: auto" in all your GA tags.

Hope this helps.
Taavi