0
votes

We're running Google Tag Manager on several domains and several sub-domains and using Cross Domain Tracking and Sub Domain Tracking as detailed in this Lunametrics blog post.

As of a few days ago, the cross-domain tracking url parameters (?_ga=) started appearing on sub-domains when clicking from say www.example.com to secure.example.com - which to my understanding it should not be doing.

This is causing havoc to some of our login systems. In this time no changes were published from GTM.

I'm trying to find out from our IT team if they made any server side changes but I'm pretty clueless when it comes to back-end and am hoping some smart people here might be able to make some suggestions as to what is causing GTM to start treating sub-domains as cross-domains.

1
Did you ever find a solution? - Keith Shaw

1 Answers

0
votes

enter image description here

For subdomain tracking, You only need to set the Field Name cookieDomain to auto and nothing else. Don't do the rest of steps on the post since that's for tracking different domains. This will remove the (?_ga=) parameters in your url's

If you read the post again you'll find this set of instructions

IMPORTANT: Before you get started

If you are trying to track users across many different subsections of a single domain, e.g.:

shopping.lunametrics.com

www.lunametrics.com

admin.lunametrics.com

You are not interested in cross domain tracking, you are interested in subdomain tracking. The best way to accomplish this is to add the ‘cookieDomain’ Field To Set and set it’s value to auto. That will instruct the tracker to make the cookie available to all of the subdomains that it can.