Does Google Analytics 4 Use Cookies? GA4 Cookie Guide for 2026 July

Does Google Analytics 4 use cookies? 🎯 Learn how GA4 cookies work, what changed from UA, and how to stay compliant in 2026 July.

Does Google Analytics 4 Use Cookies? GA4 Cookie Guide for 2026 July

Does Google Analytics 4 use cookies? This is one of the most searched questions in the GA4 community right now, and the short answer is yes — but with significant differences from Universal Analytics. GA4 still relies on first-party cookies to track user sessions, but it was redesigned from the ground up to accommodate a cookieless future. For developers experimenting with golang google analytics integrations, understanding exactly how GA4 handles cookies is essential before you build any measurement pipeline or consent framework into your application.

When Google launched GA4 as the successor to Universal Analytics, cookie behavior was one of the most debated changes. Universal Analytics leaned heavily on the _ga and _gid cookies to identify users across sessions. GA4 still writes a first-party _ga cookie to the visitor's browser, but it complements this with server-side signals, Google Signals, and modeled data to fill gaps left by cookie opt-outs or browser restrictions. This layered approach is part of Google's broader shift toward privacy-preserving measurement.

Understanding GA4's cookie architecture matters enormously for anyone tracking website hits in Google Analytics. The platform's ability to stitch together user journeys — across devices, sessions, and channels — depends on the _ga identifier. Yet GA4 is also engineered to degrade gracefully when that identifier is absent. Modeled conversions and behavioral modeling kick in automatically when consent is denied, making GA4 far more resilient than its predecessor in privacy-restricted environments.

For businesses pursuing the traffic google analytics certification path, cookie mechanics are a tested domain. GA4 exam questions regularly cover how the measurement ID interacts with cookies, how data streams differ from properties, and how consent mode affects attribution. Knowing the difference between first-party and third-party cookies — and which GA4 still uses — is a foundational concept you'll encounter repeatedly both in exams and in real client work.

The regulatory landscape is also pushing GA4 cookie knowledge to the forefront. GDPR in Europe, CCPA in California, and a growing patchwork of state-level US privacy laws all require businesses to disclose and, in many cases, obtain consent for cookie-based tracking. GA4 introduced Consent Mode v2 in late 2023 and refined it through 2024 and 2025 to help publishers comply. Knowing how to configure Consent Mode correctly — and what happens to your data when users decline — is now a core analytics skill, not an optional add-on.

This guide breaks down every layer of GA4's cookie system: what cookies GA4 sets, how long they last, how they interact with Consent Mode, and what steps you need to take to remain compliant while preserving measurement accuracy. Whether you're a developer implementing GA4 via the gtag.js snippet or the Google Tag Manager container, a marketer trying to interpret session data, or a student preparing for the Google Data Analytics certification, this article has the depth you need to understand GA4 cookies in 2026.

We'll also cover the latest google analytics 4 news today, including November 2025 updates to cookie lifetimes and Consent Mode behavior, so you're working with the most current information available. Cookie-related defaults changed in the November 2025 GA4 update, and if you haven't reviewed your implementation since then, there's a good chance your setup needs attention.

Google Analytics 4 Cookies by the Numbers

📅400 daysDefault GA4 cookie lifetimeSet by Google in 2022 update
🌐1st-partyCookie type GA4 usesNo third-party cookies in GA4
📊3 cookiesPrimary cookies set by GA4_ga, _ga_<ID>, _gac_<ID>
🛡️Consent Mode v2Google's privacy frameworkRequired for EU ad personalization
🔄Nov 2025Latest GA4 cookie policy updateDefault retention changes shipped
Google Analytics 4 Cookies - Google Analytics certification study resource

What Cookies Does Google Analytics 4 Actually Set?

🍪_ga Cookie

The primary GA4 identifier cookie. It stores a randomly generated client ID that distinguishes unique users. By default it expires after 400 days and resets on each visit. This is the backbone of GA4's user identification system and the cookie most impacted by browser restrictions like Safari's ITP.

📊_ga_ Cookie

A session-specific cookie tied to your GA4 property's measurement ID. It tracks session state, including whether a session is active, the session count, and the session start time. It expires after 400 days of inactivity and is unique to each GA4 property you have configured on your site.

🎯_gac_ Cookie

Set when a user arrives via a Google Ads click. It stores campaign-related information to enable conversion attribution between GA4 and Google Ads. This cookie expires after 90 days and is only written when your GA4 property is linked to a Google Ads account with auto-tagging enabled.

🛡️No Third-Party Cookies

