4 ms·
It would be very useful for an analytics tool to be able to write COOKIES back to the domain where it's hosted, so it can keep track of sessions If you take Go
by byoung2 16y ago
It would be very useful for an analytics tool to be able to write COOKIES back to the domain where it's hosted, so it can keep track of sessions
If you take Google Analytics as an example, it uses Javascript to gather info on the current visitor, then it creates a dynamic image tag to send that info to Google. This allows them to set a cookie using the domain of the site containing the analytics tag, and send that data back to a server on a different domain.
It is also possible to track users across multiple domains (e.g. the DART cookie used by DoubleClick). I believe this is achieved by using a dynamically generated iFrame to set the cookie on the user's computer. Since the domain used for the the iFrame is the same across all sites that use the Javascript snippet, the cookie can be read across multiple sites.
- EGreg 16y agoSo google uses the cookies of the publisher's site, okay... but then what if the publisher has www.something.com, foo.something.com and something.com ... are all of these considered different domains? And if so, isn't it kind of unhelpful to the publisher, that you can't track a session across their various subdomains? Or is this intended?
- EGreg 16y agoAha, I see, I can set a cookie for *.domain.com (or .domain.com) and then it will also work for all subdomains.