top of page

Connecting the Meta Pixel with Usercentrics: Consent Management via Google Tag Manager

Writer: Frederic Wolny
Frederic Wolny
Oct 9
7 min read

Updated: 6 days ago

Connect the Meta Pixel with Usercentrics CMP v3: Learn how to correctly set up Consent Mode and Meta tracking via Google Tag Manager.

If you’ve implemented the Meta Pixel via Google Tag Manager and at the same time use Usercentrics CMP v3 as your consent management platform, you should make sure that the pixel respects users’ consent status.


Just because a cookie banner is displayed on the website doesn’t automatically mean that the Meta Pixel is actually blocked before consent is given.

A quirk of the Usercentrics integration via Google Tag Manager is especially important here: auto-blocking is not available with this type of implementation. Because of the asynchronous loading behavior of GTM tags, Usercentrics cannot guarantee reliable automatic blocking here.


That means: you have to configure your tags in Google Tag Manager to be consent-aware yourself.


In this guide, I’ll show you step by step how to implement Usercentrics CMP v3 via Google Tag Manager and then connect your Meta Pixel to consent management.

Note: This guide describes the technical configuration. Which consents are required for your website and your specific use of the Meta Pixel should be reviewed legally if in doubt.


Why Does the Meta Pixel Need to Be Connected to Usercentrics?


The Meta Pixel processes user data on your website. It captures events on your website and transmits them to Meta. Typical events are, for example:

  • PageView

  • ViewContent

  • Lead

  • AddToCart

  • Purchase


This data is extremely valuable for your Meta Ads tracking. Among other things, it enables conversion measurement and gives Meta signals for campaign optimization.


At the same time, however, your tracking has to respect the decision the user made in the consent banner.


A common mistake looks like this:


Usercentrics is integrated correctly and the consent banner appears – but the Meta Pixel is nevertheless fired via GTM as soon as the page loads.


The banner alone does not automatically block a GTM tag.


That is exactly why we first have to integrate Usercentrics correctly into Google Tag Manager and then define under which consent conditions the Meta Pixel may fire.


Here you can find the guide on adding the Meta Pixel to Google Tag Manager.



Step 1: Install the Usercentrics CMP Template in GTM


Usercentrics provides its own template for Google Tag Manager.

First, open your Google Tag Manager and select the relevant container.

Then navigate to:

Templates → Tag Templates → Search Gallery

Search there for:

Usercentrics

Then select the template “Usercentrics CMP” and click “Add to workspace”.


Confirm the dialog that appears afterward.


Screenshot of the Usercentrics CMP template in the Google Tag Manager gallery

This makes Usercentrics available as its own tag type within your GTM container.



Step 2: Create the Usercentrics CMP v3 Tag


Then switch to:

Tags → Neu → Tag-Konfiguration

Under the custom tag types, you should now find the previously installed template Usercentrics CMP.

Select it.


Now you can establish the connection between your GTM container and your Usercentrics configuration.



Step 3: Configure Usercentrics CMP v3


Name your tag accordingly, e.g. “Usercentrics | Consent Default”


Usercentrics CMP tag in GTM

Various settings are available within the tag.


The most important one first is your Settings ID or Ruleset ID.

Select the corresponding ID type and enter the unique ID from your Usercentrics admin portal.


Usercentrics CMP settings in GTM

After that, you can make further settings.


Banner Version


Use:

Version 3

This way you use the current Usercentrics CMP v3.


Language

You can either set a fixed language, for example:

en

Alternatively, you can set:

auto

Usercentrics then automatically adapts to the user’s browser language.


Regions

If you need different consent configurations for different regions, you can define them using ISO 3166-2 codes.

An example would be:

US-CA

for California.


TCF and AMP

If needed, you can also enable support for the Transparency and Consent Framework (TCF) or Accelerated Mobile Pages (AMP).

For many classic business websites, however, these settings are not strictly necessary.


Step 4: Configure Google Consent Mode


Within the Usercentrics tag, you will also find the settings for Google Consent Mode.


Google Consent Mode in Usercentrics

It is enabled by default.

Consent Mode lets you pass various consent signals to Google tags.

These include in particular:

  • analytics_storage

  • ad_storage

Depending on the configuration, further consent signals may be added.


Wait for Update


With “Wait for update” you define how long tags should wait for an update of the consent status.


You can set, for example:

2,000 milliseconds

as the default value.


Redact Ads Data


With Redact Ads Data you control the use of advertising data.

Available options are:

  • True

  • False

  • Dynamic (match ad_storage)

In the configuration described, the dynamic variant is recommended:

Dynamic (match ad_storage)


URL Passthrough


You can also enable URL Passthrough.

This allows certain information to be passed between pages via URL parameters when storage via cookies is not possible.


Default Consent State


The Default Consent State is especially important.

Before the user has made a decision, the relevant consent signals should initially be set to:

denied

by default.

Only once the user gives their consent is the corresponding status updated.

So the principle is:

Page view → Consent denied → User makes a decision → Consent is updated



Step 5: Use Consent Initialization as the Trigger


Now we need to make sure Usercentrics is loaded as early as possible.

To do this, click on Triggering within the tag and select:

Consent Initialization – All Pages

