On this page
What this issue is
The Meta Pixel is a script that sends visitor actions (page views, leads, purchases) to Meta for ad measurement and targeting. It has a built-in consent control: fbq('consent', 'revoke') tells the pixel not to send data, and fbq('consent', 'grant') lets it start.
Why it costs you leads or sales
- Visitor landsConsent banner appears
- Visitor rejectsChoice stored by the banner tool
- Pixel loadsNo fbq consent revoke before init
- Events sent to MetaPageView and Lead hits leave the browser
- Data in your audiencesReports include people who declined
The visitor says no, but the pixel was never told.
How to check if your site has it
Open a clean session
Use a private window so no earlier consent choice is stored.
Open DevTools, Network tab
Press F12, choose Network, tick Preserve log and filter by
facebook.com/tr.Reject marketing cookies
Load the page and click Reject (or leave all optional categories off).
Look for requests
Any request to
facebook.com/trwithev=PageViewafter you reject means the pixel is ignoring consent.Test the page before any choice
Reload in a new private window and look at the Network tab before touching the banner. Hits at this stage mean the pixel fires before consent.
Check the source
Search the page source or your tag manager for
fbq('consent'. Ifrevokeis missing, or comes afterfbq('init', that is the cause.
How to fix it
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('consent', 'revoke'); // must come before init
fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
</script>// Call this from your banner's accept callback
function onMarketingAccepted() {
fbq('consent', 'grant');
}
// Call this if a visitor later withdraws consent
function onMarketingRevoked() {
fbq('consent', 'revoke');
}Add revoke before init
Put
fbq('consent', 'revoke');directly abovefbq('init', ...)in the base code.Wire your banner
In your banner's accept and reject callbacks, call
fbq('consent', 'grant')orfbq('consent', 'revoke'). On returning visitors, read the stored choice on page load and call the matching one.
Set a consent-aware trigger
Open the Meta Pixel tag, go to Advanced Settings, Consent Settings, and require
ad_storage. Better still, use a trigger that only fires after your banner reports marketing consent.Add a revoke tag
Create a Custom HTML tag with
<script>fbq('consent','revoke');</script>and fire it on Consent Initialization, with the base pixel sequenced after it (Advanced Settings, Tag Sequencing).Add a grant tag
Create a second Custom HTML tag with
fbq('consent','grant');that fires only on the event your banner pushes when marketing is accepted.Preview and publish
Test in Preview mode with Reject and Accept, then publish.
Find how the pixel is added
Check your Meta/Facebook plugin, your theme settings or a header-scripts plugin. Only one source should load the pixel.
Use the consent setting of your banner plugin
Most consent plugins let you assign the Meta Pixel to the marketing category so it is blocked until opt-in. Check the plugin's script-blocking or category settings.
Or edit the base code
If you paste the pixel yourself, add the revoke line above init as shown in the code sample.
Open Customer privacy
In Shopify admin go to Settings, Customer privacy and set up the cookie banner and regions.
Check the Meta channel
If you use the Facebook & Instagram app, its pixel follows Shopify's customer privacy settings. Confirm in a test visit that nothing is sent after Reject.
Custom pixels
For a pixel added under Settings, Customer events, set the pixel's permission to Marketing so it only runs after consent.
Find the pixel code
Look in Project settings, Custom code (head) and in page-level custom code.
Add revoke above init
Edit the snippet to include
fbq('consent','revoke');beforefbq('init', ...).Connect your banner
Use your consent tool's accept callback to run
fbq('consent','grant'), then publish and test.
Locate the tracking code
Check the funnel or website Settings, Tracking Code (head) and the Facebook Pixel field if you use it.
Replace with a consent-aware snippet
Paste the base code with revoke above init, and trigger grant from your banner's accept event.
Test the published page
Check the live URL, not the editor preview.
Open Cookie Banner settings
In the Wix dashboard find the cookie consent banner settings and make sure the marketing category is on.
Add the pixel through Marketing Integrations or Custom Code
In Settings, Custom Code, set the pixel category to Marketing so it loads only after opt-in.
Find the pixel
Look in Settings, Advanced, Code Injection or in the Marketing, Facebook Pixel setting.
Turn on the cookie banner
In Settings, Cookies & Visitor Data, enable the banner. Squarespace's built-in Facebook Pixel setting is held back until visitors accept.
Pasted code
If the pixel is in Code Injection, add the revoke line above init and call grant from your own banner logic.
Before
- No fbq('consent','revoke') call
- PageView sent to facebook.com/tr after Reject
- Lead events reach Meta from people who declined
After
- revoke runs before init
- No hits to facebook.com/tr after Reject
- grant runs only after the visitor accepts marketing
Revoke missing
Leads or data lost
The visitor rejects, but PageView and Lead hits still go to Meta.
Toggle the cause to compare what leaves the browser after a rejection.
How to confirm it's fixed
- In a new private window, no request to facebook.com/tr appears before you make a choice
- After clicking Reject, no request to facebook.com/tr appears on any page you visit
- After clicking Accept, PageView requests start to appear
- Withdrawing consent through your banner's settings stops further requests
- Only one Meta Pixel ID is firing (no duplicate installs)
- Your lead or purchase event still reaches Meta for visitors who accepted
How to prevent it happening again
- Keep one documented place where the pixel is installed
- Re-test with Reject and Accept after any change to the banner, theme, plugins or tag manager
- Treat a new consent tool or a banner redesign as a reason to repeat the Network tab check
- Keep revoke above init in any copy of the base code you reuse
- Check consent behaviour on landing pages and funnel builders, not only the main site
How FunnelGuard handles this
Questions people ask
Why is my Meta Pixel still firing after I reject cookies?
Most often the pixel code has no fbq('consent', 'revoke') call before fbq('init'), so it starts sending as soon as it loads. Another common cause is a second copy of the pixel in your theme or a plugin that ignores your banner. Check the Network tab for requests to facebook.com/tr after rejecting.
What does fbq('consent', 'revoke') do?
It tells the Meta Pixel not to send data to Meta until consent is granted. You call it before fbq('init'), then call fbq('consent', 'grant') once the visitor accepts marketing cookies. If they later withdraw consent, you call revoke again.
How do I block the Meta Pixel until a visitor gives consent?
Set fbq('consent','revoke') before fbq('init'), then call fbq('consent','grant') from your banner's accept callback. Alternatively, load the pixel only after consent through your consent tool's marketing category or a Google Tag Manager trigger tied to your banner.
How can I test if my Meta Pixel respects consent?
Open a private window, open DevTools, go to the Network tab and filter by facebook.com/tr. Click Reject and browse. No requests should appear. Then click Accept and confirm that PageView requests start.
Will adding consent revoke stop my Meta ads from tracking conversions?
It stops tracking for visitors who have not accepted marketing cookies, which is the intended behaviour. Visitors who accept are still tracked once grant runs. Expect lower reported volume, because declined visitors are no longer counted.
Does Google Tag Manager consent mode control the Meta Pixel?
Not by itself. Meta uses its own fbq consent calls, though GTM's built-in consent settings on a tag can stop it firing until ad_storage is granted. Use those settings or revoke and grant tags so the pixel follows your banner.
Can FunnelGuard tell me if my Meta Pixel ignores a rejection?
Yes. FunnelGuard runs a denied-consent variant of your journey and checks whether Meta Pixel hits still go out. If they do, it re-checks from a second region and sends one alert with a screenshot and a likely cause.
Related issues
- TRK-282Consent banner shown but tags fire before any choiceFix guide
- TRK-283Tags still fire after visitor rejectsFix guide
- TRK-303Cookies set before consent (_ga, _fbp)Fix guide
- TRK-298CMP categorises analytics tag wrongly (necessary vs marketing)Fix guide
- TRK-288Consent update never sent after AcceptFix guide
- TRK-297CMP blocks the form or checkout script itselfFix guide