A cookie is a small file of letters and numbers downloaded on to your computer when you access certain websites. Like virtual door keys, cookies unlock a computer's memory and allow a website to recognise users when they return to a site by opening doors to different content or services. Like a key, a cookie itself does not contain information, but when it is read by a browser it can help a website improve the service delivered.
Cookies are at the heart of Google Analytics. Not just because they are delicious, but because they provide a critical link in tracking return visitors and attribution.There is shockingly little documentation on the cookies created by the tracking code, what they store or how they work. But they are so integral to the Google Analytics reports, it is important to lift the hood and understand exactly what is going on.
Certain reports in Google Analytics rely heavily on cookies. If a visitor deletes or blocks their cookies, information for that visit or visitor will be misinterpreted or lost.Cookies are a major component of unique visitor tracking. They tie all the activity of a visitor into a single visit, and are used to determine when a visit ends.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 the browser or is inactive for too long, the cookies will indicate that the visit has 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. 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 referral or campaign variable information in the visitor's cookies.