Unlike Universal Analytics, GA4 does not set any third-party cookies. All cookies GA4 writes are first-party, meaning they are scoped to your domain. This was a deliberate architectural decision to improve privacy compliance and future-proof the platform against browser restrictions on cross-site tracking.

🔗Google Signals (Not a Cookie)

Google Signals is not a cookie — it's a cross-device measurement feature that uses signed-in Google account data. When users are logged into Google and have ads personalization enabled, GA4 can link sessions across devices without relying on cookies, providing richer cross-device reports in the Explorer and Advertising sections.

Google Analytics 4's approach to consent and cookie privacy is one of the most significant departures from the Universal Analytics model. In UA, there was essentially one choice: either you loaded analytics or you didn't. GA4 introduced Consent Mode, now in its second major version, which allows the analytics tag to operate in a degraded but still useful state when users decline cookies. Understanding this system is critical for any analyst or developer responsible for a GA4 implementation in 2026.

Consent Mode works by accepting signals from your Consent Management Platform (CMP) and adjusting GA4's behavior accordingly. When a user grants consent for analytics cookies, GA4 operates normally — writing the _ga and session cookies, attributing sessions to traffic sources, and recording behavioral events. When a user declines, GA4 fires cookieless pings that contain no personal identifiers. Google then uses statistical modeling to estimate what those users likely did, filling in your reports with modeled data so aggregate trends remain meaningful.

For US-based websites targeting California residents, CCPA compliance adds another layer. California law doesn't require opt-in consent for analytics cookies the way GDPR does, but it does require a clear opt-out mechanism for the "sale" of personal data. If GA4 data flows into Google's advertising products — which it does when you enable Google Signals or link to Google Ads — some legal teams treat that as a data sale requiring a "Do Not Sell My Personal Information" opt-out. Configuring Consent Mode correctly ensures GA4 respects these signals.

Consent Mode v2, rolled out fully in March 2024 and refined through the google analytics 4 updates november 2025 release cycle, introduced two new consent parameters: ad_user_data and ad_personalization. These parameters sit alongside the existing analytics_storage and ad_storage signals. For EU advertisers using Google Ads, all four parameters must be properly configured or Google may restrict remarketing and conversion modeling capabilities. Non-EU sites are encouraged to implement them but not strictly required to do so.

Implementation of Consent Mode typically happens through Google Tag Manager. You load your CMP — OneTrust, Cookiebot, Usercentrics, or a custom solution — and configure it to push consent state changes to the GTM dataLayer. GTM's built-in Consent Overview tab gives you visibility into which consent types are granted or denied for any given tag firing sequence. GA4's measurement tag then reads those consent signals automatically, adjusting cookie writing and data collection accordingly without requiring additional configuration in the GA4 property itself.

One subtlety that trips up many implementations: the default consent state. If you initialize Consent Mode with gtag('consent', 'default', {...}) and set all parameters to denied, GA4 will not write any cookies until explicit consent is granted. But if you forget to set the default state, GA4 may write cookies before the consent banner even loads — which is a GDPR violation in the EU. Always define your default consent state as the very first gtag command in your page's head section, before any other tags fire.

The google analytics 4 news october 2025 coverage highlighted a significant update to how WordPress sites handle Consent Mode. Several major WordPress GA4 plugins updated their implementations to automatically configure Consent Mode defaults based on the visitor's detected geolocation, applying stricter defaults for EU/EEA visitors while using less restrictive defaults for US visitors. This geolocation-based approach reduces friction for non-EU users while maintaining GDPR compliance for European audiences, and it's now considered a best practice for multinational websites running on WordPress.

Google Analytics Certification Exam 1

Practice 50 real-style GA4 questions covering cookies, consent, and data collection

Google Analytics Certification Exam 2

Test GA4 setup, measurement IDs, and cookie configuration with timed practice questions

Google Analytics 4 Updates: Cookie Changes You Need to Know

The google analytics 4 update november 2025 brought meaningful changes to GA4's default cookie retention settings. Google extended the default cookie expiration for the _ga cookie from 2 years to 400 days for new implementations, and simultaneously updated the session timeout default from 30 minutes to a configurable range. These changes were pushed automatically to all GA4 properties, meaning existing implementations inherited the new defaults without requiring manual reconfiguration — though property administrators could override them in the Data Streams settings panel.

Beyond cookie lifetimes, the November 2025 update also introduced enhanced Consent Mode diagnostics directly in the GA4 interface. Property admins can now see a real-time breakdown of how many sessions used full cookie tracking versus cookieless pings versus modeled data, giving unprecedented visibility into how consent choices affect your measurement coverage. This dashboard was one of the most requested features in the Google Analytics community and addresses a major blind spot in previous Consent Mode implementations.

