I'm trying to keep GA from setting cookies on static files like images. All the files concerned are loaded from cookie-free subdomains. Is there a way to exclude these subdomains from getting the cookie that is set by Google Analytics?
-
Is there a tracking code on some of the pages on these subdomains, or are you just finding cookies there?– Stephen Ostermiller ♦Aug 25, 2018 at 13:46
-
@StephenOstermiller they're not pages, just images, css files and the like. GA is still sending cookies to them though.– toomanyairmilesAug 25, 2018 at 14:02
-
What is your cookie domain set to in your GA snippet?– Stephen Ostermiller ♦Aug 25, 2018 at 17:44
-
@StephenOstermiller auto, which AFAIK should default to the top domain and ignore the subdomains.– toomanyairmilesAug 25, 2018 at 18:33
-
Any cookies set at the top domain will show up on subdomains. I assume that your site is on www? If so you need to set the domain in your ga snippet to include the www.– Stephen Ostermiller ♦Aug 25, 2018 at 19:00
|
Show 2 more comments