or   Register or Register today to make and share your own cheat sheets! (Why Join?)

Cheatography Login

Join Us!

Not a Cheatographer? Register here!

Social Media

You can login to or register with Cheatography using your Facebook or Twitter account!

Why Join Cheatography?

Make and share cheat sheets!
Join a great community of Cheatographers and add your very own contributions.

Save your favourites!
Quick access to your most loved cheat sheets.

Fewer ads!
Members see no ads on the site.

Coming soon ...
Requests, ratings and more!

Why Join Cheatography?

Make and share cheat sheets!
Join a great community of Cheatographers and add your very own contributions.

Save your favourites!
Quick access to your most loved cheat sheets.

Fewer ads!
Members see no ads on the site.

Coming soon ...
Requests, ratings and more!

Google Analytics Cookies (v2) Cheat Sheet by Jay Taylor

3 Comments   |   Add a Comment   |   PDF Download   |   Find:

__utma (Visitor cookie)

Block one Domain hash
Block two Visitor ID
Block three Time of initial session
Block four Time of previous session
Block five Time of current session
Block six Session number

Each group is separated by a period character. All times stored are UNIX timest­amps. For new visits the three times in this cookie will all be the same.

__utmb (Session cookie)

Block one Domain hash
Block two Pageviews this session
Block three Tokens available
Block four Time of session

Each group is separated by a period character. All times stored are UNIX timest­amps.

The token bucket stores how many requests are being made to GA at once. This number will decrease for each request, any requests sent while the bucket is empty will be discarded.

__utmc (Session cookie)

Block one Domain hash

This cookie is deprecated due to session handling changes within Analytics, but is still set by ga.js. Sessions now only end when the __utmb cookie expires.

 

__utmv (Custom Variable cookie)

Block one Domain hash
Block two Custom Variable value

Each group is separated by a period character. This cookie can only be created by using Google Analytics' deprecated _setVar() method. Calling this method sets this cookie and automa­tically sends the data to Google Analytics via a __utm.gif request.

Values sent in this manner appear in the "User Define­d" report, unless otherwise interc­epted with profile filters.

__utmmobile (Mobile Visitor cookie)

Block one Visitor ID

This cookie is only created by the Google Analytics mobile tracking SDK. It stores an ID generated by MD5 hashing several possible values, and then returning a substring of the result prefixed with '0x' - this serves as a unique visitor ID.

This cookie is used as a basic Visitor cookie, similar to __utma.

 

__utmz (Campaign cookie)

Block one Domain hash
Block two Time of initial visit
Block three Session number
Block four Campaign number
Block five Campaign parameters

Each group is separated by a period character. The campaign parameters are a single URL-en­coded string, separated by pipe '|' charac­ters. They can include:

utmcsr = source
utmcmd = medium
utmccn = campaign name
utmctr = campaign keyword
utmcct = campaign content / variation
utmgclid = Google Click ID

utmg­clid will only be set for AutoTagged AdWords visits. If set, other parameters will be unset, as utmgclid is a hash of the campaign values and is used instead.

Cookie Lifetimes

__utma Two years
__utmb Thirty minutes *
__utmc Until browser is closed
__umtv Two years
__utmz Six months
__utmm­obile Two years

* the __utmb cookie will only expire after thirty minutes of no intera­ction with Google Analytics, i.e.: idle time.

Favourited by 6 Members:

kagua mishin schrodervictor The_Frail MrChick cthumerelle

Comments

prietop prietop, 13:55 16 Mar 12

Hi Jay,

I hoe you can help me cause i am really stumped, im trying to save into a lead database the info from the cookie, i tried with auto-tagging on from adwords and i get the campaign as "Not Set" i unlinked my Adwords from analytics and turned auto-tagging off and now i get all adwords clicks as "organic".. Can you help??

Jay Taylor Jay Taylor, 09:25 21 May 12

Hello! Sorry for the delayed reply - I haven't managed to check back in for a while.

When using autotagging, all of the campaign info gets stored in the encoded GCLID parameter generated by AdWords, the only info you'll be able to extract is the GCLID and the fact it's a CPC visit. If you disable auto-tagging you need to make sure that each of your destination URLs is manually tagged with UTM parameters identifying it as CPC - for example:

http://www.example.com/landing-page.html?utm_source=google&utm_medium=cpc&utm_campaign=promo&utm_term=keyword&utm_content=banner-adverts

Of those five parameters, utm_source, utm_medium and utm_campaign are mandatory, Google has documentation available on these though, if you search for Google URL Builder they have a tool up for generating manually tagged campaign URLs.

So to answer your question more directly - if you want to extract cookie for CPC data, you'll need to manually tag your URLs as above, auto-tagging won't give you that data in the Cookie!

Hope that helps, again sorry for the delay in replying :-)

MrChick MrChick, 11:38 8 Jan 13

Hey Jay,

in the Cookie Lifetimes section __umtv should be __utmv, shouldn't it?

Add a Comment

Comment:

Contents

An overview of the anatomy of the cookies set and used by Google Analytics.

Column Content Comments Author Updated
- Google Analytics Cookies (v2) Cheat Sheet Jay Taylor 21 Feb 12
1 __utma (Visitor cookie) 0 Jay Taylor 21 Feb 12
__utmb (Session cookie) 0 Jay Taylor 21 Feb 12
__utmc (Session cookie) 0 Jay Taylor 21 Feb 12
2 __utmv (Custom Variable cookie) 0 Jay Taylor 21 Feb 12
__utmmobile (Mobile Visitor cookie) 0 Jay Taylor 21 Feb 12
3 __utmz (Campaign cookie) 0 Jay Taylor 21 Feb 12
Cookie Lifetimes 0 Jay Taylor 21 Feb 12