Golang Google Analytics - Google Analytics certification study resource

GA4 Cookie-Based Tracking: Advantages and Limitations

Pros
  • +First-party cookies only — no cross-site tracking, reducing privacy risk and browser blocking
  • +Consent Mode v2 enables modeled data even when cookies are declined, preserving aggregate insights
  • +400-day default cookie lifetime provides stable long-term user identification for return visitor analysis
  • +Automatic cookie domain detection simplifies cross-subdomain implementation compared to Universal Analytics
  • +Google Signals supplements cookie data with cross-device measurement for logged-in Google users
  • +Server-side tagging option allows cookie writing from your server domain, bypassing browser-level ITP restrictions
Cons
  • Cookie acceptance rates declining in EU markets mean a growing portion of traffic relies on modeled data
  • Safari's Intelligent Tracking Prevention caps first-party cookie lifetimes at 7 days for script-written cookies
  • Consent Mode modeling is a black box — you cannot audit exactly how Google fills in declined-consent gaps
  • Cross-domain tracking still requires manual configuration of linker parameters and cross-domain settings
  • Cookie-based client IDs are not portable — migrating to a new GA4 property resets all historical user identification
  • No cookie consent enforcement built into GA4 itself — compliance entirely depends on external CMP configuration

Google Analytics Certification Exam 3

Advanced GA4 privacy, consent mode, and cookie compliance practice exam questions

Google Analytics Certification Exam 4

Deep-dive GA4 tracking setup, data streams, and measurement configuration practice test

GA4 Cookie Compliance Checklist for 2026

  • Verify your GA4 implementation only writes first-party cookies scoped to your domain.
  • Configure Consent Mode v2 with all four parameters: analytics_storage, ad_storage, ad_user_data, and ad_personalization.
  • Set a default consent state of 'denied' for all parameters before any tags fire on EU/EEA pages.
  • Test cookie writing behavior in an incognito browser after declining consent to confirm no cookies are set.
  • Update your Privacy Policy to disclose GA4 cookie names, purposes, and retention periods.
  • Configure the cookie expiration override in your GA4 Data Stream settings if 400 days doesn't fit your policy.
  • Implement server-side tagging if Safari ITP is causing significant session fragmentation in your iOS traffic.
  • Link your CMP's consent signals to GTM using the Consent Overview feature and verify tag firing logic.
  • Enable Google Signals only if you have explicit user consent for ads personalization in all active markets.
  • Audit cross-domain tracking configuration if your funnel spans multiple subdomains or separate domains.

Safari ITP Limits Your GA4 Cookie to 7 Days

Apple's Intelligent Tracking Prevention (ITP) caps JavaScript-written first-party cookies at 7 days, even if GA4 requests a 400-day expiration. This means Safari users — roughly 18-25% of US web traffic — appear as new users after just one week of inactivity. Server-side tagging, which writes cookies via HTTP response headers from your own server domain, bypasses this restriction and is the recommended solution for sites where iOS/Safari traffic is significant.

For professionals pursuing the google data analytics professional certificate or the Google Analytics Individual Qualification, understanding cookies is table stakes. But the deeper certification value lies in knowing how cookie limitations affect the metrics you report on. When Safari's Intelligent Tracking Prevention shortens cookie lifetimes, your "Returning Users" metric undercounts. When Consent Mode's modeled data fills in declined-consent sessions, your conversion numbers are estimates, not exact counts. Knowing these nuances is what separates a certified analyst from someone who simply reads dashboards.

The google data analytics certification curriculum doesn't explicitly test cookie implementation syntax, but it does test conceptual understanding of how data is collected, processed, and modeled. Questions about data freshness, sampling, and the difference between observed and modeled metrics all have roots in the cookie and consent framework. If you understand that a modeled conversion is GA4's statistical estimate of what cookieless users likely did — not a recorded event — you'll answer those tricky exam questions correctly.

Google's own learning resources have expanded significantly in 2025 to address cookie and consent topics. The Google Analytics Academy courses now include dedicated modules on Consent Mode configuration, cookie policy writing, and the technical differences between first-party and third-party data collection. If you're pursuing the google data analytics professional certificate coursera pathway, Coursera's GA4 modules similarly updated their consent and privacy content in late 2025 to reflect the November release changes.

Real-world analytics work increasingly requires bridging the gap between technical cookie implementation and business reporting. A client asks why their "New Users" metric jumped 40% last month — and the answer might be that their CMP started blocking cookie writes for a larger percentage of visitors after a consent banner design change. Or a developer reports that session counts dropped after a site migration — and the culprit is a missing Consent Mode default initialization that's now blocking GA4 from writing cookies before consent is granted. These are the diagnostic skills that make a GA4 specialist genuinely valuable.

