Skip to content

Google Analytics 4 Consent Mode v2: The Implementation That Doesn’t Break Your Data

Consent Mode v2 is required for ads-data in the EU. Implement it right and you don’t lose visibility for users who decline.

John Cravey with AIFounder4 min readUpdated Jul 6, 2026

Google’s Consent Mode v2 became required in March 2024 for ads-data flow from European users. Almost every site needs it, even if your audience is mostly US — EU regulatory compliance affects ad bidding signals across borders. The good news: implemented correctly, Consent Mode v2 preserves meaningful data even when users decline cookies. Here’s the wiring.

Free estimate · 2 minutes

Measure what buyers do, not what dashboards say.

Build the estimate to see the measurement and lead system we would install for your business. About a minute, no opt-in.

Consent Mode tells Google whether the user has granted consent for: analytics storage, ads storage, ad-user data, ad personalization. When a user declines, Google sends ‘consent denied’ pings with limited data — IP truncated, no cookies set, behavioral signals reduced. Google uses these pings to model the missing data via aggregated patterns. You get partial visibility instead of zero.

If a user declines cookies and you have no Consent Mode, GA4 gets no signal at all. Worse: Google Ads can’t learn from the conversion if it happened. The data loss compounds across reporting and bidding.

When user declines, the gtag stays loaded and sends pings to GA4 with `consent: denied`. Google fills in the gaps with conversion modeling. Conversions still get attributed; reports still show meaningful data; ad bidding still learns. Reported reduction in data loss: 30-70% depending on consent rate.

Same as basic but the gtag is allowed to set non-personal cookies, store a hashed user ID for cross-device deduplication, and run more sophisticated modeling. Better data, more privacy review required. We default to basic mode for most SMB clients and recommend advanced only when ads spend justifies the additional implementation complexity.

You need a banner that asks consent and stores the user’s choice. Options:

  • Cookiebot — comprehensive, $99/year. We use this on most FH client sites.
  • OneTrust — enterprise-grade, $300+/month. Overkill for SMB.
  • Iubenda — affordable, EU-focused, ~$30/year.
  • Roll-your-own — feasible but most teams don’t maintain it well. Don’t.

Before any other gtag call, set default consent values. Then the CMP updates them when the user makes a choice.

// app/components/Analytics.tsx
"use client";
import Script from "next/script";

export function Analytics() {
  return (
    <>
      <Script id="consent-default" strategy="beforeInteractive">{`
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('consent', 'default', {
          ad_storage: 'denied',
          ad_user_data: 'denied',
          ad_personalization: 'denied',
          analytics_storage: 'denied',
          wait_for_update: 500
        });
      `}</Script>
      <Script src={`https://www.googletagmanager.com/gtag/js?id=${GA4_ID}`} strategy="afterInteractive" />
      <Script id="ga4-init" strategy="afterInteractive">{`
        gtag('js', new Date());
        gtag('config', '${GA4_ID}');
      `}</Script>
    </>
  );
}

When the user clicks Accept or Decline in your CMP banner, call gtag.consent.update with their choices.

// When user accepts
(window as any).gtag?.("consent", "update", {
  ad_storage: "granted",
  ad_user_data: "granted",
  ad_personalization: "granted",
  analytics_storage: "granted",
});

// When user declines (only analytics, no ads)
(window as any).gtag?.("consent", "update", {
  ad_storage: "denied",
  ad_user_data: "denied",
  ad_personalization: "denied",
  analytics_storage: "granted",  // optional, if your CMP allows partial
});

Step 4: verify in GA4

GA4 → Admin → Property Settings → Reporting Identity. You should see the option for ‘Blended’ identity, which uses modeled data alongside observed data. Enable it. After 48 hours of traffic, GA4 reports start showing modeled conversions filling in the gaps from declined-consent users.

Most ‘accept cookies’ banners are awful — full-screen modals that block the page, complex toggle hierarchies, dark patterns. Don’t do that. A small banner at the bottom of the screen with ‘Accept’ and ‘Decline’ buttons of equal visual weight, optional ‘Customize’ for the curious. Honest, fast, doesn’t harm bounce rate.

Consent Mode applies to GA4 and Google Ads tags running in the browser. Server-side conversion events from your server action are NOT subject to the user’s browser consent. The lead form submission is a first-party transaction; the server can fire the conversion regardless. This is one of the reasons we fire critical conversions server-side.

  • EU users who decline send zero data to GA4. You see massive data loss with no modeling fill-in.
  • Google Ads can’t use EU conversion data for bidding learning. Smart Bidding degrades.
  • Google has indicated they’ll deprecate non-CM v2 tags eventually. Updating later is harder than now.

