Skip to main content
CookieBeam
Back to Guides
Compliance10 min readBy Armin Zaribaf

Google Consent Mode v2: Complete Implementation Guide

Learn how Google Consent Mode v2 works with CookieBeam: the seven consent types, Basic versus Advanced mode, loader order, and how to check Google Ads modeling eligibility and GA4 consent status.

Google Consent Mode v2 is a framework that lets your website communicate user consent choices directly to Google's advertising and analytics tags. Basic mode blocks Google tags until consent; Advanced mode lets them send cookieless measurements when storage consent is denied.

Version 2 added two consent types: ad_user_data and ad_personalization. Since March 2024, Google has used them to enforce its EU user consent policy. Without them, Google features that depend on EEA user consent, such as ad personalization and remarketing audiences, can be limited.

The full Google consent-type inventory includes seven types. Values are granted or denied; v2 added ad_user_data and ad_personalization. Configure the types used by your integration.

Google Consent Mode v2 Signals
SignalControlsNew in v2
analytics_storageGA4 measurement cookies and session dataNo
ad_storageGoogle Ads conversion and remarketing cookiesNo
ad_personalizationRemarketing and personalized advertisingYes
ad_user_dataSending user data to Google for ad targetingYes
functionality_storageCookies needed for site functionalityNo
personalization_storageStorage for personalized site experiencesNo
security_storageSecurity-related cookies (e.g. bot detection)No

Google offers two implementation modes with very different implications for your data quality:

Basic vs Advanced Consent Mode

FeatureBasic ModeAdvanced Mode
Tags fire before consentNo, tags blocked until consentYes, tags fire immediately in restricted mode
Conversion modelingGeneral model, subject to eligibilityAdvertiser-specific model, subject to eligibility
Bounce rate dataLost for non-consenting usersSubject to GA4’s separate modeling prerequisites
Setup with CookieBeamBlock Google tags with script blocking until consentLoad CookieBeam before the Google tag; the tag loads immediately
When to choose itNo Google requests may be sent before consentYour legal review accepts cookieless pings before consent

Implementation: Step-by-Step

These steps follow the CookieBeam Google Consent Mode integration reference. Direct installation and the GTM template have different startup sequences. Configure the one you deploy.

Google Consent Mode v2 Setup

1

Enable Google Consent Mode and publish

Open your banner's App Integrations page. In Google Consent Mode, enable the integration and set Wait for Update, Ads Data Redaction, and URL Passthrough as needed. Click Save Consent Mode Settings, then publish the banner. The ad_user_data and ad_personalization keys follow the marketing category.

2

Install the CookieBeam loader before Google tags

For direct installation, place the loader near the start of <head>, before the Google tag and its config or event commands. Do not add async or defer. The published loader issues the consent default command, so do not add a second hand-written default. See the script-tag instructions.

For GTM, use the CookieBeam template on Consent Initialization – All Pages. The template sets its own defaults. Use one installation method per page.

3

Choose Basic or Advanced behavior for Google tags

For Advanced mode, load the Google tag normally after CookieBeam. For Basic mode, keep the Google tag inert until consent with script blocking.

4

Verify defaults and updates in Tag Assistant

Use Google Tag Assistant to inspect consent defaults and updates. Test acceptance, rejection, and withdrawal against the consent types your integration configures. In GTM Preview, check the Consent tab.

5

Check Google Ads and GA4 status

In Google Ads, open a website conversion action's Diagnostics tab. In GA4, open Consent settings for the data stream. The steps are below.

Code Implementation

With direct installation, the page order is: CookieBeam loader first, then the Google tag. CookieBeam issues the default command from your published settings and regional rules, before the Google tag loads.

index.html
1 <!-- 1. CookieBeam loader: synchronous, near the start of <head>. -->
2 <!-- It issues gtag('consent', 'default', ...) from your published banner settings. -->
3 <script id="CookieBeam" src="https://cdn.cookiebeam.com/banner/PUBLIC_BANNER_ID/default/loader.js" type="text/javascript"></script>
4
5 <!-- 2. Google tag AFTER the loader (Advanced mode). -->
6 <!-- For Basic mode, keep it inert until consent with type="text/plain" and data-category. -->
7 <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
8 <script>
9 window.dataLayer = window.dataLayer || [];
10 function gtag(){dataLayer.push(arguments);}
11 gtag('js', new Date());
12 gtag('config', 'G-XXXXXXXXXX');
13 </script>
consent-update.js
1 // CookieBeam sends an update like this after each visitor choice.
2 // You do not need to write it. Keys follow the category mapping:
3 // analytics -> analytics_storage; marketing -> ad_storage, ad_user_data, ad_personalization
4
5 // Example: User accepts analytics + marketing
6 gtag('consent', 'update', {
7 'analytics_storage': 'granted',
8 'ad_storage': 'granted',
9 'ad_personalization': 'granted',
10 'ad_user_data': 'granted',
11 });
12
13 // Example: User accepts analytics only
14 gtag('consent', 'update', {
15 'analytics_storage': 'granted',
16 'ad_storage': 'denied',
17 'ad_personalization': 'denied',
18 'ad_user_data': 'denied',
19 });

