Fix guide · Any website · medium · about 30 min
Meta Pixel does not fire after cookie consent
For the finding “Meta Pixel does not fire after consent”. Using Framer? See the Framer guide.
What this means
The Meta Pixel script is on your page, but after cookies were accepted, no events were sent to Meta. As far as Meta is concerned, this page has no visitors.
Why it costs you money:
- Meta cannot see page views or conversions from this page, so your campaigns optimize without data and your reported results are too low.
- Retargeting audiences built from site visitors stop growing.
- You keep paying for ads while the system that is supposed to learn from them is switched off.
How sure we are: if our checker found and accepted your cookie banner, this is reported as critical. If we did not find a banner we could operate, it is reported as high: the pixel may be waiting for a consent signal from a banner we did not recognize. In that case, test it yourself as described below before changing anything.
How to confirm it yourself
Our check runs from a browser in the EU, so EU consent rules on your site apply to it. If your banner only appears for EU visitors, use a VPN or ask a colleague in the EU.
- Open a private (incognito) window, open developer tools (F12), go to the Network tab and type
facebook.com/trinto the filter box. - Load the page and click Accept (accept all) on the cookie banner.
- Wait about 5 seconds. You should see at least one request to
facebook.com/trwithev=PageView(in Chrome it may show the typeping, because the pixel usessendBeacon). If nothing appears, the pixel is not firing after consent. - Click to another page on the site. If events appear only now, the pixel starts on the next page view, which means you lose the first page of every new visit (often the ad landing page).
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 enter your URL in the browser events section and click Open website): accept cookies and watch whether PageView arrives.
How to fix
The pixel is installed but something between “visitor clicks Accept” and “pixel sends” is broken. Work along that chain.
- Check that the consent tool actually records the choice. After clicking Accept, reload: the banner should not come back. If it does, the consent tool itself is misconfigured (for example, a cookie domain mismatch). Fix that first.
- Check which category the pixel belongs to. The pixel should be in the marketing (advertising) category. If it is assigned to a category that your banner’s “Accept” button does not grant, or to a category that does not exist in the banner, it will never fire.
- If the pixel is in Google Tag Manager (GTM):
- Open GTM’s Preview mode, load the site and click Accept. Check that a consent update appears and that
ad_storagechanges togranted. - Look at the Meta tag: is it marked as “fired” or “not fired”? If it is blocked by consent, the consent update is not arriving. If it is not fired, its trigger never ran.
- A common problem: the tag only has an “All Pages / Page View” trigger, which runs once, before the visitor has clicked Accept. Add a trigger that runs when consent is granted, such as a custom event your consent tool pushes to the data layer, or a consent-based trigger, and make sure the tag cannot fire twice on the same page. The name of that event differs between consent tools; GTM Preview shows the exact name your tool pushes when you click Accept.
- Open GTM’s Preview mode, load the site and click Accept. Check that a consent update appears and that
- If you use Meta’s consent commands (
fbq('consent', 'revoke')beforeinit): make sure your banner’s Accept handler actually callsfbq('consent', 'grant'), and that the grant runs on the current page, not only on later page loads. - If your consent tool blocks the script until consent: check that the tool re-activates the blocked script after Accept without needing a reload, and that the script’s category label is spelled exactly as the tool expects.
- Look at the browser console (developer tools, Console tab) for errors from
fbevents.jsor your tag code. A JavaScript error in custom code beforefbq('track', 'PageView')stops the event. - Publish your changes and clear any cache.
Common causes
- The pixel waits for a consent event that has a different name from the one the consent tool actually sends.
- The pixel is mapped to a consent category that the “Accept” button does not grant.
- The GTM tag fires only on the initial page view, before consent is given, and never again on that page.
- The consent tool was replaced, but the old consent check is still in the pixel code or GTM.
- A Content Security Policy or a script error stops
fbevents.jsfrom running. - The pixel ID in the code is wrong or belongs to a deleted pixel (events would still be sent, but to the wrong place; check
idin the requests once they appear).
How to verify the fix
- In a fresh private window: no
facebook.com/trrequests before Accept, and aPageViewrequest within a few seconds after Accept, on the same page. - Re-run the check on IsPixelWorking. The issue should be gone, and “Meta Pixel fires before cookie consent” should not appear in its place.
Sources
- Meta for Developers, consent API (
fbq('consent', 'revoke' | 'grant')): https://developers.facebook.com/docs/meta-pixel/implementation/gdpr - Meta for Developers, Get started with the Meta Pixel (base code placement): https://developers.facebook.com/docs/meta-pixel/get-started
- Google Tag Manager Help, Tag Manager consent mode support: https://support.google.com/tagmanager/answer/10718549
- Meta for Developers, Meta Ads Data Advisor (formerly Meta Pixel Helper): https://developers.facebook.com/docs/meta-pixel/support/pixel-helper
- Meta Business Help Center, Test events tool: verify app and web browser events for Meta: https://www.facebook.com/business/help/2040882565969969