Meta Pixel, Conversions API and attribution

What is the difference between fbclid and the _fbc cookie?

fbclid is the parameter in the URL. _fbc is a cookie holding that same value in a three-part format. What separates them, and which one Meta matches on.

Published

The difference is one of storage, not of identity. The fbclid is the value Meta appends to your landing page URL when someone clicks an ad: a parameter, per click, with no format Meta imposes on you. The _fbc cookie is a first-party cookie that stores that same fbclid inside a three-part string, fb.<subdomainIndex>.<creationTime>.<fbclid>, so the click can be recovered later, when there is no URL left to read.

Both end up in the same place: the fbc field of a Conversions API event. One is the raw material, the other is the packaged version of it.

The two side by side

fbclid_fbc
What it isa query parameter on the landing page URLa first-party cookie
What it holdsMeta’s click ID for that clickthe same click ID, plus a subdomain index and a timestamp
Who creates itMeta, on the ad clickthe Meta Pixel when the URL carries an fbclid, or your server
Formatnot published by Meta: treat it as an opaque stringfb.<subdomainIndex>.<creationTime>.<fbclid>
Lifetimeas long as your URL or your storage keeps it90 days in Meta’s cookies policy
Conversions API fieldnothing on its own: it is embedded in fbcuser_data.fbc

The practical consequence: a raw fbclid in a log or a database column is not yet something Meta can match. You have to build the fbc string from it, or read the cookie the pixel already wrote.

The _fbc format, field by field

Meta’s example is fb.1.1793787151204.IwAR2F4-dbP0l7Mn1IawQQGCINEz7PYXQvwjNwB_qa2ofrHyiLjcbCRxTDMgk. Split on the dots:

PartExampleMeaning
versionfbalways fb
subdomainIndex1which domain the cookie belongs to: com is 0, example.com is 1, www.example.com is 2
creationTime1793787151204Unix time in milliseconds when the cookie was saved
fbclidIwAR2F4-dbP0…TDMgkthe fbclid from the landing page URL, unchanged

Two rules break more setups than any other. The click ID is case sensitive, and Meta’s reference says plainly not to apply any modification such as lower or upper case. And the timestamp is in milliseconds: a 10-digit value is seconds, and Meta will not match it.

If you generate the value on a server without saving a cookie, Meta says to use 1 as the subdomain index and, as creation time, the moment you first observed the fbclid. Not the moment the form was submitted, which is a different event and often days later.

Why one survives and the other can disappear

The fbclid depends on the URL. Anything that drops the query string, a redirect hop, a stripped parameter, ends the trail before your server sees it.

The cookie depends on who wrote it. The Meta Pixel is JavaScript, so the cookies it writes fall under Safari’s Intelligent Tracking Prevention. WebKit’s documentation lists two rules that matter here: cookies created in JavaScript are deleted after 7 days without user interaction with the site, and when ITP detects link decoration, meaning a click ID in the URL picked up by script, cookies created in JavaScript on that landing page are capped at 24 hours.

An ad click landing with ?fbclid= and a pixel copying it into _fbc is exactly the pattern that second rule describes. A cookie set by your server in a Set-Cookie header is not covered by those caps, unless the request goes through third-party cloaking, in which case it is capped at 7 days.

Safari can also remove the parameter before anyone sees it. Link Tracking Protection strips a subset of query parameters used for cross-site tracking before navigation, on in Private Browsing. When that happens nobody can build fbc, and the right answer is to send fbp if you have it, plus hashed email and phone, rather than inventing a value. How the two cookies work covers the Safari side in full.

Why a visitor can carry several fbc values

This is the usual reading of “multi fbc cookie”, and it has two ordinary causes.

The first is subdomains. The subdomain index is part of the value, so a visitor who lands on www.example.com and later on example.com can carry two cookies with different indices. That is not a fault, it is the format working as designed.

The second is repeat clicks. A visitor who clicks a second ad gets a new fbclid, and Meta asks for the most recent value whether you keep it in a cookie or in a database. So an _fbc from last week’s campaign and one from today can both exist on the same browser, and only one of them describes the click that led to the form.

The rule that follows is short: keep one value per visitor, replace it when the fbclid in the URL differs from the one you stored, and never overwrite it when the URL has no fbclid at all. A visit with no click is not evidence of a new click.

Sending them to Meta

Both go into user_data, as plain strings:

{
  "user_data": {
    "fbc": "fb.1.1793787151204.IwAR2F4-dbP0l7Mn1IawQQGCINEz7PYXQvwjNwB_qa2ofrHyiLjcbCRxTDMgk",
    "fbp": "fb.1.1793787151880.1684203391"
  }
}

Meta’s customer information parameters mark fbc and fbp as do-not-hash, alongside the IP address and the user agent, while email and phone must be hashed with SHA-256. Hashing the click ID is a silent failure: the event still arrives, and it matches nothing.

Meta’s Event Match Quality article ranks the click ID as a high-priority identifier, next to email, and the browser ID as medium. That is the honest ranking of the two. The _fbp says which browser this is; the _fbc says which ad click brought it. If you lose the second, you keep a person and lose the reason they arrived, which is the difference between attributing a lead to a creative and attributing it to nobody in particular.

The other click IDs work the same way on their own platforms: gclid for Google, ttclid for TikTok, each with its own cookie and its own return channel. None of them is a good primary key for your reporting, because each exists only for its own platform. The key your leads should join on is one you generate yourself, one per click, stored on your server.

Mistakes worth checking first

  • Lowercasing or trimming the fbclid before you store it.
  • A timestamp in seconds instead of milliseconds.
  • Stamping the value when the form was submitted rather than when the click arrived.
  • Rewriting the cookie on every visit, including visits with no click.
  • Passing fbc only with the Lead event, when Meta recommends sending it with every event for that visitor.
  • A redirect between the ad and the landing page that loses the query string.

Any one of these leaves you with events that Meta accepts and cannot match, which looks like a weaker campaign rather than a broken setup. The faster diagnosis is in all the Meta tracking questions, which starts from the Pixel and CAPI setup and works back to the identifiers.

Questions on this topic

All questions on this topic →

FAQ

Can I send fbc without the _fbc cookie?+

Yes, as long as the request still has an fbclid in its URL. Meta says to build the value as fb.1.<milliseconds>.<fbclid>, using 1 as the subdomain index and the moment you first saw the click as the creation time, and to keep it for the events that follow.

Why do I see more than one _fbc value?+

Because the cookie is defined per subdomain, and the subdomain index is part of the value. A visitor can carry values from several of your subdomains, and so can a browser that saw two different ads. Keep the most recent one: Meta asks for the latest value you have.

Is fbclid hashed before it goes to Meta?+

No. fbc and fbp are do-not-hash fields in the customer information parameters, like the IP address and the user agent. Email and phone are the fields Meta requires hashed.

Does the click ID work the same on Safari?+

Not automatically. Safari strips some query parameters before the page loads in Private Browsing, and it caps cookies written by JavaScript to 24 hours when it detects a click ID in the URL. A cookie set by your server in the response that renders the landing page is not capped that way.

Ready to find out what
converts, for real?

Free to start.

Start free →