I want to write a small analytics tool that people can install on their websites. The question is, how can I track the user sessions?
My biggest problem is that safari (under its default setting) refuses to write cookies on any other domain besides the one in the location bar, whether for documents requested by an iframe, or any resource requested by javascript. Chrome allows this for image tags, but Safari does not.
It is discussed here, but a lot of the methods suggested do not work anymore: http://stackoverflow.com/questions/408582/setting-cross-domain-cookies-in-safari
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. But what is a good way to achieve in this ALL browsers?
I have heard of evercookie. Will this work on all the browsers?
If I can't do this, then I guess I will have to mooch off the site's own cookies, which I think is what most analytics tools do. I guess this is designed to prevent tracking a user across multiple domains.