Cross Domain and subdomain tracking
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.
Cross Domain and subdomain tracking[ Edited ]
May - last edited May
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.