This is important because the consent configuration should be initialized before the regular marketing and analytics tags.

After that, you can, for example, give the tag the name:

Usercentrics CMP v3

and save it.

This completes the basic Usercentrics implementation via Google Tag Manager.

But not yet the configuration of the Meta Pixel.



Step 6: Why Usercentrics Doesn’t Block the Meta Pixel Automatically


This point is especially important.

If you implement the Usercentrics Web CMP via Google Tag Manager, the automatic blocking feature is not available.

The reason is the asynchronous loading behavior of tags within Google Tag Manager.


You should therefore not rely on Usercentrics automatically preventing your Meta Pixel from firing before consent.

Instead, you have to configure the Meta Pixel to be consent-aware yourself.

By the way, this doesn’t apply to Meta alone.


You should also review other marketing and analytics tags implemented via GTM accordingly.



Step 7: Configure the Meta Pixel to Be Consent-Aware


Now open your Meta Pixel tag in Google Tag Manager.

Within the tag, navigate to:

Advanced Settings → Consent Settings

Here you can specify that additional consent is required for the tag to fire.

Select:

“Require additional consent for tag to fire”

and enter the consent type you want to use for your Meta Pixel.

For a marketing tag like the Meta Pixel, the consent type that matters is:

ad_storage

That is the relevant consent type here.

This links the firing of the Meta Pixel tag to the corresponding consent status.

Put simply, that means:

No marketing consent → Meta Pixel does not fire.

Marketing consent → Meta Pixel may fire.


Alternative: Fire the Meta Pixel via a Usercentrics Event


Alternatively, you can also adjust the trigger logic of the Meta Pixel.

Instead of firing the pixel directly on All Pages, a custom event can be used that reacts to an update of the Usercentrics consent status.

A corresponding event is, for example:

usercentrics_consent_update

(depending on your setup).

Within your trigger logic, you then have to check whether the consent required for Meta has actually been granted.

This variant allows more granular control, but it is also more complex than using the consent settings within Google Tag Manager.

In both cases, the important thing is the same result:

The Meta Pixel must not simply fire independently of the decision made in Usercentrics.


Step 8: Test the Meta Pixel and Usercentrics


Before you publish your new GTM container, you should definitely test the configuration.

Use the preview mode of Google Tag Manager for this.

Run at least three tests:


Test 1: No Decision Made Yet

Open your website in a new private browser window.

The Usercentrics banner should appear.

Then check in Tag Assistant which tags have already fired.

The Meta Pixel should not fire without the required consent.


Test 2: Decline Marketing

Decline marketing cookies or the corresponding data processing service in Usercentrics.

Then check again whether the Meta Pixel fires.

Now, too, the corresponding Meta tag should remain blocked.


Test 3: Accept Marketing

Then grant the corresponding consent.

Now the consent status should change and the Meta Pixel should be able to fire according to your configuration.

In addition, you can use, for example, the Meta Pixel Helper or your browser’s developer tools to check which Meta events are actually being transmitted.



Step 9: Beware of Meta Pixels Implemented Multiple Times


If your Meta Pixel loads before consent even though the GTM configuration is correct, you should check whether Meta is also implemented somewhere else on your website.


This can be the case, for example, through:

  • a direct integration in the CMS,

  • an app or plugin,

  • custom code,

  • a second GTM container,

  • an old tracking integration.


This is an important point:

Via GTM, Usercentrics can only control the tags that have also been integrated into your consent logic accordingly.

If the Meta Pixel is additionally loaded directly via your website, configuring the GTM tag correctly alone won’t help you.



Common Mistakes with the Meta Pixel and Usercentrics


Usercentrics Is Installed, but the Meta Pixel Still Fires

The presence of a consent banner doesn’t automatically mean that all marketing tags are blocked.

Especially when implementing the Usercentrics CMP via GTM, you have to configure the downstream tags to be consent-aware.


Usercentrics Is Loaded via “All Pages”

For the CMP, you should use the trigger:

Consent Initialization – All Pages

instead.

This initializes the consent configuration before the regular tags.


Only the Base Pixel Was Adjusted

Check all Meta events and additional tracking tags.


Meta Is Implemented Twice

A particularly tricky mistake.

Everything looks correct in GTM – yet the Meta Pixel Helper reports a PageView before consent.

Then you should check whether the pixel was additionally implemented via your CMS or a plugin.



Conclusion: Connect Usercentrics and the Meta Pixel Cleanly


Integrating Usercentrics CMP v3 and the Meta Pixel via Google Tag Manager consists of two parts.

First, Usercentrics has to be loaded as early as possible via Consent Initialization – All Pages and the desired consent status defined.

Afterward, however, the marketing tags stored in GTM also have to respect this status.

Because with a GTM implementation in particular, you shouldn’t rely on auto-blocking.

For your Meta Pixel, that means:

Implement Usercentrics → initialize consent → configure Meta Pixel to be consent-aware → check events → test in GTM Preview.

Only when the Meta Pixel stays blocked without or after declined consent and works as intended after the corresponding approval is the technical connection fully set up. If you’d rather not do this yourself, I’ll handle the tracking setup as part of my Meta Business Manager setup.


 
 
 

Comments


bottom of page