Cookies

Quite simply put, cookies are small bytes of data dropped from a website onto your computer - so it can identify you for the next time you visit that site. For instance, the first time you visit a site it can drop a cookie and say "Welcome". The next time you visit that site it can read that cookie and say "Welcome Back". That's literally about it. A cookie can save your username and password for the next time you visit that site, so you don't have to login again.

The most common use of cookies in todays websites, is google analytics. These cookies allow the owner to track which pages you have visited on this website, how long you spent on each page etc… so the owner knows how effective those pages are and how popular that site is!

 

Cookies used by Google Analytics

(The following information was taken from https://developers.google.com/analytics/devguides/collection/gajs/cookie-usage)

 

Google Analytics is a simple, easy-to-use tool that helps website owners measure how users interact with website content. As a user navigates between web pages, Google Analytics provides website owners JavaScript tags (libraries) to record information about the page a user has seen, for example the URL of the page. The Google Analytics JavaScript libraries use HTTP Cookies to "remember" what a user has done on previous pages / interactions with the website.

Important: Google Analytics does not collect any personal information about your website users.

Google Analytics supports two JavaScript libraries (tags) for measuring website usage: analytics.js and ga.js. The following sections describe how each use cookies.

 

analytics.js – Cookie Usage

The analytics.js JavaScript library is party of Universal Analytics and uses a single first-party cookie containing an anonymous identifier used to distinguish users.

By default, this library sets cookies on the top level domain, excluding the leading dot, and sets the cookie path to the root level (/).

Note: The analytics.js library does not require setting cookies to transmit data to Google Analytics.

This library sets the following cookies:

Cookie Name

Expiration Time

Description

_ga

2 years

Used to distinguish users.

 

ga.js – Cookie Usage

The ga.js JavaScript library uses first-party cookies to:

By default, this library sets cookies on the domain specified in the document.host browser property and sets the cookie path to the root level (/).

This library sets the following cookies:

Cookie Name

Default Expiration Time

Description

__utma

2 years from set/update

Used to distinguish users and sessions. The cookie is created when the javascript library executes and no existing __utma cookies exists. The cookie is updated every time data is sent to Google Analytics.

__utmb

30 mins from set/update

Used to determine new sessions/visits. The cookie is created when the javascript library executes and no existing __utmb cookies exists. The cookie is updated every time data is sent to Google Analytics.

__utmc

End of browser session

Not used in ga.js. Set for interoperability with urchin.js. Historically, this cookie operated in conjunction with the__utmb cookie to determine whether the user was in a new session/visit.

__utmz

6 months from set/update

Stores the traffic source or campaign that explains how the user reached your site. The cookie is created when the javascript library executes and is updated every time data is sent to Google Analytics.

__utmv

2 years from set/update

Used to store visitor-level custom variable data. This cookie is created when a developer uses the_setCustomVar method with a visitor level custom variable. This cookie was also used for the deprecated_setVar method. The cookie is updated every time data is sent to Google Analytics.