Skip to content
FunnelGuard

Fix guide by FunnelsGuard

_fbc cookie not set after fbclid landing: how to fix it

TRK-187High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

When someone clicks a Meta ad, Meta adds a parameter called fbclid to the link, like ?fbclid=IwAR.... The Meta Pixel (Meta's browser tracking script) reads it and saves it in a first-party cookie called _fbc. The format is fb.1.<timestamp in milliseconds>.<fbclid value>.

Why it costs you leads or sales

Meta uses fbc to match a conversion to the exact ad click. Without it, more conversions are unmatched or credited less reliably. Reported results look worse than reality, and Meta's delivery system gets weaker data to learn from, which can raise your cost per lead.

The damage is quiet. Forms still submit and orders still arrive, so nobody notices until ad reports drift away from your CRM numbers.

Where the click ID gets lost
  1. Ad clickURL has ?fbclid=...
  2. Landing page loadsPixel blocked, late or missing
  3. _fbc cookieNever written
  4. Lead or purchaseSent without fbc

The cookie is never written, so every later step has no click ID to send.

Conversions Meta can match to an ad clickExample numbers
Conversions Meta can match to an ad click (example)With _fbc: 80 %; Without _fbc: 45 %031618045With _fbcWithout _fbc%

Example: illustrative numbers only, showing how a missing _fbc cookie can reduce matched conversions.

Common causes

Why _fbc is not created
CauseWhat happens
Pixel not on the landing pageNothing reads fbclid, so no cookie is written
Consent banner blocks the PixelPixel waits for consent, and the visitor leaves or fbclid is gone by then
Redirect strips fbclidThe final page URL has no fbclid to read
Pixel loads after a client-side URL changeSingle-page apps may remove query strings before the Pixel runs
Pixel initialised with cookies disabledCookie writing is turned off in the setup
Cookie cleared or blocked by browserSome privacy settings and tools block it

How to check if your site has it

Check _fbc in your browser
  1. Open a private window

    This avoids old cookies and extensions that block trackers.

  2. Visit your landing page with a fake click ID

    Use https://yoursite.com/landing?fbclid=test12345 (replace with your real URL). Accept cookies if a banner appears.

  3. Open DevTools and look at cookies

    In Chrome press F12, go to Application > Cookies > your domain. Look for _fbc with a value like fb.1.1712345678901.test12345.

  4. Confirm the Pixel ran

    On the Network tab filter for 'facebook.com/tr'. A PageView request should appear. If it does not, the Pixel did not run.

  5. Test the full path

    Repeat through any redirect, short link or ad tracker your ads really use. Check that fbclid is still in the final URL.

How to fix it

Start with the cause you found above. In most cases the fix is to load the Pixel on every landing page, before anything removes the query string, and to allow it after consent is granted.

Make the Pixel write _fbc on landing
  1. Confirm one Pixel install

    Use either your Meta plugin, your tag manager or theme code, not several. Check the plugin settings that the Pixel ID is entered and the Pixel is enabled on all pages.

  2. Exclude the landing page from caching rules that strip queries

    In your caching or optimisation plugin, make sure query strings such as fbclid are not removed or redirected, and that the Pixel script is not delayed past the visitor leaving.

If you also send events through the Conversions API, you can build fbc yourself from the URL and send it with each server event. Meta documents the format fb.1.<timestamp in ms>.<fbclid>. Only do this where you have consent for marketing cookies, and keep the fbclid value exactly as received (it is case sensitive).

Fallback: save fbclid as _fbc when the Pixel did notjavascript
(function () {
  var params = new URLSearchParams(window.location.search);
  var fbclid = params.get('fbclid');
  if (!fbclid) return;
  if (document.cookie.indexOf('_fbc=') !== -1) return;
  var value = 'fb.1.' + Date.now() + '.' + fbclid;
  var maxAge = 60 * 60 * 24 * 90; // 90 days
  document.cookie = '_fbc=' + value + '; max-age=' + maxAge + '; path=/; SameSite=Lax';
})();
Send fbc to the Conversions API
  1. Read the cookie on the server

    When a lead or order is created, read the _fbc cookie from the request, or store it in a hidden form field or order note at landing time.

  2. Add it to user_data

    Include it as the fbc parameter in user_data on the server event. Do not hash it.

  3. Match the browser event

    Use the same event_id on browser and server events so Meta can deduplicate them.

Conversions API user_data with fbc (values are examples)json
{
  "event_name": "Lead",
  "event_time": 1712345999,
  "event_id": "lead-10234",
  "action_source": "website",
  "event_source_url": "https://yoursite.com/thank-you",
  "user_data": {
    "fbc": "fb.1.1712345678901.IwAR_example",
    "fbp": "fb.1.1712345600000.1234567890"
  }
}

How to confirm it's fixed

Fix confirmed when
  • Landing on ?fbclid=test12345 creates an _fbc cookie in a private window
  • The cookie value starts with fb.1. and ends with your fbclid exactly
  • A PageView request to facebook.com/tr is sent on landing
  • The cookie is still there after moving to the form and thank-you page
  • Server events in Events Manager show the fbc parameter
  • The test works with the real ad link path, including any redirects

In Meta Events Manager, open your dataset and check Test events and the event details. The click ID parameter should appear on events that came from ad clicks.

How to prevent it happening again

Prevention
  • Test the real ad URL after every change to redirects, caching, consent banner or theme
  • Keep one Pixel install per page
  • Do not add rules that strip query strings before the Pixel runs
  • Re-test after consent tool updates
  • Keep the landing page free of script errors that stop the Pixel
  • Store fbc with the lead so server events can use it later
Pixel does not run, so no cookie is written

The visitor arrives with fbclid, but the tag never fires.

How FunnelGuard handles this

FunnelGuard detects this today. A robot visitor opens your funnel landing page on a schedule, marked as test traffic, and checks the tracking hits and cookies your journey produces, including whether the Meta cookie is present after a landing with an fbclid. It never clicks real ads.

If a check fails, FunnelGuard re-checks from a second region before sending one alert by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause. The Free plan covers 1 site and 2 journeys with daily checks and no card. A free read-only website audit is also available.

Questions people ask

Why is my _fbc cookie not being set?

The Meta Pixel creates _fbc only when it runs on a page whose URL contains fbclid. Common reasons are the Pixel missing from the landing page, a consent banner blocking it, a redirect removing fbclid, or the cookie being blocked by the browser.

What is the _fbc cookie?

_fbc is a first-party cookie that stores the Meta ad click ID. Its format is fb.1.<timestamp in ms>.<fbclid>. Meta uses it to link later conversions to the ad click.

How do I test if _fbc is created?

Open a private window, visit your landing page with ?fbclid=test12345 added, accept cookies, then check Application > Cookies in DevTools. You should see _fbc with a value ending in test12345.

Can I create the _fbc cookie manually?

Yes. Build the value as fb.1.<current time in milliseconds>.<fbclid> and save it as a first-party cookie, then send it as fbc in Conversions API events. Do this only where marketing consent allows it, and keep the fbclid exactly as received.

Do I need _fbc if I use the Conversions API?

It is strongly recommended. Sending fbc with server events helps Meta match them to the ad click. Without it, matching relies on other data such as email or phone, which may be missing.

Does a redirect remove fbclid?

It can. If a redirect drops query parameters, the final page has no fbclid and the Pixel cannot create _fbc. Make the redirect pass the full query string through.

Does the _fbc cookie matter if visitors decline cookies?

If a visitor declines marketing cookies, the cookie should not be written where consent is required. That is expected behaviour. The issue to fix is when consenting visitors still get no cookie.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.