Fix guide · Webflow · medium · about 30 min
Meta Pixel fires before cookie consent on Webflow
For the finding “Meta Pixel fires before cookie consent”. Also for: Any website, Shopify, WordPress, Framer.
What this means
Your Webflow site shows a cookie banner, but the Meta Pixel (still often called the Facebook Pixel) sent data to Meta while the banner was still waiting for an answer. Webflow has no built-in cookie banner for third-party scripts (its own consent settings only cover Webflow Analyze and Optimize), so the banner comes from a separate consent tool. That tool only controls the scripts it knows about. A pixel installed anywhere else runs straight away.
Why it costs you money:
- If you advertise to people in the EU, sending marketing data before consent is a legal risk you probably did not intend to take. We report the technical behaviour only; we cannot tell you whether your setup is compliant.
- The banner and the pixel are not connected. When this is fixed in a hurry later, the usual result is the opposite problem: the pixel stops firing entirely and your ads optimize blind.
How to confirm it yourself
Our check runs from a browser in the EU. Consent tools on Webflow can show different banners per region, so if you are outside the EU, use a VPN or ask a colleague there. Consent Pro’s debugger (Test it on live website in the app) can also simulate an EU visitor.
- Open your published site on the domain your ads link to (not only the
webflow.iostaging address) in a private (incognito) window. - Open developer tools (F12), go to the Network tab and type
facebook.com/trinto the filter box. - Reload the page. Do not click the cookie banner.
- If
facebook.com/trrequests appear while the banner is still showing, the pixel fires before consent. In Chrome they may show the typeping(the pixel usessendBeacon). In the request payload,idis your pixel ID andevis the event name. If the request also containsa=plwebflow, it comes from Webflow’s built-in Meta Pixel integration.
You can also use Meta Ads Data Advisor (Meta’s Chrome extension, formerly Meta Pixel Helper), or the Test events tool in Meta Events Manager (Data sources > your pixel > Test events, then Open website). Watch whether PageView arrives before you accept.
How to fix
-
Find every place the pixel is installed. On Webflow, check:
- Site settings > Apps & Integrations > Meta Pixel. If a Pixel ID is entered here, Webflow adds the base code to every page itself.
- Site settings > Custom code: the Head code and Footer code sections, and any code added there by installed Apps.
- Page settings > Custom code (Inside
<head>tag and Before</body>tag) of individual pages, including CMS template pages. With Webflow Localization, check every locale: a locale whose page code was edited no longer follows the primary locale. - Code Embed elements on the canvas, including embeds inside components that appear on every page, and code blocks in Rich text or CMS items.
- Your Google Tag Manager (GTM) container.
Search the published page source for
fbevents.jsandfbq(. The fix only works if every copy goes through your consent setup. -
Do not rely on blocking Webflow’s built-in integration. Webflow places the integration’s code in the
<head>above your own Head code, so even a consent tool placed first in Head code loads after it, and you cannot add consent attributes to code Webflow generates. Either remove the Pixel ID (and use option A or C below), or use option B. -
Pick one way to gate the pixel and remove the other copies.
A. Your consent tool blocks the pixel script. Paste Meta’s base code into Site settings > Custom code > Head code, below your consent tool’s script, and mark it the way your tool expects:
- Consent Pro (Finsweet’s Webflow app): version 2 scans your site and blocks detected trackers automatically. After adding or changing the pixel, scan again, check that it is listed under Marketing, and publish. If you turned on Load Script Async, mark the script yourself with
type="fs-consent"andfs-consent-categories="marketing". - Finsweet Cookie Consent (the older free
fs-cc.jslibrary):type="fs-cc"andfs-cc-categories="marketing". - Cookiebot (manual blocking):
type="text/plain"anddata-cookieconsent="marketing". - OneTrust app for Webflow: paste the pixel into the app’s Blocked Scripts section (Manage blocked scripts), not into Webflow’s custom code.
- CookieYes and others: follow the tool’s guide to blocking scripts before consent, using its advertising or marketing category.
For Consent Pro, a marked script looks like this:
<script type="fs-consent" fs-consent-categories="marketing"> /* Meta Pixel base code from Events Manager, unchanged */ </script>Remove the
<noscript>part of Meta’s snippet: consent tools cannot control it.B. Keep the built-in integration with “Delay for cookie consent”. Switch Delay for cookie consent on in Apps & Integrations > Meta Pixel. Webflow then adds
fbq('consent', 'revoke')before the pixel starts, which Meta documents as pausing pixel sends until consent is granted. Your consent tool must then runfbq('consent', 'grant')after the visitor accepts marketing cookies. With Consent Pro, add this to Footer code (other tools: use their attributes):<script type="fs-consent" fs-consent-categories="marketing"> fbq('consent', 'grant'); </script>Without the grant, the pixel never sends anything (see “Meta Pixel not firing after cookie consent on Webflow”).
C. Google Tag Manager. Put the GTM snippet in Head code (do not mark the GTM snippet itself for consent) and install the pixel only as a GTM tag. In the tag’s Advanced Settings > Consent Settings, choose Require additional consent for tag to fire and add
ad_storage. This only works if your consent tool sends Google Consent Mode updates to GTM; Consent Pro’s GTM template and the Cookiebot CMP template both do. Consent Pro’s GTM guide also asks you to fire marketing tags on itsconsent-updatedevent. - Consent Pro (Finsweet’s Webflow app): version 2 scans your site and blocks detected trackers automatically. After adding or changing the pixel, scan again, check that it is listed under Marketing, and publish. If you turned on Load Script Async, mark the script yourself with
-
Load the consent tool’s script first, at the top of Head code, above any pixel code you marked.
-
Publish to your custom domain, not only to the staging domain.
Common causes
- A Pixel ID is entered in Apps & Integrations > Meta Pixel with Delay for cookie consent off.
- The base code was pasted into Head code without the consent tool’s attributes, and the banner was added later.
- A second copy in a page’s custom code, a Code Embed or a locale version of the page was never gated.
- Consent Pro: the pixel was added after the last scan or the site was not republished, or Load Script Async is on and the script was not marked by hand.
- The pixel is in GTM, but the Meta tag has no consent requirement. Consent Mode only controls Google tags automatically.
How to verify the fix
- In a private window on the published custom domain (from the EU or through a VPN): no
facebook.com/trrequests before you answer the banner, requests right after you click “Accept”, and none after “Reject”. - Re-run the check on IsPixelWorking. The issue should be gone, and “Meta Pixel does not fire after consent” should not appear in its place.
Sources
- Webflow Help, Embed Meta Pixel on your Webflow site (Apps & Integrations > Meta Pixel, “Delay for cookie consent”,
fbq('consent', 'grant')example): https://help.webflow.com/hc/en-us/articles/33961406577171-Embed-Meta-Pixel-on-your-Webflow-site - Webflow Help, Custom code in head and body tags (Site settings and Page settings custom code): https://help.webflow.com/hc/en-us/articles/33961357265299-Custom-code-in-head-and-body-tags
- Webflow Help, Custom code embed (Code Embed element, embeds in components): https://help.webflow.com/hc/en-us/articles/33961332238611-Custom-code-embed
- Webflow Help, Localize page settings (per-locale custom code stops inheriting once edited): https://help.webflow.com/hc/en-us/articles/33961235760531-Localize-page-settings
- Webflow Developers, Site tracking and consent management (consent APIs apply only to Analyze and Optimize): https://developers.webflow.com/browser/reference/consent-management
- Webflow Help, Integrate Consent Pro for consent management: https://help.webflow.com/hc/en-us/articles/34394790067859-Integrate-Consent-Pro-for-consent-management
- Webflow Help, Install and use the OneTrust app (Blocked Scripts): https://help.webflow.com/hc/en-us/articles/49624805369491-Install-and-use-the-OneTrust-app
- Consent Pro Docs, Async script loading (
type="fs-consent",fs-consent-categories="marketing"): https://docs.consentpro.com/runtime/script-loading - Consent Pro Docs, Migration (v2 blocks scripts automatically): https://docs.consentpro.com/webflow/migration
- Consent Pro Docs, Debugger (region simulation, trackers before and after interaction): https://docs.consentpro.com/webflow/debugger
- Consent Pro Docs, Google Tag Manager setup (
consent-updatedtrigger): https://docs.consentpro.com/webflow/google-tag-manager - Finsweet Cookie Consent README (
type="fs-cc",fs-cc-categories, remove<noscript>tags): https://cdn.jsdelivr.net/npm/@finsweet/cookie-consent@1/README.md - Cookiebot Support, Manual cookie blocking (
data-cookieconsent="marketing"): https://support.cookiebot.com/hc/en-us/articles/4405978132242-Manual-cookie-blocking - CookieYes, How to add a cookie banner to your Webflow website: https://www.cookieyes.com/documentation/cookie-banner-webflow/
- 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 Business Help Center, About Meta Ads Data Advisor: https://www.facebook.com/business/help/198406697184603
- Meta Business Help Center, Test events tool: verify app and web browser events for Meta: https://www.facebook.com/business/help/2040882565969969
- IsPixelWorking live test, 2026-10-04: on published Webflow sites using the built-in Meta Pixel integration, Webflow’s pixel code (with
n.agent='plwebflow', sent asa=plwebflow) was placed in the<head>above the site’s own head code, including above a consent tool script; with “Delay for cookie consent” on, the code containedfbq('consent', 'revoke')beforefbq('init', ...).