Alex Rivera | Logout

How does google analytics collect its data?

Asked 2009-05-21T09:20:45.343
28

Yes, I know you have to embed the google analytics javascript into your page.

But how is the collected information submitted to the google analytics server?

For example an AJAX request will not be possible because of the browsers security settings (cross domain scripting).

Maybe someone had already a look at the confusing google javascript code?

Edit
Report

2 Answers

6

Without looking at the code, I assume their data is collected from the HTTP headers they receive in the asynchronous request.

Remember that most browsers send data such as OS, platform, browser, version, locale, etc... Also they do have the IP so they can guesstimate your location. And I assume they have some sort of clever algorithm to decide whether you are a unique visitor or not.

Time on the site is probably calculated by using an onUnload() event.

answered 2009-05-21T09:24:47.397
5

Google Analytics web page provides detailed information of how Google Analytics server collect data. http://code.google.com/apis/analytics/docs/concepts/gaConceptsOverview.html

All Google Analytics data is collected and packed into the Request URL's query string and sent to Google Analytics server. The http request is made by a gif image(http://www.google-analytics.com/__utm.gif) activated by Google Analytics JS.

answered 2011-04-07T05:53:17.737

Your Answer