Back to the help center

Integrations

Google Consent Mode v2 Setup

Configure Google Consent Mode for proper analytics tracking

Available on the Pro plan and above. See pricing for what each plan includes.

Google Consent Mode v2 is Google's framework for respecting user consent choices while still enabling measurement through modeling. This guide covers what Consent Mode v2 is, how to configure it with GetCookies, the difference between Basic and Advanced modes, and how to verify your setup.

Google Consent Mode lets your site communicate user consent choices to Google services (Analytics, Ads, Tag Manager) so they adjust their behavior accordingly. When a user declines cookies, Google tags send "cookieless pings" instead of setting cookies, allowing Google to model conversions and analytics data without violating the user's choice.

Consent Mode v2 introduced new consent signals required by Google for EEA users starting March 2024:

SignalPurposeDefault state
ad_storageEnables storage (cookies) for advertising purposesdenied
ad_user_dataAllows sending user data to Google for advertising (new in v2)denied
ad_personalizationEnables personalized advertising and remarketing (new in v2)denied
analytics_storageEnables storage for analytics purposesdenied
functionality_storageEnables storage for site functionality (language, preferences)denied
personalization_storageEnables storage for personalization (recommendations)denied
security_storageEnables storage for security (authentication, fraud prevention)granted
  • Required by Google: Since March 2024, Google requires Consent Mode v2 for any site serving ads to EEA users. Without it, you lose remarketing audiences and conversion measurement for EU traffic.
  • Data modeling: Even when users deny consent, Google can model conversions and behavior using cookieless pings, filling some of the gaps left by visitors who decline.
  • Compliance: Consent Mode ensures Google tags respect user choices without you needing to manually block/unblock each tag.

Basic Mode

  • Google tags are completely blocked until the user consents.
  • No data is sent to Google before consent.
  • Simpler to implement but you lose all pre-consent data -- no modeling possible.
  • Google tags load immediately but send cookieless pings (no cookies set, no user identifiers) before consent.
  • After consent, tags switch to full measurement mode.
  • Google uses the cookieless pings to model conversions and analytics data.
  • You recover significantly more conversion data while remaining compliant.

GetCookies uses Advanced mode by default when Google Consent Mode v2 is enabled.

GetCookies handles the entire Consent Mode lifecycle automatically:

  1. Page load (before any tags): GetCookies sets all consent signals to "denied" via gtag('consent', 'default', ...). This happens at the Consent Initialization phase, before any other tags fire.
  1. User has existing consent: If the user previously gave consent (stored in localStorage), GetCookies immediately updates the consent signals to match their previous choices.
  1. Banner displayed: The user sees the consent banner and makes a choice.
  1. Consent updated: When the user accepts/rejects/customizes, GetCookies calls gtag('consent', 'update', ...) with the new consent state. Google tags respond in real-time.
  1. Subsequent page views: Consent state is restored from localStorage on each page load, keeping Google tags in the correct mode.

Configuration

  1. In your GetCookies dashboard, go to Domains > [your domain] > Widget Configuration.
  2. Under Integrations, enable Google Consent Mode v2.
  3. Verify the category-to-signal mapping:
GetCookies categoryGoogle Consent Mode signals
Necessarysecurity_storage (always granted)
Analyticsanalytics_storage
Marketingad_storage, ad_user_data, ad_personalization
Preferencesfunctionality_storage, personalization_storage
  1. Save your changes.

Step 2: Configure Additional Options

OptionDescriptionRecommended
URL PassthroughPasses ad click identifiers (gclid, dclid) via URL parameters when cookies are deniedEnabled
Ads Data RedactionRedacts ad click identifiers in requests when ad_storage is deniedEnabled for strict compliance
Wait for UpdateMilliseconds to wait for consent before firing tags500ms

Step 3: Configure Your Google Tags

If using Google Tag Manager:

  1. Install the GetCookies GTM template (see "GTM Template Installation Guide").
  2. Set the GetCookies tag trigger to Consent Initialization - All Pages.
  3. For each Google tag, configure consent requirements:
  • GA4 Config: Require analytics_storage
  • Google Ads Conversion: Require ad_storage, ad_user_data
  • Google Ads Remarketing: Require ad_storage, ad_user_data, ad_personalization
  1. Publish your GTM container.

If using gtag.js directly:

GetCookies automatically intercepts gtag() calls and sets consent defaults before your GA4/Ads snippets execute. No additional configuration is needed beyond the standard GetCookies script installation.

Step 4: Set Region-Specific Defaults (Optional)

For sites serving both EU and non-EU visitors, you can set different default consent states per region:

  • EEA/UK/CH visitors: All non-necessary consent types default to "denied" (opt-in required by GDPR).
  • US visitors: You may choose to default to "granted" for analytics/functionality and only require opt-in for advertising (depends on your CCPA interpretation).
  • Rest of world: Configure based on your legal requirements.

GetCookies handles geo-targeting automatically based on your compliance settings.

Verification

Method 1: Google Tag Assistant

  1. Install the Tag Assistant Companion Chrome extension.
  2. Start a debug session on your site.
  3. Open your site in an incognito window.
  4. In Tag Assistant, check the Consent tab:
  • Before interacting with the banner: all consent types should show "denied".
  • After accepting: relevant consent types should show "granted".
  • After rejecting: all non-necessary types should remain "denied".

Method 2: Chrome DevTools

  1. Open your site in incognito mode.
  2. Open DevTools > Console.
  3. Look for consent-related messages from GetCookies (e.g., "GetCookies: Consent defaults set").
  4. Type dataLayer in the console and look for gtm.consent events.
  5. After accepting consent, check for consent update events in the dataLayer.

Method 3: Google Analytics Real-Time Reports

  1. Open your GA4 property > Real-time report.
  2. Visit your site and accept consent.
  3. Verify events appear in the real-time report.
  4. Clear cookies, revisit, and reject consent.
  5. Verify that no events appear (or only modeled/cookieless pings, which show differently in reports).

Method 4: Network Tab

  1. Open DevTools > Network.
  2. Filter for google or collect.
  3. Before consent: you should see requests with gcs=G100 (all denied) parameter.
  4. After granting analytics: you should see gcs=G110 or similar (analytics granted).
  5. The gcs parameter encodes the consent state -- see Google's documentation for the full encoding.

Troubleshooting

  • Verify Google Consent Mode v2 is enabled in your GetCookies dashboard.
  • Check that the GetCookies script loads before your Google tags.
  • In GTM, ensure the GetCookies tag fires at Consent Initialization, not "All Pages".
  • In GTM, check each tag's Consent Settings -- they must require the appropriate consent types.
  • Verify tag firing order in GTM Preview mode. GetCookies must fire first.
  • This is expected initially. Google needs 7-30 days of data to build accurate conversion models.
  • Ensure Advanced mode is enabled (not Basic) so Google receives cookieless pings for modeling.
  • Check that URL Passthrough is enabled to preserve ad click information.
  • Verify the implementation using Tag Assistant.
  • Ensure gtag('consent', 'default', ...) fires on every page before Google Ads tags.
  • It can take 24-48 hours for Google Ads to detect Consent Mode after implementation.

Still stuck?

Email [email protected] with your domain and what you tried. Signed-in customers can also open a ticket from the dashboard.