---
title: "Meta Pixel and Cookiebot: fire only after cookie consent"
description: "Make the Meta Pixel wait for Cookiebot consent and fire on the same page once visitors accept marketing cookies, via Google Tag Manager, code or auto-blocking."
updated: "2026-10-12"
url: "https://ispixelworking.com/guides/consent/cookiebot"
---

# Meta Pixel and Cookiebot: fire only after cookie consent

Consent tool guide · Cookiebot · updated 2026-10-12

For the findings “Meta Pixel fires before cookie consent” and “Meta Pixel does not fire after cookie consent”. See also the [general guide](https://ispixelworking.com/guides/meta.fires_before_consent/generic).

## What goes wrong with Cookiebot and the Meta Pixel

A working setup does two things: the Meta Pixel (still often called the Facebook Pixel) sends nothing while the Cookiebot banner is waiting for an answer, and it sends a `PageView` right after the visitor accepts marketing cookies, on the same page. Broken setups usually fail in one of two ways:

- **The pixel fires before consent.** The pixel runs outside Cookiebot's control. It sits in the theme without markup, it loads before the Cookiebot script, or it lives in Google Tag Manager (GTM) on an "All Pages" trigger with no consent condition.
- **The pixel stays silent after consent.** The pixel is held back correctly, but nothing releases it. Typically the GTM tag requires consent but is only triggered once on page load, before the visitor has clicked anything.

In our scan of showcase sites, about 1 in 5 Cookiebot sites with a Meta Pixel (5 of 23) sent pixel data before the visitor answered the banner. That is a small sample, not a random one, so treat it as a sign that the problem is common, not as a market figure.

We report technical behaviour only; we cannot tell you whether your setup is legally compliant.

## How to check your site

1. Open a private (incognito) window, open developer tools (F12), go to the **Network** tab and type `facebook.com/tr` into the filter. If your banner only appears in some countries, test from one of them (for example with a VPN).
2. Load the page and do not touch the banner. Any `facebook.com/tr` request at this point means the pixel fires before consent.
3. Accept marketing cookies. Within a few seconds you should see a request with `ev=PageView` on the same page. If it only appears after you open another page, you lose the first page view of every new visit.
4. In the **Console** tab, type `Cookiebot.consent.marketing`. It should return `false` before you accept and `true` after.
5. In a fresh private window, reject cookies. No `facebook.com/tr` requests should appear.

Meta Ads Data Advisor (formerly Meta Pixel Helper), Meta's Chrome extension, shows the same events if you prefer not to read network requests.

## How to fix it

First find every copy of the pixel: search the page source for `fbevents.js` and `fbq(`, and check your GTM container, plugins and shop apps. Choose one of the routes below and remove the other copies. In every route, the Meta Pixel goes in Cookiebot's **marketing** category.

### Pixel in Google Tag Manager

1. Load Cookiebot with the **Cookiebot CMP** tag template from GTM's Community Template Gallery, on the **Consent Initialization - All Pages** trigger. Google Consent Mode is enabled by default in this template, and Cookiebot maps its marketing category to `ad_storage`, `ad_user_data` and `ad_personalization`.
2. Open the Meta tag, go to **Advanced Settings > Consent Settings**, choose **Require additional consent for tag to fire** and add `ad_storage`. Consent Mode only changes the behaviour of Google tags that have built-in consent checks. A Meta tag has none, so without this setting it fires whatever the visitor chooses.
3. Replace the tag's **All Pages** trigger with a **Custom Event** trigger for the event `cookie_consent_update`. GTM checks the consent requirement only at the moment the tag is triggered, and Cookiebot points out that a consent update does not re-evaluate tags on the All Pages trigger. `cookie_consent_update` fires as soon as the consent state is known, from an earlier visit or from a click on the banner, so the tag can fire on the first page.
4. Under **Advanced Settings > Tag firing options**, choose **Once per page**, so a visitor who changes their choice does not send a second `PageView`.
5. Publish the container and remove any copy of the pixel outside GTM.

Cookiebot also pushes a `cookie_consent_marketing` event that you can use as the trigger instead of steps 2 and 3. Pick one approach and use it for all your marketing tags.

### Pixel in your site code or added by a plugin

With manual blocking, mark the pixel's script tag so the browser treats it as plain text until Cookiebot enables it:

```html
<script type="text/plain" data-cookieconsent="marketing">
  // Meta Pixel base code, unchanged
</script>
```

Cookiebot also tells you to remove the pixel's `<noscript>` image: Cookiebot works in JavaScript and cannot control it. Apply the change everywhere the base code appears, for example in the theme header.

Alternatively, use Meta's consent API, which keeps the pixel loaded but paused. Cookiebot documents this pattern: add `data-cookieconsent="ignore"` to the pixel's script tag, call `fbq('consent', 'revoke')` before `fbq('init', ...)`, and update consent from Cookiebot's event:

```js
window.addEventListener('CookiebotOnConsentReady', function () {
  fbq('consent', Cookiebot.consent.marketing ? 'grant' : 'revoke');
});
```

If a plugin or shop app outputs the pixel and you cannot edit its script tag, use the plugin's own consent setting if it has one, or rely on auto-blocking.

### Cookiebot auto-blocking

With auto-blocking (`data-blockingmode="auto"` on the Cookiebot script), Cookiebot holds back known trackers until consent and loads them once consent is given. It only works when:

- The Cookiebot script is the first script on the page, has no `async` or `defer`, and loads from `consent.cookiebot.com`. Anything that loads before it can run without consent, and performance plugins that reorder scripts often break this.
- Your domain has been scanned since the pixel was added. The auto-blocker takes its instructions from scans (before the first scan it only has a list of known trackers), so start a new scan after you change tags.
- The pixel does not carry `data-cookieconsent="ignore"`, which tells the auto-blocker to let it through (unless you deliberately use the consent API pattern above).

If you combine auto-blocking with GTM, do not load Cookiebot through GTM. Cookiebot's guide puts the Consent Mode defaults first, then the GTM snippet (both marked `data-cookieconsent="ignore"`), then the Cookiebot script. The Meta tag inside GTM still needs the consent setup described above.

## Common causes

Pixel fires before consent:

- The pixel is in the theme header without `type="text/plain" data-cookieconsent="marketing"`, and auto-blocking is off.
- Auto-blocking is on, but the Cookiebot script loads after the pixel, or with `async` or `defer`.
- The Meta tag in GTM has no consent requirement and fires on All Pages.
- A plugin or app adds its own browser pixel next to yours.

Pixel silent after consent:

- The Meta tag requires `ad_storage`, but its only trigger is All Pages, so GTM checks it once, before the click, and never again on that page.
- The `data-cookieconsent` value is misspelled, or lists several categories (all of them must be accepted).
- The tag still waits for an event from a previous consent tool.

## How to verify

1. Repeat the private-window test: no requests before you answer the banner, a `PageView` within a few seconds after you accept (on the same page), and nothing after you reject.
2. If you use GTM, open **Preview**, accept the banner and check that `ad_storage` changes to granted and that the Meta tag fires on `cookie_consent_update`. Then reload the page: for a returning visitor who already accepted, the tag should fire without any click.
3. Re-run the check on IsPixelWorking.

## Questions people ask

### Is there a consent mode for Meta?

Meta's counterpart is the pixel's consent API: `fbq('consent', 'revoke')` before `fbq('init', ...)` pauses sending, and `fbq('consent', 'grant')` resumes it. The pixel does not read Cookiebot's choice by itself, so something on the page has to call these commands, as in the `CookiebotOnConsentReady` example above.

### What is the difference between Google Consent Mode and consent controls for the Meta Pixel?

Google Consent Mode passes the visitor's choice to Google tags, which adjust their own behaviour. A Meta Pixel tag has no built-in consent check, so it needs its own control: a consent requirement plus a consent trigger in Google Tag Manager, a blocked script tag, or Meta's consent API.

### Can blocking the Meta Pixel affect ad tracking and performance?

Yes. While the pixel waits, Meta receives no pixel events from that visitor, and visitors who reject send none at all, so reported conversions, retargeting audiences and the data Meta optimizes on are smaller. That is why the setups above release the pixel on the same page as soon as the visitor accepts, not one page later.

## Sources

- Cookiebot Support, Manual cookie blocking: https://support.cookiebot.com/hc/en-us/articles/4405978132242-Manual-cookie-blocking
- Cookiebot Support, Require consent before loading Facebook pixel: https://support.cookiebot.com/hc/en-us/articles/360004461894-Require-consent-before-loading-Facebook-pixel
- Cookiebot Support, How does auto-blocking work?: https://support.cookiebot.com/hc/en-us/articles/11438730619804-How-does-auto-blocking-work
- Cookiebot Support, Google Tag Manager deployment: https://support.cookiebot.com/hc/en-us/articles/360003793854-Google-Tag-Manager-deployment
- Cookiebot Support, Google Tag Manager and Automatic cookie blocking: https://support.cookiebot.com/hc/en-us/articles/360009192739-Google-Tag-Manager-and-Automatic-cookie-blocking
- Cookiebot Support, Conditionally loading tags in Google Tag Manager: https://support.cookiebot.com/hc/en-us/articles/4417455460114-Conditionally-loading-tags-in-Google-Tag-Manager
- Google Tag Manager Help, Tag Manager consent mode support: https://support.google.com/tagmanager/answer/10718549
- Meta for Developers, General Data Protection Regulation (consent API): https://developers.facebook.com/docs/meta-pixel/implementation/gdpr
- Meta for Developers, Meta Ads Data Advisor (formerly Meta Pixel Helper): https://developers.facebook.com/docs/meta-pixel/support/pixel-helper
