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:

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.

  1. Open a private (incognito) window, open developer tools (F12), go to the Network tab and type facebook.com/tr into the filter box.
  2. Load the page and click Accept (accept all) on the cookie banner.
  3. Wait about 5 seconds. You should see at least one request to facebook.com/tr with ev=PageView (in Chrome it may show the type ping, because the pixel uses sendBeacon). If nothing appears, the pixel is not firing after consent.
  4. 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.

  1. 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.
  2. 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.
  3. 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_storage changes to granted.
    • 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.
  4. If you use Meta’s consent commands (fbq('consent', 'revoke') before init): make sure your banner’s Accept handler actually calls fbq('consent', 'grant'), and that the grant runs on the current page, not only on later page loads.
  5. 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.
  6. Look at the browser console (developer tools, Console tab) for errors from fbevents.js or your tag code. A JavaScript error in custom code before fbq('track', 'PageView') stops the event.
  7. Publish your changes and clear any cache.

Common causes

How to verify the fix

  1. In a fresh private window: no facebook.com/tr requests before Accept, and a PageView request within a few seconds after Accept, on the same page.
  2. 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