0

I have two websites:

  1. site.com
  2. sub.site.com

First one has google analytics and the cookies have this domain: ".site.com". What happens is that my second site get these cookies posted which is not connected at all and I don't want that. Is there a way to achieve this? I think that changing ".site.com" domain, to "site.com" will work, but I am not 100% sure nor do I know how to do this with google analytics either.

Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207

1 Answers1

0

There is actually an answer in another question, that is not the accepted one though.

We need to add this to the GA code:

pageTracker._setDomainName("none")

This will set the cookie domain to "site.com" instead of ".site.com" and it will not be posted to subdomains.

Community
  • 1
  • 1
Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207