The intersection of golang google analytics integrations and cookie handling is worth special attention for backend engineers. When building server-side event tracking with the GA4 Measurement Protocol, you need to pass a client_id parameter that corresponds to the _ga cookie value on the client side.

If your Go application is sending server-side events without a client ID, those events create orphaned sessions that don't stitch to the browser-based user journey. Reading the _ga cookie from the browser request, parsing out the client ID portion, and forwarding it with your Measurement Protocol hits is the correct pattern — and it's a common implementation error that shows up in GA4 debugging sessions.

For those studying toward the google data analytics professional certificate coursera credential, the practical labs often include tasks around configuring GA4 on a sample site, verifying cookie behavior in browser developer tools, and interpreting DebugView events. These hands-on skills directly translate to exam performance. Practice opening Chrome DevTools, navigating to the Application tab, and inspecting the Cookies section for your domain — you should see _ga and _ga_<ID> cookies populated after a page load with analytics enabled.

One underappreciated aspect of the GA4 cookie system is how it interacts with AMP (Accelerated Mobile Pages). AMP pages run in a cross-origin context, which means the standard gtag.js approach cannot write first-party cookies on the publisher's domain. Instead, AMP uses the AMP Client ID API, which generates a surrogate identifier stored in the AMP cache. Linking AMP sessions to regular sessions requires explicit configuration of the AMP linker, and even then the user experience is fragmented. For most modern sites, AMP's complexity and cookie limitations make it a difficult choice to justify from a measurement perspective.

Google Data Analytics Professional Certificate - Google Analytics certification study resource

The future of GA4 is explicitly being built around a world with fewer cookies, not more. Google has been telegraphing this direction since at least 2020 with the announcement of the Privacy Sandbox initiative, and GA4's architecture reflects that roadmap. The platform's machine learning capabilities — session modeling, conversion modeling, predictive audiences — are all designed to provide useful measurement signals even as cookie coverage shrinks. Understanding this trajectory is essential for anyone making long-term analytics investment decisions.

One of the most important google analytics ga4 updates today concerns the expansion of server-side tagging support. Google Tag Manager's server-side container, which runs on your own Google Cloud infrastructure, has matured significantly and is now considered production-ready for high-traffic sites.

By moving your GA4 tag to a server-side container, you can write the _ga cookie via an HTTP Set-Cookie header from your own domain, bypassing Safari ITP's restrictions on JavaScript-written cookies. The tradeoff is infrastructure cost — server-side GTM requires a Cloud Run or App Engine deployment — but for sites where iOS traffic is significant, the measurement improvement typically justifies the expense.

Google's Privacy Sandbox APIs, including the Attribution Reporting API and the Topics API, represent the next evolution beyond cookies for advertising measurement. While these APIs are primarily relevant to ad attribution rather than analytics tracking, GA4 is expected to integrate them as they mature. For now, GA4's first-party cookie approach remains the primary measurement mechanism for most websites, but analytics professionals who understand the Privacy Sandbox direction will be better positioned to adapt their implementations as the ecosystem evolves over the next two to three years.

The relationship between website hits in Google Analytics and cookie-based measurement is often misunderstood. A "hit" in GA4 terminology is an event sent from the browser or server to Google's collection endpoint. Each hit includes the client ID from the _ga cookie, which is how GA4 associates the hit with a user and session. Without the cookie, server-less hits sent via the Measurement Protocol still work but produce isolated sessions with no user stitching unless you provide your own user ID. This is why the _ga cookie is architecturally central even as GA4 builds alternative identification mechanisms.

For marketing teams, the practical implication of GA4's cookie system is that your audience segments and remarketing lists may be smaller than you expect. If 30% of your EU visitors decline cookies and another 15% of US visitors use Safari with ITP active, nearly half your audience may not be fully tracked in your cookie-based segments. GA4's modeled audiences can help fill this gap for advertising purposes, but they require Consent Mode to be properly configured and Google Signals to be enabled. This is a conversation every analytics team needs to have with their legal and marketing counterparts.

Google analytics updates through 2025 have consistently moved in the direction of privacy-first measurement. The november 2025 changes to cookie retention, the expansion of Consent Mode diagnostics, and the ongoing improvements to modeling quality all signal that Google is investing heavily in making GA4 viable in a post-cookie world. The platform's bet is that combining first-party cookies where available, modeled data where not, and signed-in Google data via Signals will provide advertisers and publishers with enough signal to make good decisions — even as browser manufacturers and regulators continue tightening cookie restrictions.

