Features Pricing GDPR cookie banner Google Consent Mode v2 WordPress plugin Cookiebot alternative For Agencies GDPR ePrivacy About Contact
RO | EN
Start Free →
Statistics

_gid Cookie (Google Analytics) – What It Is

_gid is an HTTP cookie set by Google Analytics to distinguish unique visitors on a website, typically lasting 1 day. It falls under the statistics category and, under GDPR/ePrivacy rules, requires visitor consent before being placed.

Name
_gid
Provider
Google Analytics
Category
Statistics
Type
HTTP cookie
Lifetime
1 day
Consent
Yes, before it is set (GDPR / ePrivacy)
Prevalence
found on 7 Romanian sites scanned by CookieFix

What is the _gid cookie?

_gid is one of the standard cookies installed by Google Analytics (Universal Analytics and, in some implementations, later versions too) whenever the analytics script (gtag.js or analytics.js) runs on a web page.

It is set automatically, usually on the first page load, by the Google Analytics JavaScript code included by the site owner, rather than by Google directly as a separate third party. CookieFix's scanner found it on 7 of the Romanian websites analyzed in its sample, confirming it as one of the most common traffic-measurement cookies.

What data it stores

_gid stores a randomly generated unique identifier used by Google Analytics to distinguish visitors from one another over the course of a day. The value itself does not contain direct identifiers such as a name or email address, but it is considered personal data when combined with other information (IP address, browsing behavior).

It is sent to Google Analytics domains (for example, google-analytics.com or analytics.google.com subdomains) each time the visitor interacts with the page, to report session activity.

What it is used for

The main purpose of _gid is to let Google Analytics differentiate unique users over a 24-hour period, giving the site owner statistics on visitor counts, pages viewed, session duration, and browsing behavior.

For the site, this data helps optimize content, user experience, and marketing campaigns based on actual traffic performance.

Does it require consent?

_gid belongs to the "statistics" category and is not strictly necessary for the site to function. Under the ePrivacy Directive (as implemented locally, e.g. Romania's Law 506/2004) and the GDPR, placing it requires the visitor's prior, informed, freely given consent.

  • The site owner must disclose the cookie in the cookie policy, including its purpose, duration, and provider.
  • The Google Analytics script must not load before the visitor accepts the statistics category.
  • Withdrawing consent must be as easy as giving it, in line with data protection authority guidance.

How to block or delete _gid

A visitor can delete or block _gid through browser cookie settings (per-site cookie management) or by using extensions such as the Google Analytics Opt-out Add-on.

For site owners, proper blocking means the Google Analytics script must not run at all before consent is given, not just hiding the banner. A CMP like CookieFix can automatically block the script from loading until the visitor consents to the statistics category, preventing the cookie from being set prematurely.

Frequently asked questions

It's a statistics cookie set by Google Analytics to distinguish unique visitors to a website over the course of a day.

Its typical duration is 1 day, much shorter than the _ga cookie, which can last up to 2 years.

Yes, as a statistics cookie it requires prior consent under GDPR and applicable ePrivacy rules, so it cannot be set automatically before acceptance.

It can be deleted via the browser's cookie settings or blocked with dedicated extensions; declining the statistics category in the consent banner prevents it from being set in the first place.

Updated 7 September 2026 · Information comes from the provider’s public documentation and CookieFix scans; it is not legal advice.