How to Set Up Google Consent Mode v2 (With or Without GTM)

Set up Google Consent Mode v2 step by step, with GTM or direct install, plus how Consently automates all four signals for you.


by Riad Us Salehin • 5 July 2026


Setting up Google Consent Mode v2 means sending Google four consent signals, ad_storage, analytics_storage, ad_user_data, and ad_personalization, denied by default and updated the moment a visitor chooses.

Consently sends all four automatically once your banner is live, so most sites never write a line of gtag('consent') code. This guide covers the automated Consently setup, the manual code path, and how to verify the result.

What Is Google Consent Mode v2 Setup?

Google Consent Mode v2 setup means sending four consent signals to Google's tags: ad_storage, analytics_storage, ad_user_data, and ad_personalization. Each signal defaults to denied before a visitor interacts with your consent banner, then updates to granted or stays denied based on their choice.

Google strengthened enforcement of this requirement for EEA and UK traffic starting March 2024, tied to the Digital Markets Act. Sites that serve ads to or measure EU/EEA visitors without it lose Google Ads and Analytics measurement for those users entirely, not just partially. For the full breakdown of how Google Consent Mode works, start with our explainer.

Here is how to set it up in Consently.

What You Need Before You Start

Google Consent Mode v2 is included on every Consently plan, Basic, Premium, and Enterprise, with no upgrade gate. You need a Consently account, a website added, a cookie banner built, and Google Analytics or Google Ads tags already on your site.

  • Plan required: Consent Mode v2 ships on Basic ($8.25/month), Premium ($16.50/month), and Enterprise ($41.50/month) alike. The plans differ only in domain count and monthly pageview cap, never in features.
  • What you need: a Consently account with a site added, a cookie banner built (the consent source Consently reads), and Google Analytics and/or Google Ads tags already installed on your site. Google Tag Manager is optional; this guide covers both a direct install and a GTM install.
  • Where to start: Consently dashboard, then Sites, then Add website, then Cookie Banner.
  • No template to configure: Consently's Consent Mode v2 signalling is automatic, so there is no separate template to import or set up.
  • What Consently removes: most tools require you to hand-write gtag('consent', 'default', ...) and wire a trigger per tag. Consently sets the denied defaults and fires the update call for you once your banner is live.

A consent management platform is what reads visitor choices and feeds them to Consent Mode. If you have not set one up yet, that explainer covers what the software handles beyond this one integration.

Not using Consently yet? Start a free 14-day Consently trial at app.consently.net, no credit card required.

How to Set Up Google Consent Mode v2 With Consently: Step by Step

Every step below works on every Consently plan, with no per-step upgrade prompts. The setup runs in four parts: build the banner, install the script, confirm the signal mapping, and verify.

Step 1: Add Your Website and Build the Consent Banner

Adding your site and building the banner gives Consent Mode its consent source. Without a published banner, there is nothing for Consently to read.

In Consently, go to Sites, click Add website, then open Cookie Banner. Configure your consent categories, typically Essential, Analytics, and Advertising, inside the Cookie Banner editor. The Advertising category maps to the three ad-related signals. Analytics maps to analytics_storage.

Done: the banner preview lists your categories and is ready to publish.

Essential cookies are not governed by Consent Mode. They load regardless of the visitor's choice.

Screenshot spec: Consently Cookie Banner editor with consent categories.

Alt: Consently Cookie Banner editor displaying three consent categories, Essential, Analytics, and Advertising, with toggle switches and a live banner preview panel.

Step 2: Install the Consently Script (Direct or via GTM)

Installing the script is what actually loads Consently on your pages and lets it fire the consent signals before your Google tags do.

Direct HTML install: In Consently, go to Sites, click the menu next to your site, select Embed Script, then click Copy. Paste the script into your site's <head>, above any Google tags, keeping the <!-- Start Consently Banner --> and <!-- End Consently Banner --> comment markers intact.

Google Tag Manager install:

  1. Open Tag Manager at tagmanager.google.com and select your container.
  2. Click Tags, then New, and name the tag "Consently Consent Banner."
  3. Under Tag Configuration, choose Custom HTML and paste your Consently embed script.
  4. Under Triggering, select All Pages.
  5. Open Advanced Settings, then Tag Sequencing, and set Consently to fire before Google Analytics, Google Ads, and any other tracking tag.
  6. Click Save, then Preview to confirm the tag fires, then Submit and Publish.

