Google Analytics sets 5 cookies on websites that load its scripts. Below is the full list with purpose, expiry, and whether each one needs GDPR / ePrivacy consent.
_ga_<container-id>AnalyticsExpires: 2 yearsGA4 session state cookie. Stores the current session ID and engagement state for the property; one is set per GA4 measurement ID.
_gidAnalyticsExpires: 24 hoursUsed by Universal Analytics to distinguish users over a 24-hour window. Largely deprecated since GA4 but still found on legacy sites.
_gaAnalyticsExpires: 2 yearsDistinguishes unique users by assigning a randomly generated client ID. Used by both Universal Analytics and GA4 properties.
_gatAnalyticsExpires: 1 minuteThrottles the request rate to Google Analytics on high-traffic sites. Often appears as _gat_gtag_<id>.
_dc_gtm_<container-id>AnalyticsExpires: 1 minuteUsed by Google Tag Manager to throttle the request rate to Google Analytics. Set when GTM loads GA on the page.