On this pageJump to a section
When a sale closes in your CRM three weeks after the click, the click has to be findable.
That sounds obvious. In practice most offline closes arrive at Meta with nothing attached to say which ad earned them, so the platform cannot give the ad credit and cannot learn from it. Two small fields fix a large share of that. One is for leads that start in a Meta lead form. The other is for leads that start on your website.
This is a practical walkthrough based on Meta's public documentation. If anything here disagrees with the live pages, trust the live pages, because they change.
Which field do I need for which kind of lead?
It depends on where the lead was created, which is one more reason to know where lead quality really comes from.
| Lead started in a Meta lead form | Lead started on your website |
|---|---|
Use lead_id | Use fbc, and fbp if you have it |
| Comes with the lead from the form | Comes from the fbclid in the landing page URL or the _fbc cookie |
| Store it on the CRM contact when the lead arrives | Store it on the CRM contact when the form is submitted |
| Send it with every later stage or close event | Send it with every later stage or close event, plus hashed email and phone |
If you run both kinds of campaigns, you need both fields. They are not alternatives.
What is lead_id and where does it come from?
Meta's customer information parameters page defines lead_id as the ID associated with a lead generated by Meta's Lead Ads, and says not to hash it.2 Meta's CRM integration documentation says to ensure you have the 15 to 17 digit Meta Lead ID stored in your CRM and recommends sending lead IDs for each event.3
What to do with it
Treat it like a primary key you must never lose. Whatever pulls leads out of the form and into your CRM has to write the ID into a field on the contact. Then every downstream event, qualified, booked, closed, carries it back to Meta.
If you do not have it
Meta says that without a lead ID you can send customer parameters such as click ID, phone number or email instead.3 That works, but a lead ID is the cleaner thread. Add the field now, before the next campaign launches.
What is fbc and what does it look like?
fbc is the Meta click ID in formatted form. The format Meta documents is fb.subdomainIndex.creationTime.fbclid.1
- version: always the prefix
fb. - subdomainIndex: identifies the domain the cookie belongs to. Meta's examples map
comto 0,example.comto 1 andwww.example.comto 2. - creationTime: Unix time in milliseconds. If you did not save the cookie, use the moment you first received the fbclid.
- fbclid: the value of the
fbclidquery parameter from the URL the visitor landed on.
An example from the documentation looks like this: fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890.2
Where it comes from
When someone clicks an ad, Meta appends fbclid to the landing page URL. Meta says the formatted value can be obtained from the _fbc cookie by reading the cookie header, or by reading the fbclid from the request URL's query string on the server and formatting it.1 Meta highly recommends setting the _fbc cookie in the response headers with a 90-day expiration when the click ID arrives in the URL.1
What about fbp?
fbp is the browser ID that the Meta Pixel saves in the _fbp cookie. Its format is fb.subdomainIndex.creationTime.randomNumber. Meta says to send fbc and fbp when available, and to refresh stored values because they can change across browser sessions.14 It is a secondary identifier, but it costs nothing to send.
- Ad clickMeta appends fbclid to the landing page URL
- Landing pageRead fbclid on first load and format it as fbc
- Form and CRMStore the formatted value on the contact
- Stage or close eventSend fbc with hashed email and phone
- MetaMatches the event to the ad that earned it
What breaks these fields?
Most failures are small and silent.
Changing the case
Meta is explicit: the click ID value is case sensitive, and you should not apply any modification before using it, such as upper or lower case.1 A tool that lowercases everything in a URL, or a spreadsheet that "cleans" strings, produces a click ID that points at nothing.
Hashing something that should not be hashed
Email and phone get hashed after normalizing. fbc, fbp, lead_id and the client IP address are not hashed.2 Hash a click ID and you have sent a perfectly formed value that matches no one.
Storing it unformatted
Meta says it is crucial to format the click ID as described before you store it.1 If you store just the raw fbclid, you will have to build the fbc value later, and you will need the original capture time. Store the formatted value on the contact.
Losing it between the click and the form
This one is my own operating note, not Meta's documentation. The fbclid is on the landing page URL. If the visitor moves to another page, another domain or an embedded form before you read it, it can be gone. Capture it on the first page load, write it somewhere durable and carry it into the form as a hidden field.
How do you check that it is working?
Test with a real ad click, not a made-up string.
- Click your own ad in a clean browser session and land on the page.
- Submit the form and open the CRM record. Confirm the formatted
fbcor thelead_idis present, with its case intact. - Move the contact through a stage and confirm the event goes out carrying that field.
- Check Events Manager for the event, its source and its match quality. If deduplication is new to you, start with the Conversions API setup guide.
Meta describes event match quality as a score out of 10 showing how effective an event's customer information may be at matching it to a Meta account, and says only matched events can be used for ads attribution and ad delivery optimization.4 Click IDs and lead IDs are two of the identifiers Meta documents for tying an event back to the original ad.
Why bother?
Because attribution is not a reporting nicety. It decides what Meta learns from, which is the whole premise of qualified lead optimization. A sale that returns to the platform with a lead ID or a clean click ID gives it a real outcome to learn from. A sale that returns with nothing is a number with no history.
If the sale cannot find its way back to the click, the platform learns nothing from the sale.
Jon Loomer made the underlying point in a short video he posted on April 2, 2025, about how Meta credits conversions. It applies to every ID you send back.5
VideoJon Loomer
What You Don't Know About Meta Attribution
A seven-minute walk through the less obvious ways Meta counts clicks and views as conversions.
The customer journey is never as clean as we want it to be.
I agree, and that is the argument for capturing the ID at the moment of the lead: the journey is messy, so the one clean piece of evidence you can keep is worth keeping.
I keep the full system I build for clients to myself, but the two fields are free and public. Capture them at the moment of the lead, store them exactly as given and send them with every event that follows. Exact beats clever here: a click ID that has been touched is worse than none.
Keep building.Ekai
Questions people ask
What is lead_id in Meta's Conversions API?
It is the ID associated with a lead generated by Meta's Lead Ads. You store it in your CRM when the lead arrives and send it back with later events, so Meta can connect the outcome to the original ad. It is not hashed.
What is fbc?
It is the Meta click ID in a specific format: version, subdomain index, creation time and the fbclid value from the ad click URL. It lives in the _fbc cookie on your domain and is sent unhashed.
Should I hash fbc or lead_id?
No. Meta's documentation says not to hash either one. Email and phone are hashed after normalizing, but click IDs and lead IDs are sent as they are.
Why can't I lowercase the fbclid?
Meta says the click ID value is case sensitive and should not be modified in any way, including changing case. Changing it produces a value that no longer matches the original click.
Sources
- 1
- 2
- 3
- 4
- 5