Done: the tag fires in Preview mode. Google's own tags are set to fire only after Consently completes.

💡 Tip: Google's own setup order matters here too. The default gtag snippet must load first, then the consent tool, then any gtag('consent', 'update', ...) call. Out-of-order code means the defaults will not apply. Tag Sequencing in GTM enforces that order for you.

Screenshot spec: GTM Custom HTML tag with All Pages trigger and Tag Sequencing panel.

Alt: Google Tag Manager Custom HTML tag editor with the Consently script, an All Pages trigger, and Tag Sequencing set to fire Consently first.

Step 3: Confirm the Four Consent Signals Are Mapped

Confirming the signal mapping tells you what a visitor's choice actually controls, without writing any code yourself.

With Consently, no gtag('consent') code is required. Before any interaction, all four signals, ad_storage, analytics_storage, ad_user_data, and ad_personalization, default to denied. Accepting the Advertising category grants all three ad-related signals together. Accepting Analytics grants analytics_storage alone. Rejecting either category keeps its signals denied.

Done: your banner's categories map to the four signals with nothing set to granted by default.

You do not choose these defaults manually. Denied-by-default is the compliant baseline Consently applies automatically.

Step 4: Publish and Verify in Tag Assistant

Verifying confirms the signals actually reach Google, instead of assuming the install worked.

Publish your banner, then check it three ways. First, open GTM Preview or Google's Tag Assistant and interact with your banner. Open the Consent tab: it should show Denied for all four signals by default, then Granted after you accept. Second, open your browser console and type dataLayer. Look for a consent default entry followed by a consent update entry after you interact with the banner. Third, in Google Analytics, go to Admin, then Data Settings, then Data Collection, and confirm Google signals status shows Consent Mode active.

A third-party Consent Mode checker or Google Consent Mode checker gives you a quick fourth read. Tag Assistant remains Google's own recommended method, so treat any checker extension as a fast sanity pass, not the primary test.

Done: Tag Assistant shows Denied then Granted. The console logs both a default and an update event.

Run this check in an incognito window. A cached consent choice from an earlier visit can mask the true default state.

Screenshot spec: Tag Assistant Consent tab showing signals move from Denied to Granted.

Alt: Google Tag Assistant Consent tab showing four signals moving from Denied to Granted, next to a console showing dataLayer consent events.

Ready to see this live? Start your free 14-day Consently trial and follow these four steps on your own site.

How to Set Up Consent Mode Manually (Without a CMP)

To set up Consent Mode manually, call gtag('consent', 'default', {...}) with all four signals set to denied. Place this before any tag that sends measurement data, then call gtag('consent', 'update', {...}) after the visitor chooses.

Google's own documentation specifies the exact order. The default snippet loads first, the consent banner loads second, then the update call fires once the visitor interacts. If your banner loads asynchronously, add a wait_for_update value in milliseconds so tags wait briefly before firing. Out-of-order code is the single most common cause of Consent Mode not working. Google states plainly that defaults will not apply out of sequence.

This is exactly what Consently does for you. Once your banner is live, Consently sets the denied defaults and fires the update call automatically. There is no gtag('consent') code for you to write or sequence.

Basic vs Advanced Consent Mode: Which Setup Consently Uses

Basic Consent Mode blocks Google's tags entirely until a visitor consents. Advanced Consent Mode loads tags immediately in a denied state and sends anonymized, cookieless pings that power conversion modeling.

Consently runs Advanced Consent Mode. Signals default to denied, but Google still receives cookieless pings. Those pings let Google's modeling estimate conversions from visitors who decline, instead of losing that data entirely. Basic Consent Mode blocks all measurement pre-consent and produces larger reporting gaps, since Google has no pings to model from.

Choosing between the two in more depth, including when Basic still makes sense, deserves its own comparison of basic versus advanced consent mode.

How to Fix a Broken Consent Mode Setup

Most broken Consent Mode setups trace to load order, a miscategorized cookie, or a second tool fighting Consently for control of the same signals.

  • Banner does not appear: confirm the GTM tag fires in Preview mode, the trigger is set to All Pages, and the banner is published (not left as a draft) in Consently.
  • Banner shows but does not block cookies: another tag is firing before Consently. Fix the load order with GTM Tag Sequencing, or check that the cookie is not miscategorized as Essential.
  • Signals missing from the dataLayer: the script is not placed in the <head> before your Google tags. Move it above any gtag or GTM snippet.
  • Duplicate or default-granted signals on WooCommerce: WooCommerce's Pixel Manager plugin ships its own Consent Mode v2 handling. Disable its "Google Consent Mode v2 (standard settings)" option so Consently is the only signal source.
  • Tags only update after a page reload: trigger tags on the consent update event itself, not just on page load, or they will wait for the next reload to see the new state.

Consently Tips for a Clean Consent Mode Setup

A handful of Consently-specific choices prevent most of the setup problems teams run into after go-live.

  1. Let automatic signalling do the work. Do not add manual gtag('consent') code on top of Consently. Running both creates duplicate, conflicting signals.
  2. Keep Consently first in the tag order. Use GTM Tag Sequencing so Consently's script always fires before Google Analytics, Google Ads, or any other tracking tag.
  3. Turn on IAB TCF 2.3 only if you run programmatic ads. Enable it under Cookie Banner, then Configuration, then IAB TCF Settings. Consently maps TCF consent choices to the matching Google signals under the IAB Transparency and Consent Framework; leave it off otherwise.
  4. Expect a short conversion dip after go-live, then a recovery. Google's conversion modeling needs a few days of consented and cookieless-ping data to stabilize. Raising target CPA temporarily during that window keeps campaigns spending instead of pulling back.
  5. Set region-based defaults. Serve an opt-in banner to EU and UK visitors and an opt-out banner to US visitors, so each region follows opt-in versus opt-out consent by region as its law requires.

Want the full picture of what Consently automates beyond Consent Mode? See Consently's Google Consent Mode v2 integration for the complete feature detail.

FAQs

Do I need to add gtag consent code with Consently?

No. Consently sends all four consent signals automatically once your banner is live. You build the banner and install the script; Consently handles the gtag('consent') calls for you.

Is Google Consent Mode v2 setup free on Consently?

It is included on every Consently plan, Basic, Premium, and Enterprise, with a 14-day free trial and no credit card required to start.

How do I check if my Consent Mode setup is working?

Open Google Tag Assistant or GTM Preview, interact with your banner, and check the Consent tab for Denied-then-Granted. You can also check your browser console for a dataLayer entry showing consent default followed by consent update.

Why did my conversions drop after setting up Consent Mode v2?

A short dip is expected. Google's conversion modeling needs several days of data before it recovers the gap left by visitors who decline consent. Raising target CPA temporarily helps campaigns keep spending through that window. See how conversion modeling recovers lost conversions for the full mechanism.

Is Google Consent Mode v2 mandatory?

For sites serving Google ads to or measuring visitors in the EEA and UK, yes. Google enforced Consent Mode v2 for that traffic starting March 2024, tied to the Digital Markets Act. Without it, Google Ads and Analytics stop measuring those users entirely.

Do I still need a cookie banner if I set up Consent Mode?

Yes. Consent Mode signals a visitor's choice to Google; it does not collect that choice itself. The banner is the consent source Consent Mode reads.

How do I set up Consent Mode v2 on WordPress or Shopify?

The same automatic signalling applies. Install the Consently script through your platform: the WordPress plugin or header injection on WordPress, the theme head section on Shopify. Consently handles the rest identically.

Does Consently work with GTM's built-in Consent Mode?

Yes. Configure each tag's consent requirement inside GTM as usual, and Consently supplies the signal updates those tags read.

Which cookies should default to granted when I set up Consent Mode?

None. All four signals default to denied until the visitor accepts. Accepting the Advertising category grants the three ad-related signals together; accepting Analytics grants analytics_storage on its own.

Consently sets the denied defaults and fires all four consent signals automatically, so setup takes minutes instead of a manual gtag('consent') integration. Revisit Consently's Google Consent Mode v2 integration above for the full feature detail, or start your free 14-day Consently trial today.

AUTHOR

Riad Us Salehin is the content lead at Dorik. He is a passionate content creator who lets the work speak for itself. Focused on taking brands and causes to the next level.

Read More

Subscribe to Consently
Newsletter

Subscribe to our newsletter to stay updated with latest articles from our blog.

Built with ❤️ by the team @ Dorik.com 

GET IN TOUCH

Any questions? Feel free to chat with us or reach out to us at

For any queries:
support@consently.net

Follow us:


©2026 Dorik, Inc. All rights reserved.