Google Analytics cookiesAll need consent
Google Analytics sets 12 cookies we know of. Every one may only be set after the visitor opts in.
Reviewed · Provider: Google LLC
List of Google Analytics cookies
_gaAnalyticsConsent required2 yearsDistinguishes unique users by assigning a randomly generated number as a client identifier. Sent to Google with each page request.
_gidAnalyticsConsent required24 hoursRegisters a unique ID to generate statistical data on how visitors use the website.
_gatAnalyticsConsent required1 minuteUsed to throttle request rate, limiting data collection on high-traffic sites.
_ga_<container-id>AnalyticsConsent required2 yearsHolds the GA4 session state for one measurement ID (the part after _ga_): the session number, its start time and whether it engaged.
_gat_gtag_*AnalyticsConsent required1 minuteThrottles the request rate when Google Analytics is loaded through gtag.js.
_dc_gtm_*AnalyticsConsent required1 minuteThrottles the request rate when Google Analytics is loaded through Google Tag Manager.
__utmaAnalyticsConsent required2 yearsDistinguishes users and sessions in the legacy ga.js / Universal Analytics library.
__utmbAnalyticsConsent required30 minutesMarks the start of a new session in the legacy ga.js library.
__utmcAnalyticsConsent requiredSessionKept for interoperability with urchin.js; together with __utmb it tells whether the visitor is in a new session.
__utmtAnalyticsConsent required10 minutesThrottles the request rate in the legacy ga.js library.
__utmzAnalyticsConsent required6 monthsStores the traffic source or campaign that brought the visitor to the site.
__utmvAnalyticsConsent required2 yearsStores visitor-level custom variable data in the legacy ga.js library.
How to handle Google Analytics cookies
- 1Load it only after consent
Hold the Google Analytics script until the visitor accepts analytics cookies. Blocking the script is what stops the cookies; hiding them in a banner does not.
- 2Make Reject work
After a visitor rejects, none of the 12 consent-requiring cookies below may be set or kept.
- 3Name every cookie in your policy
List each cookie by name with its purpose, provider (Google LLC) and lifetime.
- 4Check the result, not the settings
Open your site in a private window, reject cookies, and look at what was stored. Or run a scan and compare the three stages.
Tools that help: tracking script blocker · Consent Mode v2 generator
Other vendorsAnd the cookies they set
Does Google Analytics wait for consent on your site?Scan it in 2 minutes
Free scan · every cookie before consent, after Reject and after Accept