What Google Analytics Cookies Are Made From
- Tutorial
Good afternoon.
Recently, one of our customers expressed a desire to receive additional information about visitors to their site, more specifically - about people who filled out the contact form. This is a large European company and they would like to "filter" their potential customers. Let me give you an example - let’s say they decide to organize an exhibition of their equipment in Hungary and they need to decide which of the Hungarians who left their contacts with them, most likely a standing customer, and who “passed by”.
The main indicators of the "reliability" of the client for us are: the number of visits to the site, the time spent on the site, the number of pages viewed. We received all this information from Google Analytics Cookies.
What are cookies from Google?
If someone suddenly does not know what a cookie is, then you can read it, for example, on Wikipedia .
Google Analitics uses mainly four types of cookies: __utma, __utmb, __utmc, __utmz (occasionally there are __utmv and __utmx, but I did not feel the need to
Let us examine each separately by example.
__utma
These are the main user cookies that uniquely identify the visitor to the site and contain a lot of useful information about him.
These cookies have a two-year lifespan (if the user does not clean them), that is, you can receive information for a sufficiently long period of time.
Format: XXXX.DDDD.FFFF.PPPP.CCCC.N
Example: 126394024.179004532335319200.1247654493.1260769004.1260878051.7
Values:
- XXXX - hash domain, does not contain useful information.
- DDDD is a unique user ID in Google Analytics.
- FFFF - the date the user first visited the site in Unix format (the number of seconds elapsed since January 1, 1970).
- PPPP - the date the user last visited the site in Unix format.
- - - the start time of the current visit (session start) in Unix format.
- N is the number of visits to the site by this user.
__utmb
These cookies carry information about the current session of the user, the lifetime is 30 minutes after loading the last page viewed.
Format: XXXX.P.10.CCCC
Example: 126394024.1.10.1260878051
Values:
- XXXX - hash domain.
- P is the number of pages viewed by users during the current session.
- 10 -
Google’s magic number is thesame parameter on all sites that does not change over time. I think it does not carry useful information. - - - - the time of the start of the current visit (the beginning of the session) in Unix format (similar to the параметutma parameter).
__utmc
The lifetime of these cookies is the current session. Contain only hash domain.
__utmz
The most interesting of all cookies - they will tell how the user was on the site, where he came from (if he used the link from another resource) and by what keywords he searched for your site (if he came from a search engine).
Shelf life - 6 months, updated when loading the next page of the site.
Format: XXXX.TTTT.VSutmcsr {source} | utmccn {campaign} | utmcmd {medium} | utmctr {keyword}
Example: 126394024.1260524913.5.5.utmcsr = yandex | utmccn = (organic) | utmcmd = organic | utmctr = best
Values:
- XXXX - hash domain.
- TTTT - date of the last update of cookies in unix format.
- V - the number of visits by the user to the site made by links from other resources.
- S - the number of different resources from which the user accessed the site.
- utmcsr is the search engine resource from which the user entered the site.
- utmccn - contains information about the company from AdWords (or the utm_campaign value in the request) or reports that the user came to you through organic search.
- utmcmd - contains the name of the company (or utm_medium value in the request) or reports organic search.
- utmctr - keywords that were searched.
As you can see, these cookies contain a lot of useful information.
You can read more about Google Analytics Cookies in the official documentation .