For those preparing for Google certifications, staying current with traffic google analytics documentation is non-negotiable. Google updates the GA4 help center and the Analytics Academy content frequently, and exam questions are refreshed to reflect major platform changes. The November 2025 updates are already reflected in current exam content, so if you're studying from resources that predate late 2025, you may encounter outdated information about cookie defaults, Consent Mode parameters, or data retention settings.

Practical implementation advice starts with getting your baseline measurement right before optimizing for edge cases. Install GA4 on a test environment, open Chrome DevTools after a page load, and verify that exactly two cookies are present under your domain: _ga and _ga_<MEASUREMENT_ID>. If you see more cookies than expected, you may have a legacy Universal Analytics tag still firing alongside your GA4 implementation. If you see no cookies, your Consent Mode default state may be blocking cookie writes even without an active consent denial.

The second most important practical step is configuring your cookie expiration intentionally. GA4's default 400-day expiration is a reasonable balance between long-term user identification and privacy, but your organization's privacy policy may specify a shorter retention period. You can override the default expiration in your gtag configuration with cookie_expires parameter, or in the GA4 Data Stream settings under "More tagging settings." Whatever value you set should match what your privacy policy discloses to users — inconsistency between your technical implementation and your policy disclosure is itself a compliance risk.

For golang google analytics backend developers, the most common cookie-related mistake is reading the full _ga cookie value and passing it as the client_id in Measurement Protocol requests. The _ga cookie value looks like GA1.1.1234567890.1234567890 — but the client ID is only the numeric portion: 1234567890.1234567890. You need to strip the GA1.X. prefix before using the value. This parsing requirement is documented in Google's Measurement Protocol guide but is easy to miss, and the error produces subtly broken data rather than an obvious failure — sessions appear duplicated rather than unified.

When troubleshooting GA4 cookie issues, the GA4 DebugView is your best friend. Enable debug mode by adding debug_mode: true to your GA4 configuration or by installing the Google Analytics Debugger Chrome extension. DebugView shows you every event as it fires in near-real-time, including the client ID being used for each event. This lets you verify that server-side and client-side events are using the same client ID — and therefore being attributed to the same user — without waiting for standard reports to refresh.

Cross-domain tracking is a common scenario where cookie configuration requires extra attention. If your checkout flow lives on a separate domain from your main site — for example, shop.example.com versus example.com — GA4 must pass the client ID from one domain to the other via a URL parameter called the linker. GA4 handles this automatically when you configure cross-domain measurement in the GA4 property settings, but the automatic linker only works for anchor tag clicks. If users navigate between domains via JavaScript redirects or form submissions, you'll need to manually append the linker parameter to ensure session continuity.

Finally, build a regular audit cadence for your GA4 cookie implementation. Browser policies change — Chrome's Privacy Sandbox experiments have been ongoing since 2022 and will continue affecting measurement — and Google updates GA4 cookie defaults periodically as well. A quarterly review of your DevTools cookie inspector, your Consent Mode diagnostics dashboard, and your CMP integration will catch drift before it becomes a data quality problem. The analysts who produce consistently reliable data are the ones who treat their analytics implementation as a living system requiring maintenance, not a one-time setup that can be forgotten once deployed.

Staying current with google analytics 4 news and its ongoing development cycle is part of the job for anyone serious about GA4 mastery. Subscribe to the Google Analytics release notes, follow the official Google Analytics blog, and check the Community section of the GA4 interface where Google announces changes with varying lead times. The most impactful changes — like Consent Mode v2 and the November 2025 cookie retention updates — are announced months in advance, giving you time to update your implementation, document the changes for clients, and adjust your reporting before the changes take effect.

Google Analytics Certification Exam 5

Final-round GA4 practice exam covering cookies, Consent Mode, and advanced configurations

Google Analytics Certification Exam Answers 1

Review correct answers and explanations for GA4 cookie and privacy compliance questions

Google Analytics Questions and Answers

About the Author

Dr. Jennifer Brooks
Dr. Jennifer BrooksPhD Marketing, MBA

Marketing Strategist & Sales Certification Expert

Kellogg School of Management, Northwestern University

Dr. Jennifer Brooks holds a PhD in Marketing and an MBA from the Kellogg School of Management at Northwestern University. She has 15 years of marketing strategy, digital advertising, and sales leadership experience at Fortune 500 companies. Jennifer coaches marketing and sales professionals through Salesforce certifications, Google Analytics, HubSpot, and professional sales licensing examinations.