Consent Mode v2 Verification Checklist

  • CookieBeam runs before the Google tag

    Direct installation: the loader is near the start of the head, without async or defer. GTM: the template uses Consent Initialization – All Pages.

  • One consent default per page load

    Tag Assistant shows the CookieBeam default before Google tag commands. Remove other hand-written default commands.

  • Both v2 keys are present

    ad_user_data and ad_personalization appear in the default and in each update, alongside ad_storage and analytics_storage.

  • An update follows every choice

    Test acceptance, rejection, and withdrawal in fresh sessions and confirm the update carries the expected states.

  • Google Ads diagnostics checked

    Open a website conversion action and review its Diagnostics tab for the consent mode status.

  • GA4 consent settings checked

    In GA4 Admin, open Data collection and modification, then Consent settings, and review each web data stream.

Troubleshooting Common Issues

Even with careful implementation, Google Consent Mode v2 can produce unexpected behaviour. Below are frequent problems and how to check them.

Signals Not Updating After User Consent

If Google tags stay in restricted mode after a visitor accepts, check in Tag Assistant that a consent update follows the choice. Then check the page source: the loader must not be delayed by async, defer, or a script optimizer, and the page must not load CookieBeam twice. Also check that the banner was republished after you enabled the integration.

GA4 Showing Zero Engaged Sessions

If you suddenly see zero engaged sessions or a dramatic drop in GA4 data, check that analytics_storage is being set to granted on consent acceptance, not just ad_storage. In CookieBeam, analytics_storage follows the analytics category, so check that the services are assigned to it.

Conversion Modeling Not Appearing in Google Ads

Review the existing Conversions column and the Google Ads eligibility section below. A missing separate modeled-conversions column is not a setup failure.

Tag Assistant Shows No Consent Default

For direct installation, confirm the published banner has Google Consent Mode enabled and the loader runs before the Google tag. For GTM, confirm the CookieBeam template fires on Consent Initialization – All Pages. Direct-load settings do not configure the GTM template.

Here, full blocking means withholding Google tags until consent while retaining a supported measurement setup for consenting users: the Basic path. Basic can use general modeling; Advanced supplies advertiser-specific calibration. Blocking all measurement permanently is not a modeling setup.

See Google’s Basic and Advanced comparison. Neither approach guarantees modeled results.

Consent Mode vs Full Tag Blocking

AspectBlocking Until Consent (Basic)Consent Mode (Advanced)
Data sent on refusalNoneAnonymous cookieless pings only
Conversion modelingGeneral model may be availableAdvertiser-specific model may be available
Legal reviewNo Google requests before consentCookieless pings are sent before consent; review them
Impact on Google Ads optimisationSignificant loss of signalSmart Bidding can use modeled conversions when eligible
Audience list buildingNo data for non-consenting usersAudience eligibility depends on advertising consent
When to choose itPings before consent are not acceptable for your siteYour legal review accepts cookieless pings

In Advanced mode, Google tags still send requests while storage is denied. Google's consent mode overview lists what these cookieless pings can contain, such as a timestamp, user agent, referrer, and the consent state. Every request also reaches Google from the visitor's IP address. Treat the choice between Basic and Advanced as a legal decision for your site. Neither mode is automatically compliant.

Google Ads Modeling: Eligibility and Reporting

Google Ads

Google Ads’ current quality checks require correct implementation and 700 daily ad clicks over seven days for each country/domain grouping, followed by model training. Eligibility and results vary; there is no fixed 30-day or 50-monthly-conversion rule.

Modeled results are included in the existing Conversions column. Blocking cookieless pings can reduce calibration without universally ruling out modeling.

Google Ads conversion modeling and GA4 behavioral or key-event modeling are separate. Do not apply the Ads eligibility threshold or reporting instructions to GA4; check the relevant product’s requirements.

Checking Consent Signals in Google Ads and GA4

1

Open GA4 Consent settings

In GA4 Admin, under Data collection and modification, open Consent settings and select your web data stream. Check whether analytics and ads consent signals (ad_user_data and ad_personalization) are detected. Labels can change, and new signals may take time to appear.

2

Open the Google Ads conversion Diagnostics tab

In Google Ads, go to Goals → Conversions → Summary, select a website conversion action, and open Diagnostics. Google reports whether consent mode is implemented and whether modeling is active.

3

Review consent decisions in CookieBeam

Use CookieBeam Analytics to review recorded accept, reject, and preference decisions. Compare equivalent periods after a banner change. These figures describe recorded interactions, not Google's modeling.

4

Re-check after banner or tag changes

