Skip to content
Severity: HighOwner: MarketingTime to fix: 30-60 min

Meta Pixel before consent

Prevent Meta Pixel from loading or sending events before the visitor has opted in to marketing tracking.

Covers: meta_pixel_before_consent, pre_consent_meta_pixel

Why this matters

Meta Pixel often sends page-view and identifier-rich events immediately on load. If that happens before consent, it creates a clear marketing-tracking compliance issue.

How to verify manually

  1. Open the site in a fresh session and inspect the Network panel for Meta or Facebook requests.
  2. Check whether `fbq('track', 'PageView')` or similar events fire before banner interaction.
  3. Inspect browser storage for `_fbp` or related cookies before consent.

Typical root causes

  • Pixel code is embedded directly in the theme or tag manager without consent checks.
  • Marketing plugins inject Meta scripts automatically on every page.
  • Consent Mode or CMP integration updates too late to block the initial event.

GTM fix

  1. Gate Meta Pixel tags behind explicit marketing consent.
  2. Remove unconditional page-view triggers from Meta templates.
  3. Verify in GTM preview that Meta events fire only after consent is granted.

WordPress fix

  1. Check marketing plugins and theme settings for built-in Meta Pixel injection.
  2. Disable automatic pixel loading outside your CMP-controlled setup.
  3. Retest after clearing cache and CDN layers.

Generic fix

  1. Load Meta Pixel only after marketing consent is granted.
  2. Do not send `PageView` or conversion events before the visitor opts in.
  3. Keep Meta initialization in one place to avoid duplicate firing paths.

How to confirm the fix worked

  • Confirm no Meta requests are sent before consent.
  • Confirm `_fbp` or related identifiers are absent before opt-in.
  • Run a fresh scan and verify Meta Pixel is no longer flagged pre-consent.

Next step

Re-scan after deployment to confirm that the runtime behavior changed, not just the banner copy.

Meta Pixel before consent — GDPR Fix Guide