Archive for April, 2012

(ab)using Google Analytics cookie for on-site-tracking

Google Analytics (GA) is a great tool for all who like to measure the effects of their websites, but can we also use it for our own website as an on-site-tracking system? GA does seem to know quite a lot about our vistors, but how do we get that data from GA into our website? And even better, is it possible to link the data to the person who is visiting your website?

The moment somebody crawls your website quite a lot of things happen with regards to GA. First of all a lot of JavaScript is being executed but what is more interesting, the results are stored inside the GA cookie. In theory this means that your website can access the cookie if the cookie is stored under the same domain of your website which is the case.