What is the _gid cookie?
This cookie is set by Google Analytics to assign a unique identifier to website visitors for tracking sessions and evaluating user engagement.
Table of Contents
About the _gid cookie
| Vendor | |
|---|---|
| Category Category The functional category of the technology, such as Web Analytics or Social Media. Learn more | Advertising & Paid Media |
| 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 29.6% of scanned pages |
| Expiration Type | Timestamp |
| Expiration Duration | 1 day |
| Party Type Party Type Whether the cookie is first-party or third-party. Learn more | Mixed |
| 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://www.google.com/ |
What is the purpose of the _gid cookie?
The _gid cookie is an identifier used by Google Analytics (set by the analytics.js / gtag.js library, originating in Universal Analytics and still commonly set under Google Analytics 4 deployments) to distinguish unique users and group their interactions into continuous sessions. When a visitor lands on a website equipped with Google Analytics, the tracking library assigns a randomly generated numerical client identifier to the user's browser. This identifier is stored in the _gid cookie and included in subsequent page requests, allowing the analytics platform to stitch together the user's navigational path, measure engagement time, and track specific events.
Unlike the primary _ga tracking cookie which persists for two years, the _gid cookie is specifically designed with a short lifespan of 24 hours. It exists to provide granular, day-level analytics on recent user activity and engagement trends without retaining long-term cross-session tracking in this specific cookie. The cookie itself carries no explicit personal information, storing only the randomly generated client ID string (e.g., values of the form GA1.2.<random-id>.<timestamp>).
What are the Privacy Risks of the _gid cookie?
Risk Level: Medium
The _gid cookie captures pseudonymous behavioral data, such as pages visited, session duration, and engagement metrics, which are linked to a unique user identifier. While it does not natively store direct Personally Identifiable Information (PII) such as names or email addresses, the unique ID it provides allows for tracking individual user journeys across the site and compiling behavioral profiles.
This tracking capability aligns with a Medium risk level. The data can potentially be aggregated with other identifiers or shared with Google's advertising ecosystem (if features like Google Signals are enabled) to facilitate cross-site tracking or remarketing, representing a moderate privacy risk to end-users compared to purely functional cookies.
How to Remove the _gid cookie from a Website
To remove the _gid cookie, website administrators must completely remove the Google Analytics tracking script (such as analytics.js or gtag.js) from their website's source code. If the site utilizes a Tag Management System like Google Tag Manager, the administrator must locate and delete or permanently pause the specific Google Analytics tag. This cookie cannot be disabled independently of the tracking service; removing it inherently requires fully removing or disabling the Google Analytics platform on the site.