Google Consent Mode v2 adds two signals, ad_user_data and ad_personalization, to ad_storage and analytics_storage, and Google’s tags use them to decide what they may do with each visitor’s data. To set it up, you set the signals to denied before any Google tag loads, then send an update with the visitor’s banner choice. ConsentLayer does both from the ConsentLayer tag in <head>, and Consent Mode v2 is on every plan, including Free.
How Google Consent Mode v2 works on a client site
Consent Mode is a set of named consent states that a site passes to Google’s tags through gtag.js or Google Tag Manager. Each state is granted or denied, and each covers one use of data, such as advertising cookies, analytics cookies, sending user data to Google for ads, or showing personalized ads. Version 2 includes the two ad states for user data and personalization, so a setup without them leaves those uses unanswered.
On every page, before any Google tag sends data, the site sets a default for each state, which means denied for anything that needs consent. When the visitor accepts, rejects, or saves custom choices on the banner, the site sends an update that changes the states to match.
Google’s tags then follow the current states, so they set cookies when the ad and analytics states are granted and hold cookies back when they are denied. The defaults have to run early in <head>, ahead of the Google tags, or the tags act before they know the visitor’s choice.
What Google Consent Mode v2 changes
The two new signals: ad_user_data and ad_personalization
Google needs these two signals to say granted before it uses an EEA visitor’s data for ads or shows that visitor personalized ads. In Google’s own words:
- ad_user_data “Sets consent for sending user data to Google for online advertising purposes.”
- ad_personalization “Sets consent for personalized advertising.”
Basic and advanced consent mode
In basic mode, “you prevent Google tags from loading until a user interacts with a consent banner,” and with no consent “no data is transferred to Google at all – not even the consent status.” In advanced mode, “Google tags load when a user opens the website or app,” and “While consent is denied, the Google tags send measurements without cookies.” Basic mode is easier to explain to a cautious client, because nothing reaches Google before the click.
Why a banner alone sends no signals
Say you take over a client site whose banner shows and sets its own cookie, but has no Consent Mode code. Google states that “By default, no consent mode values are set,” so the GA4 and Ads tags on that site receive no consent state at all, whatever the visitor clicked.
What you need before you start
Gather these for each client site:
- Edit access to the site’s
<head>, through the theme or the builder’s custom code field. - A list of every Google tag on the site (GA4, Google Ads, gtag.js, the GTM container ID), taken from the page source, because a plugin can print its own gtag.js snippet.
- Edit and publish access to the client’s GTM container when they use one, for the trigger changes in step 5.
Keep that list in the site’s handover notes for the next theme update. To pick a tool first, start with choosing a consent management platform for client sites.
Set up Google Consent Mode v2, step by step
1. Create the site and scan its tags
Give your agent one prompt with the client’s domain. Put that domain where these prompts say yourclient.com:
Set up ConsentLayer for yourclient.com and give me the install snippet.
Your agent calls setup_site, one tool call that creates the site and scans it. It also configures consent categories and returns the ConsentLayer tag with a real project key. The full agent flow is in set up consent management by telling your coding agent.
Without an agent, add the site in the ConsentLayer dashboard and copy the ConsentLayer tag it shows.
2. Put the tag in <head> before your Google tags
The ConsentLayer tag must load synchronously, with no defer and no async, before other scripts. Google warns that “If your banner loads asynchronously, it might not always run before your Google tags.” The default command also takes wait_for_update, “a millisecond value to control how long to wait before data is sent,” and the choice itself goes out when you “use the update command.”
Paste the tag by hand in the theme rather than through GTM. If your agent can edit the site’s code, send this prompt:
Add the ConsentLayer snippet as the first script in <head>, above the Google tag.
The page source should then show the ConsentLayer tag above every Google script. By hand, paste the ConsentLayer tag at the top of the theme’s header file.
3. Check that every signal starts as denied
The ConsentLayer tag installs a gtag stub with all Consent Mode signals denied except security_storage, and with a 500 ms wait_for_update.
Fetch yourclient.com and list the consent default for each signal.
Expect ad_storage, ad_user_data, ad_personalization, analytics_storage, and functionality_storage at denied, security_storage at granted, and wait_for_update at 500.
4. Confirm which category sends which signal
| Signal | What it controls | Before the visitor chooses | ConsentLayer category |
|---|---|---|---|
| ad_storage | Advertising cookies or device identifiers | Denied | Marketing |
| ad_user_data | Sending user data to Google for online advertising | Denied | Marketing |
| ad_personalization | Personalized advertising | Denied | Marketing |
| analytics_storage | Analytics cookies, for example visit duration | Denied | Statistics |
| functionality_storage | Site functions, for example language settings | Denied | Essential |
| security_storage | Authentication, fraud prevention, and user protection | Granted | Essential |
Check that the Google Ads tag sits in Marketing and GA4 sits in Statistics, because a visitor who accepts only statistics must not grant the three ad signals.
List the categories for yourclient.com and their services.
Every Google Ads service should be under Marketing. Without an agent, check the same categories in the dashboard, because every dashboard screen has a matching agent tool.
5. Point your GTM triggers at the consent update
The ConsentLayer tag pushes a consentlayer_consent_update dataLayer event, so you can fire tags on the visitor’s choice instead of on page view. In GTM, create a Custom Event trigger with that event name and attach it to tags that wait for the choice.
ConsentLayer holds the Meta Pixel through a built-in blocking pattern in the Marketing category.
Write a GTM trigger for consentlayer_consent_update and list the tags that need it.
Check that it works
Run these on the live domain after any deploy that touches <head>:
- Ask your agent to “Run the installation check for yourclient.com.”
check_installationfetches the live homepage and confirms the tag is in<head>withoutdeferorasync. You get a score out of 100, with the open items named. - Connect the live URL in Tag Assistant from a private window, so no choice stored from your earlier visits carries over. Tag Assistant can help you understand the consent fields and how your Google tag behaves.
- Before you touch the banner, confirm a consent default with the values from step 3 comes ahead of the first GA4 or Ads event.
- Click accept, then confirm a consent update follows, with ad_user_data and ad_personalization changing from denied to granted.
- In a new private window, click reject and confirm the update leaves ad_user_data and ad_personalization at denied.
Common problems and fixes
The consent tab in Tag Assistant is empty
Google says “If your consent code is called out of order, consent defaults won’t work,” so check the load order before anything else:
- View the page source on the live domain and find the ConsentLayer tag and the first Google script.
- If a Google script sits above it, move the ConsentLayer tag up and clear the page cache.
- When the order is right but the tab stays empty, look for an optimization plugin that defers scripts or delays them until interaction.
- Exclude the ConsentLayer tag from that setting, then reload the page in Tag Assistant.
Google Ads reports missing consent for EEA users
Google warns that if you block Google tags until the visitor uses the banner, “Google won’t be able to verify user consent choices and this may lead to loss in data.” Picture a site where an earlier developer wrapped gtag.js in a script blocker that releases it only after accept, so visitors who never click leave no trace.
Personalized ads stay off after the visitor accepts
Google states that “If you set both parameters with conflicting values, personalization is disabled,” which means ad_user_data and ad_personalization have to agree. Look for a second source of updates, such as a hard-coded gtag('consent', 'update') call or a GTM template from the previous banner. Remove those, so ConsentLayer is the one source of updates.
Conversions dropped after the banner went live
The drop the client sees is often a drop in consenting visitors, which you can read from the accept and reject counts. All plans include overview stats with page loads, banner impressions, and accept, reject, custom, dismissed, and ignored decisions. When the client asks “Did the banner break our tracking?”, use those numbers:
- Compare the share of reject, dismissed, and ignored decisions with the size of the drop.
- Explain that advanced mode gives an “advertiser-specific model as opposed to a general model,” built from that client’s own traffic.
Going further
Developers can tag any script with type="text/plain" and a data-cl-category attribute, so it runs only after consent for that category. For React, see how to make analytics and pixels wait in a React app.
If the client runs Microsoft Clarity, a Clarity consent mode toggle forwards the visitor’s decision to Clarity through clarity("consent"). For the wider rules, read Google Consent Mode and tracking rules for client sites.
Google Consent Mode v2 FAQ
Is Google Consent Mode v2 mandatory?
Google’s Tag Manager help says advertisers “must adhere to the EU UCP to use ad personalization and for measurement” and “must collect consent for use of personal data from end users based in the EEA.” For an Ads client with EEA visitors, Consent Mode is how that consent reaches Google’s tags.
Can I set up Google Consent Mode v2 without Google Tag Manager?
gtag.js on its own is enough, and Google says to run the default command “on every page of your site before any commands that send measurement data.” Every page template counts, including landing pages built outside the main theme.
Does Consent Mode remember the visitor’s choice?
The banner does that job, not Consent Mode. Google states that “consent mode doesn’t save consent choices,” so the banner stores the choice and sends it again on later pages. ConsentLayer keeps consent for 365 days by default.
Can I set Consent Mode defaults only for visitors in the EEA?
Google allows region-specific defaults and says “To set default consent states that apply to visitors from particular areas, specify a region,” using region codes such as DE or FR. A default without a region “sets the default for all visitors not covered by another region-specific command.”
What do url_passthrough and ads_data_redaction do?
With analytics_storage denied, url_passthrough lets event and session-based analytics travel “without cookies across pages.” Google says to “set the url_passthrough parameter to true” for this. Separately, “To further redact your ads data when ad_storage is denied, set ads_data_redaction to true.”
Running Consent Mode v2 across your roster
The first time your agent connects, you sign in through your browser. Once a few client sites are live, send one prompt to check your roster:
Run the installation check on every site in my organization and list any site under 100.
Fix the open items on each site under 100, then run the prompt again. A site is protected when the tag is live in <head> on the real domain, blocking is on, and decisions are recorded.
Set up your first client site with Consent Mode v2 from the quick start guide.
