Online Marketing

Google Consent Mode: Setup & Implementation Guide

Integrate Google Consent Mode to align tracking with user privacy. Configure V2 parameters and use cookieless pings to recover lost conversion data.

3.6k
google consent mode
Monthly Search Volume

Google Consent Mode is an API that allows websites to communicate a user's cookie or app identifier consent status to Google tags. It ensures that Google Ads, Analytics, and third-party tags adjust their behavior based on the visitor’s choices. This tool helps marketers maintain data measurement while respecting privacy regulations.

Google Consent Mode acts as a bridge between your Consent Management Platform (CMP) or cookie banner and Google’s measurement tools. It does not provide a banner itself. Instead, it receives the "granted" or "denied" signals from your existing banner and tells Google tags how to act.

Google updated the tool to [Consent Mode V2 to align with the Digital Markets Act (DMA)] (Vaimo). This version is a requirement for businesses that want to continue using Google advertising and measurement features for traffic in the European Economic Area (EEA).

Implementing this mode allows you to recover data that would otherwise be lost when users decline cookies.

  • Mitigates data gaps: Uses "cookieless pings" to model conversions and behavioral data when consent is denied.
  • Ensures regulatory compliance: Helps satisfy the [EU user consent policy and the Digital Markets Act] (Google Ads Help).
  • Optimizes marketing campaigns: Without it, audience creation, remarketing, and reporting accuracy will decrease as no data is sent to advertising platforms.
  • Privacy-safe modeling: Google only reports privacy-safe key events and uses industry-leading standards to protect data.

When a visitor makes a choice on your cookie banner, the consent mode API transmits that choice to Google via specific parameters.

Consent Mode V2 Parameters

In addition to the original ad_storage and analytics_storage fields, V2 introduced two mandatory parameters: 1. ad_user_data: Controls whether user data can be sent to Google for advertising purposes. 2. ad_personalization: Controls whether data can be used for remarketing and personalized ads.

Cookieless Pings

If a user denies consent in the Advanced implementation, tags do not store cookies. Instead, they send cookieless pings to Google servers. These pings include functional information like timestamps, user agents, and referrers. They also include "coarse" information, such as whether a page visit resulted from an ad click.

You can implement Google Consent Mode in two ways. The choice depends on your legal requirements and how much modeled data you want to receive.

Feature Basic Consent Mode Advanced Consent Mode
Tag Loading Blocked until user interacts with banner. Loads immediately with "denied" defaults.
Data Transmission No data sent before consent. Sends cookieless pings if consent is denied.
Conversion Modeling Uses a general model. Uses an advertiser-specific model for more detail.
Pings No pings are sent. Sends consent state and key event pings.

Best practices

Scope defaults by region. Configure your default consent settings to apply only to regions where banners are legally required. This prevents unnecessary measurement loss in areas where consent banners do not apply.

Order your code correctly. For gtag.js or Tag Manager, the gtag('consent', 'default', ...) command must run before any commands that send measurement data, such as config or event.

Use a certified CMP. Use a Consent Management Platform from the Community Template Gallery in Google Tag Manager. This simplifies the update process and ensures consent signals are passed automatically.

Verify after implementation. After setting up, use the browser console to check that consentStatus objects reflect the user's choices. [Google requires at least 7 full days of data] (Google Ads Help) before showing uplift results in reports.

Common mistakes

Mistake: Calling the update command after the page has already started unloading. Fix: Ensure the gtag('consent', 'update', ...) command is logged well before a user navigates away to prevent the browser from canceling the network traffic.

Mistake: Implementing V1 instead of V2. Fix: Update your code or CMP settings to include the ad_user_data and ad_personalization parameters, or Google will not be able to process data for those specific advertising features.

Mistake: Incorrect tag firing order. Fix: If the consent code runs after the Google tag loads, the default "denied" statuses will not function correctly. Place the default consent snippet at the very top of your page code.

Examples

Example scenario (Basic): A user from the UK visits a site. No Google tags fire. The user clicks "Deny" on the banner. No data is ever sent to Google Ads or Analytics. Conversion modeling for this site will rely on a generic, less accurate model.

Example scenario (Advanced): A user from France visits a site. Tags load with ad_storage set to denied. A cookieless ping is sent to Google Analytics. The user clicks "Accept." The tag sends an update command, and full measurement cookies are then set for the remainder of the session.

FAQ

What happens if I don't activate Consent Mode V2? If you do not activate V2, no data will be sent to your Google advertising platforms for users in the EEA. This stops you from building audiences, performing remarketing, and accurately measuring the performance of your Ads campaigns.

Does Consent Mode make my site GDPR compliant? No. Consent Mode is a communication tool, not a compliance solution. You still need a cookie banner and a process to obtain valid legal consent from your users. It simply tells Google's tags how to behave once that legal consent is collected.

How long does it take to see results? You must have the implementation active for at least 7 full days. Google Ads and Analytics will only report uplift numbers once your site meets a specific data threshold.

What is the difference between ad_user_data and ad_personalization? The ad_user_data parameter determines if user data can be sent to Google for any advertising service. The ad_personalization parameter specifically controls whether that data can be used for remarketing (showing ads to people who have already visited your site).

Can I use Consent Mode with Microsoft Clarity? Yes. [Microsoft Clarity also enforces consent signal requirements] (Microsoft) for visitors from the EEA, UK, and Switzerland. Like Google, Clarity can be configured to only set cookies after receiving a valid consent signal from your banner.

What are "cookieless pings"? These are signals sent to Google when a user has denied consent for cookies. They contain non-identifying information like the timestamp and user agent. Google uses these pings to estimate conversion data through mathematical modeling, filling the gap left by missing cookie data.

Start Your SEO Research in Seconds

5 free searches/day • No credit card needed • Access all features