What is the _ga_ cookie?
Persists session state and associates user activity with a specific Google Analytics 4 property.
Table of Contents
About the _ga_ cookie
| Vendor | |
|---|---|
| Category Category The functional category of the technology, such as Web Analytics or Social Media. Learn more | Site Infrastructure & Security |
| Consent Category Consent Category The consent category this cookie most commonly falls under across sites we scan, normalized into four standard categories. Learn more | Performance & Analytics |
| Prevalence | Very Common |
| Popularity Popularity Popularity is calculated from our dataset of 4.5B+ cookies analyzed across hundreds of millions of web pages. Learn more | Found on 63.6% of scanned pages |
| Expiration Type | Timestamp |
| Expiration Duration | 4 days |
| Party Type Party Type Whether the cookie is first-party or third-party. Learn more | 1st-Party |
| Risk Level Risk Level Rates how sensitive the data stored by this cookie is (High, Medium, or Low) based on data classification and distribution. Learn more | Medium |
| Vendor Privacy Policy | https://policies.google.com/privacy |
| Vendor Website | https://analytics.google.com/ |
What is the purpose of the _ga_ cookie?
This cookie is set by Google Analytics 4 (GA4) using the gtag.js library. The cookie name is dynamically generated based on the specific container or Measurement ID (e.g., _ga_XXXXXXXXXX). It functions as a session identifier to group multiple user interactions, such as pageviews and custom events, into a single analytics session. The cookie value typically follows the GS1.1. or GS2.1. structured format and contains metadata like session timestamps, session sequence numbers, and an engagement flag. This tracking mechanism allows Google Analytics to measure core performance metrics like session duration, engagement rate, and user navigation paths across the website.
What are the Privacy Risks of the _ga_ cookie?
Risk Level: Medium
The cookie relies on pseudonymous identifiers to group multiple pageviews and interactions into a single session. While it does not inherently contain direct personally identifiable information (PII), it facilitates behavioral tracking and profiling of users as they navigate the site, enabling cross-session measurement. Because this data can be used for profiling but is pseudonymous, it represents a medium privacy risk.
How to Remove the _ga_ cookie from a Website
To stop setting this cookie, website administrators must remove the Google Analytics 4 tracking snippet (typically gtag.js) from the website's source code or remove the corresponding tag within a Tag Management System (such as Google Tag Manager). There is no native configuration within Google Analytics to completely disable the _ga_<container-id> cookie while still utilizing standard session tracking. Administrators can shorten the duration of the cookie via the Google Analytics Admin console (under 'Data streams' -> 'Configure tag settings'), but doing so will not stop the cookie from being placed.