Cookiebot setup specifically

Cookiebot has a Google Consent Mode integration that auto-configures gtag consent based on the user’s banner choice. You add Cookiebot’s script tag, configure your domain in the Cookiebot dashboard, and the integration handles the consent.update calls. Total wire-up time: 20 minutes.

GA4 reports will show a mix of observed conversions (consented users) and modeled conversions (declined users). The split is visible in the data quality settings. Total conversion counts approximate what you’d see without consent enforcement. CTR and engagement metrics from declined users are missing — those don’t get modeled.

How this lands across FH client work

Every FH client site that runs GA4 has Consent Mode v2 implemented via Cookiebot. Implementation time per site: about an hour. Annual cost per site: $99. The recovered data quality across declined-consent users is meaningful — typically 15-40% of EU traffic — and the regulatory posture is clean. If you’re running GA4 without Consent Mode v2 in 2026, book a consultation — implementation is a half-day engagement and the recovered data justifies the cost.

Answers

Frequently asked questions

It communicates a visitor's consent state to the analytics and advertising tags, so they adjust what they collect rather than being blocked entirely. The point is to keep some modelled measurement while respecting a refusal, instead of losing the visitor from the data completely.

What happens without it?

Tags either fire fully, which is a compliance problem in consent jurisdictions, or are blocked entirely, which means the refusing visitors vanish from your data. Neither is acceptable, and the second is why sites that added a banner saw traffic appear to collapse.

What is the difference between basic and advanced mode?

Basic blocks the tags until consent is given, so pre-consent behaviour is entirely absent. Advanced loads them in a restricted state that sends cookieless signals, which preserves modelled measurement. Advanced gives better data; basic is simpler and stricter.
For any site with visitors in consent jurisdictions, yes, and building one yourself is a poor use of time. The platform's job is capturing and storing the choice reliably and passing it to your tags, which is more fiddly than it looks.

What is the implementation order?

Set the consent defaults before any tag loads, then update the state when the visitor chooses. Getting the order wrong means tags fire in an unknown state, which is the specific failure this feature exists to prevent and it is invisible without checking.

How do I verify it is working?

Check the consent state in the tag debugging view before and after making a choice, and confirm the analytics property shows the modelled behaviour. An implementation that was never verified is usually wrong, because nothing errors when consent signals are not being passed.

How should the banner be worded?

Plainly, with a genuine reject option that is as easy to click as accept. Dark patterns are both a compliance risk and a conversion problem, because a visitor fighting a banner is a visitor thinking about leaving rather than about your service.
It makes it more honest. Some of what you see becomes modelled rather than observed, which is a real caveat when you report it. The alternative is either collecting data you should not or losing those visitors entirely, and both are worse for decisions.

Does this apply if I have no visitors in the EU?

Consent requirements are not only European any more, and traffic rarely respects your assumptions about geography. Implementing it is not expensive, and the cost of discovering you needed it after a complaint is considerably higher.

What breaks most often in these implementations?

Defaults set after the tag loads, a platform that stores the choice but never communicates it, and a banner that blocks measurement on the very pages where visitors convert. All three present as a mysterious drop in data rather than as an error.

Does the banner hurt conversion rate?

A badly designed one does, particularly on mobile where it can cover the call button. Keep it small, keep it out of the way of your primary action, and remember the visitor came to do something rather than to read a preferences dialog.

What is the minimum defensible setup?

A recognised consent platform, defaults set before any tag, the choice communicated to the tags, verification that it works, and a banner that offers a real refusal. That covers the requirement and keeps most of the measurement, which is the whole objective.

Question we did not answer? Ask us directly and we will answer it here.

John Cravey, Founder
Written by
John Cravey
Founder

Founder of Frontend Horizon. Writes most of the long-form work on the FH blog.

Newer post
Cloudflare Turnstile: The CAPTCHA That Doesn’t Make Your Users Hate You
Older post
Next/Image with Supabase Storage: The Pattern That Saves 70% of Hero Image Bandwidth
Keep reading

More from the blog

Analytics·4 min

Privacy-First Analytics in 2026: GDPR, CCPA, AI Act, and What SMBs Actually Need

Privacy regulations are converging, not multiplying. Here’s what compliance actually looks like in 2026.

Retail·5 min

Zero to One Million in Local Retail: The Omnichannel Playbook for Stores That Sell Online and Off

In retail the store is a channel, the sidewalk is a channel, and the receipt is a channel. The winners just refuse to waste any of them.

Search Console·10 min

Turn Google Search Console Into an AI Opportunity Finder

You are already ranking on page two for things you never wrote about. An AI agent's job is to find them before you waste effort elsewhere.