Understanding Google Analytics Cookies
Cookie Tracking in Google Analytics Explained
Cookies are used to store user information in a browser for the activities done on a website. Once the cookies are stored, the browser remembers it and suggests the domain name and URL when you start typing in a new window.
The cookies are also the catalyst behind opening a logged-in session when you open a new tab or window. These are browser-specific, which means the cookies stored in Chrome wouldn’t work in Firefox and other browsers.
How Does Google Analytics Track Cookies?
Google Analytics uses _ga cookie to store the user information, like browser and device used. A Client ID is assigned to the user in the background to remember the information.
When you browse a website, the GA tracking code starts executing Client ID to track the activities done on the site. For returning users, the same Client ID is used. This is how Google Analytics differentiates between new and returning users.
The actions taken by the user on the website are called Hits. These Hits are saved in GA specifically for every page.
The _ga cookies remain stored in the browser for two years of inactivity.
Types of Google Analytics Cookies
Google Analytics uses different types of cookies to distinguish users and throttle the request rate.
These cookies are used to distinguish users and remain stored for two years.
This is very similar to _ga cookies, but lasts only for 24 hours.
The role of this cookie is to throttle the request rate. It lasts for only a minute.
This cookie can remain stored for up to one year. Its role is to retrieve Client IDs from the AMP Client ID service.
It saves the campaign-related information for the visitor. This cookie is used when Google Analytics and Google Ads are connected. It lasts for 90 days.
It is used to identify users and their sessions. Like _ga, it also lasts for 2 years.
It remains in the browser only for 10 minutes. The role is to throttle the request rate.
This cookie determines the new sessions and visits and lasts for 30 minutes.
As soon as the browser session ends, this cookie gets cleared. It works in conjunction with _utmb to determine whether it was a new session.
The timeframe for this cookie is 6 months. Its role is to store sources of traffic or campaign.
It stores visitor-level custom variable information for two years.
The other cookies used in Google Analytics include: