How Do You Set Up Consent Mode with GTM?

Setting up Consent Mode with Google Tag Manager (GTM) lets you control how your tags behave according to your users' cookie preferences.

How Do You Set Up Consent Mode with GTM?

Google Tag Manager (GTM) — setting up Consent Mode with it lets you control how your tags behave according to your users' cookie preferences. Getting this right is what keeps you compliant with privacy law while keeping data loss to a minimum.

How Do You Set Up Consent Mode in GTM?

Consent Mode in GTM works on the logic of defining the default consent state as the page loads ( default) and updating that state when the user makes a choice in the banner ( update). Once the consent states are updated, the Google tags adjust themselves automatically.

What Should You Prepare Before Setting Up Consent Mode?

  • An active Google Tag Manager (GTM) account and the container code added to the website.

  • A Google-certified CMP (Consent Management Platform) or a custom-built cookie banner.

  • Default consent states defined in line with your privacy policy.

  • A list of every Google tag running on the site ( GA4, Google Ads).

What Is the Role of the Cookie Banner and the CMP?

The CMP (Consent Management Platform) displays the cookie notice on the site and captures the user's "Accept" or "Decline" choice. It then passes that choice to GTM as a data signal.

Choosing Between Basic and Advanced Consent Mode

  • Basic Consent Mode: If the user does not consent, the tags don't run at all. No data is collected.

  • Advanced Consent Mode: The tags fire even without consent, but send cookieless anonymous signals (pings). Google AI uses those signals to model the lost conversions.

What Are the Consent Mode v2 Parameters?

  • ad_storage: Consent to store advertising cookies.

  • analytics_storage: Consent to store analytics cookies.

  • ad_user_data: Consent to send user data to Google for advertising.

  • ad_personalization: Consent for remarketing and personalised ads.

  • functionality_storage: Consent for language and site preference cookies.

  • personalization_storage: Consent for content personalisation cookies.

  • security_storage: Consent for security and verification cookies.

The ad_storage and analytics_storage Settings

analytics_storage governs GA4 reporting. ad_storage controls Google Ads conversion tracking and the writing of its cookies.

The ad_user_data and ad_personalization Settings

These two parameters, which arrived with Consent Mode v2, are mandatory if Google Ads audiences (remarketing) are to keep filling and targeting is to work.

GTM Consent Mode Setup Methods

You can carry out the setup either with an integrated CMP template or with a custom banner structure.

Setting Up Consent Mode with a CMP Template

  1. In GTM, install the template for the CMP you use (Cookiebot, OneTrust, etc.) from the Community Template Gallery.

  2. In the template settings, define the default consents as denied.

  3. Set the tag trigger to Consent Initialization - All Pages.

Setting Up Consent Mode with a Custom Banner

If you are not using a ready-made template, follow these steps:

Step 1: Create a Consent Initialization Trigger

Use the Consent Initialization - All Pages trigger so that GTM's default consent command runs before every other tag.

Step 2: Configure the Default Denied Consent Mode Setting

As soon as the page opens (before the user has made a choice), define all consent parameters as denied by default.

Step 3: Configure the Update Consent Setting Based on Banner Choices

When the user gives consent through the banner, fire the signal that moves the relevant consent parameters to granted.

Step 4: Check the Google Tag Consent Settings

Open your Google tags in GTM. Under Advanced Settings > Consent Settings, verify that the Built-in Consent Checks are active.

Step 5: Verify GA4, Google Ads and Enhanced Conversions

Check that the tags behave according to the consent state and that enhanced conversion data is sent once consent is given.

How Do You Test Consent Mode in GTM?

  1. Start GTM Preview mode.

  2. From the event stream on the left, select the Consent Initialization step.

  3. Consent — on this tab, confirm that the default consent values are denied.

  4. Give consent in the banner on the site and verify that the consent values are updated to granted in the following steps.

The Most Common Mistakes in GTM Consent Mode Setups

  • Running the default consent definition after the update command.

  • Using a standard Page View trigger instead of Consent Initialization.

  • Leaving out the ad_user_data and ad_personalization parameters that Consent Mode v2 requires.

  • Manually overriding the built-in consent checks in GTM tags (misconfiguring the Additional Consent Needed field).

Frequently Asked Questions

Is Consent Mode v2 mandatory?

Yes. It is mandatory if you want to keep using Google Ads audiences and track conversions in full.

What happens if Consent Mode isn't set up?

Your Google Ads remarketing audiences stop updating and you lose the modelled conversion data in GA4.

What is the difference between Basic and Advanced Consent Mode?

In Basic mode, no data is sent at all without consent. In Advanced mode, cookieless anonymous signals are sent and conversions are modelled with AI.