After republishing the banner, changing regional rules, or editing tags, repeat the Tag Assistant checks for acceptance, rejection, and withdrawal.

5

Review Google Ads conversions separately

Use the existing Conversions column in Google Ads. Follow the eligibility guidance above; do not add a separate modeled-conversions column.

Google Consent Mode v2 covers Google's own tags, but most sites also run vendor tools that need their own consent signals. CookieBeam includes bridges that read the same Consent Mode v2 state your banner computes for Google and translate it into each vendor's native consent API. One banner decision, all vendors signaled.

Vendor Consent Bridge Guides

All Bridges Overview

Architecture and comparison of all eight vendor bridges

GTM Bridge

DataLayer consent events and the CookieBeamGTM API

Meta Pixel

fbq consent grant/revoke and Limited Data Use

Microsoft Ads (UET)

ad_storage signal for conversion tracking

Microsoft Clarity

consentv2 with ad_Storage and analytics_Storage

HubSpot

doNotTrack and revokeCookieConsent from analytics

Matomo

Cookie consent vs tracking consent, cookieless mode

Shopify

Customer Privacy API setTrackingConsent

Adobe (Alloy)

Experience Platform setConsent for collect and marketing

Webflow

Optimize personalization via localStorage and wf API

Frequently Asked Questions

Is Google Consent Mode v2 mandatory for all websites?

No. Google's EU user consent policy applies to advertisers who use its ad measurement, personalization, or remarketing features with users in the policy's scope. For those sites, Consent Mode v2 is how Google tags receive consent. GA4 features that depend on consent signals also need it. Check the policy for its current regions. A site without Google tags does not need Consent Mode.

What is the difference between Basic and Advanced Consent Mode?

Basic withholds tags until consent and can use a general model. Advanced sends cookieless measurements with denied storage and supports advertiser-specific modeling. See Google’s comparison and the eligibility section above.

Does Consent Mode v2 mean Google can track users who declined?

It depends on the mode. In Basic mode, Google tags stay blocked until consent, so nothing is sent before a choice. In Advanced mode, Google tags send cookieless pings while storage is denied. They do not use Google cookies for the denied storage types, but they do reach Google. Google's consent mode overview lists what the pings can contain. Have your legal adviser review whether Advanced mode suits your site.

How do I verify Consent Mode is working correctly after implementing CookieBeam?

Follow Google’s Tag Assistant checks and the CookieBeam integration reference. Inspect initial consent defaults and subsequent updates for the types your integration uses. Test acceptance, rejection, and withdrawal.

Can I implement Consent Mode without Google Tag Manager?

Yes. Google Tag Manager is not required. With direct installation, the CookieBeam loader issues the consent default and later updates through gtag. Place it before the <script async src="https://www.googletagmanager.com/gtag/js"> tag and its config commands. If you use GTM, use the CookieBeam template on Consent Initialization – All Pages instead. See the integration reference.

What happens to my Google Ads campaigns if I don't implement Consent Mode v2?

Without consent signals for traffic in the policy's scope, Google can limit features that depend on consent, such as ad personalization and remarketing audiences. Conversions from visitors who decline are not measured with cookies, and modeling needs a supported consent mode setup. Check the EU user consent policy and your account's Diagnostics tab for the current effect on your account.

How does CookieBeam automate Consent Mode v2 implementation?

With direct installation, the published loader sets the consent default on page load. It runs before Google tags when you place it first in the head. It then sends a gtag('consent', 'update', ...) command after each visitor choice, mapped from the accepted categories. Returning visitors with stored consent start from their stored categories. Withdrawal sends an update with denied states, and partial consent is mapped per category. With the GTM template, the template sets the defaults and CookieBeam sends the updates. You configure this on the App Integrations page and in regional rules. See the integration reference.

For CookieBeam settings and category mappings, use the canonical integration reference. For the full technical reference, see Google's consent mode implementation guide. The Google Ads EU user consent policy covers the EEA enforcement requirements, and the GTM consent configuration documentation covers the Tag Manager template side. For vendor-specific bridges beyond Google, see the consent mode integrations overview.

7 min read

GPP, MSPA & US State Signals: A Publisher's Guide

The US Privacy String you built for CCPA was deprecated in January 2024. GPP, the US National string, and the MSPA replaced it, and getting the signal wrong can be a misrepresentation. Here's how the new US privacy signals move through the ad stack.

5 min read

Building a TCF CMP That Passes IAB Validation

What it takes for a Consent Management Platform to pass IAB Europe's TCF checks: a registered CMP ID, a cleanly decodable TC String, event-listener delivery, and encoding against the right GVL version.

9 min read

How to Migrate Your CMP Without Losing Existing Consent Records

A step-by-step technical guide to switching consent management platforms without losing consent records, triggering mass re-consent, or breaking Consent Mode. Covers export, category mapping, parallel runs, and zero-downtime migration patterns.

AltStyle によって変換されたページ (->オリジナル) /