_gid is set by Google LLC via Google Analytics to distinguish individual users on each visit.
Who sets it
Google LLC — deployed via the Google Analytics script (gtag.js or analytics.js).
What it does
Assigns a unique identifier per user per day, allowing Google Analytics to count distinct users and sessions separately from the long-lived _ga cookie.
Duration
24 hours. A new _gid value is written on each new day.
Consent type
Analytics / non-essential — requires user consent under GDPR and similar privacy laws.
Short-lived companion to _ga. Remove or block via your browser's cookie controls. See how to inspect cookies for step-by-step instructions.