Google Analytics and the beauty of Cookies
What is a Cookie?
A cookie, also known as a web cookie, browser cookie, and HTTP cookie, is a text string stored by a user’s web browser. A cookie consists of one or more name-value pairs containing bits of information, which may be encrypted for information privacy and data security purposes.
The cookie is sent as an HTTP header by a web server to a web browser and then sent back unchanged by the browser each time it accesses that server. A cookie can be used for authentication, session tracking (state maintenance), storing site preferences, shopping cart contents, the identifier for a server-based session, or anything else that can be accomplished through storing textual data.
As text, cookies are not executable. Because they are not executed, they cannot replicate themselves and are not viruses. However, due to the browser mechanism to set and read cookies, they can be used as spyware. Anti-spyware products may warn users about some cookies because cookies can be used to track people—a privacy concern.
Most modern browsers allow users to decide whether to accept cookies, and the time frame to keep them, but rejecting cookies makes some websites unusable.
—————————————————————————————————————————————————
How Google Analytics Uses Cookies
Google Analytics relies heavily on cookies. Using cookies allows Google Analytics to be much more precise in its measurements. If a visitor deletes or blocks their cookies, information for that visit or visitor will be misinterpreted or lost.
Unique Visitors
Cookies allow for unique visitor tracking. They tie all the activity of a visitor into a single visit. They are used to determine when a visit ends.
Activity
Cookies store vital information about each visit. They store the start time of the current visit and keep track of how many pages have been viewed so far. If a visitor closes his browser or is inactive for too long, the cookies will report that the visit ended.
Cookies store the date and time of the visitor’s first visit (allowing for calculations of how many visits it took to convert). The total number of visits from the visitor is stored in cookies, too.
Traffic Source
Cookies are the main vehicle for attributing visit information and conversions to specific marketing campaigns or traffic sources. Each time the visitor comes to the site, the code stores new traffic source information (if there is any) in the visitor’s cookies.
Dissecting Google Analytics Cookies
Google Analytics uses several cookies to record all of this information. The most common are covered here. The expiration dates for each cookie may be customized with built-in GA code.
All of the cookies store a domain hash that ties them to the same site. In the case that cookie information changes during a visit (e.g., a user-defined variable gets changed from “Prospect” to “Customer”), Google Analytics will attribute the entire visit to the last cookie value.
The expiration time can be customized for each site.
The expiration time can be customized for each site (or page).
The six-month window can be customized for each site.
Sending it to Google Analytics
Finally, all of this cookie information is sent to Google Analytics via the __utm.gif request that it makes with each pageview. These cookie values are all tacked onto a ridiculously long query string, where they will show up in log files. When Google Analytics processes its log files, it relies on this cookie information (among other pieces of data in the query string) to populate your reports.



03. Jun, 2010 





Valuable info. Lucky me I found your site by accident, I bookmarked it.
Greetings, I love your blog. This is a great site and I wanted to post a little note to let you know, nice job! Thanks Jessica
Louis Vuitton
louis vuitton
Hello! Do you use Twitter? I’d like to follow you if that would be okay. I’m absolutely enjoying your blog and look forward to new updates.