Cookie preferences

Choose which optional cookies EndFrame may use on this site. Analytics and advertising tools load only if you allow them, and you can change your mind any time from “Cookie settings” in the footer. Whatever you choose, this tab keeps the campaign labels from the link that brought you, and they are saved with your account if you sign up. Read the Cookie Policy.

Needed for the site to work, such as remembering this choice. Always on.

Lets us load analytics tools through Google Tag Manager, including Google Analytics and Microsoft Clarity session recordings, to understand how the site is used.

Allows advertising tags to measure our ad campaigns. None run on this site today. It also keeps ad click IDs from the page address for this tab, and saves them with your account if you sign up.

Skip to main content

fbclid, _fbc and _fbp Explained: Meta's Click ID and Browser ID, and How to Send Them

fbclid, _fbc and _fbp are the three identifiers that let Meta tie a conversion back to an ad click and a browser. This guide explains what each one is, the exact format Meta expects, and how to capture and send them with server events without breaking them.

The EndFrame Team6 min read

You are setting up the Meta Conversions API, or reading a payload someone else built, and you keep running into three similar names: fbclid in the landing URL, and fbc and fbp in the user_data object. Events Manager may also be nudging you to send more click IDs to improve match quality. These identifiers are small, but getting their format slightly wrong silently breaks attribution. This guide explains what each one is, where it comes from, the exact format Meta expects, and how to send it from your server. If you are new to server events, start with the difference between the Meta Pixel and the Conversions API.

What fbclid is

fbclid is a query parameter Meta appends to outbound links when someone clicks through from Facebook or Instagram, including ad clicks. The value is an opaque string generated by Meta. It means nothing to you, but Meta can use it to recognise the specific click that brought the visitor to your site. It sits alongside your UTM parameters in the landing URL, and it is fragile in the same way: redirects that rebuild the URL, link shorteners and some consent or caching tools can drop it before anything reads it. Meta's documentation is explicit that the click ID is case sensitive and must not be modified, so never lowercase it as part of a URL clean-up routine.

What the _fbc cookie is

When the Meta Pixel loads on a page whose URL contains fbclid, it saves the click ID in a first-party cookie called _fbc. The cookie does not hold the raw fbclid alone. It wraps it in a fixed format so Meta knows when it was captured. When you send a server event, the value of this cookie goes into the fbc field of user_data.

What the _fbp cookie is

_fbp is a browser identifier. The Pixel sets it on the first page view, whether or not the visitor came from an ad, and it contains a random number generated by the Pixel so that each browser gets a unique value. It lets Meta connect events from the same browser over time. On the server it is sent as fbp. Unlike fbc, you cannot reconstruct fbp from anything in the URL: it only exists if the Pixel has run, so do not invent a value for visitors who never loaded it.

The three identifiers side by side

fbclid_fbc / fbc_fbp / fbp
What it isClick ID in the landing URLCookie wrapping the click IDCookie identifying the browser
Created byMeta, when the link is clickedThe Pixel, or your own codeThe Pixel
Present forVisits from a Facebook or Instagram clickVisitors who arrived with fbclidAny visitor where the Pixel loaded
FormatOpaque string, case sensitivefb.1.creationTime.fbclidfb.1.creationTime.randomnumber
Hash before sending?Not sent on its ownNoNo

Reading the format

Both cookie values follow the pattern version.subdomainIndex.creationTime.value. The version is always fb. The subdomain index records which domain level the cookie was set on: 0 for a top-level domain like com, 1 for example.com and 2 for www.example.com. Meta's guidance is to use 1 when you generate the value on a server without saving a cookie. The creation time is a Unix timestamp in milliseconds, not seconds, recording when the cookie was saved or, if there is no cookie, when you first saw the fbclid. The final part is the fbclid itself for fbc, or the Pixel's random number for fbp.

A valid fbc therefore looks like fb.1.1554763741205.IwAR2F4-dbP0l7Mn1IawQQGCINEz7PYXQvwjNwB_qa2ofrHyiLjcbCRxTDMgk, and a valid fbp like fb.1.1596403881668.1116446470. If your values have a ten-digit timestamp, someone used seconds. If the click ID part is lowercase while the URL had mixed case, something modified it.

How to send fbc and fbp with server events

In a Conversions API request, fbc and fbp go inside user_data next to the other customer information parameters. They are sent as plain text. Meta's parameter reference lists them with client_ip_address and client_user_agent as fields that must not be hashed, while email, phone and name fields must be hashed with SHA-256 after normalisation. For website events, client_user_agent is required, and the IP address and browser identifiers make the event far easier to match. Our guide to hashing emails and phone numbers for conversions APIs covers the fields that do need hashing.

  1. 1On the landing page, read fbclid from the URL before any redirect or clean-up removes it.
  2. 2If the _fbc cookie exists, use its value. If it does not, build fbc yourself as fb.1, then the time you first saw the click in milliseconds, then the unmodified fbclid.
  3. 3Read the _fbp cookie if the Pixel has set it. If it is missing, leave fbp out rather than making one up.
  4. 4Store both values against the visitor or session on your server, so they are still available when the conversion happens later, possibly on another page or after a payment redirect.
  5. 5When the conversion fires, send fbc and fbp unhashed in user_data, together with client_ip_address, client_user_agent and any hashed customer data you have.

Why server-side storage matters in Safari

The Pixel sets _fbc and _fbp with JavaScript, and Safari's Intelligent Tracking Prevention caps the lifetime of script-set cookies at seven days, or 24 hours when the visitor arrives through a decorated URL, such as one carrying a click ID, from a domain Safari classifies as a cross-site tracker. A customer who clicks an ad on Monday and buys the following week may no longer have either cookie. Meta's documentation recommends setting _fbc as a first-party HTTP cookie with a 90-day expiry, and storing the click ID against the visitor on your own server removes the dependency on the browser keeping it. Our explainer on Safari ITP and cookie lifetimes goes into the caps in detail.

Common mistakes

  • Hashing fbc or fbp along with the email. The values become unreadable to Meta.
  • Sending the raw fbclid in the fbc field without the fb.1.timestamp prefix.
  • Using a timestamp in seconds instead of milliseconds.
  • Lowercasing the URL, which changes the click ID.
  • Reading fbclid only on the thank-you page, after the parameter has long gone from the URL.
  • Losing fbclid in a redirect from a tracking domain, a link shortener or an in-app browser hand-off to the phone's default browser.

Consent and privacy

fbc and fbp are identifiers, and storing or reading them on a visitor's device is the kind of processing that cookie consent rules in the EU and UK address. Moving the logic to your server does not change whether consent is needed; it changes where the data flows. Respect the visitor's choice before you read, store or forward these values, and confirm your specific setup with your own counsel. Our article on whether server-side tracking is GDPR compliant sets out what regulators have said.

Checking that it works

Click one of your own ads, or append a test fbclid to a landing URL, complete a test conversion and inspect the server payload in Events Manager's Test Events tab. The fbc value should start with fb.1, carry a 13-digit timestamp and end with the click ID exactly as it appeared in the URL. Over the following days, the event's match quality should reflect the extra identifiers; our guide to improving Meta Event Match Quality explains how Meta scores them.

EndFrame's tracker captures click IDs such as fbclid when the visitor lands and stores them against that visitor, so they are still there when a conversion is sent to the Meta Conversions API from the server, days or pages later.

Frequently asked questions

Should I hash fbc and fbp before sending them to Meta?

No. Meta's customer information parameters list fbc and fbp among the fields that must not be hashed, alongside client_ip_address and client_user_agent. Hashing them turns a valid identifier into a string Meta cannot read, so the match is lost.

Can I remove fbclid from my URLs?

You can strip it from the visible URL after your page has read it, but not before. If a redirect, a plugin or a link shortener drops fbclid before the Pixel or your own code captures it, Meta loses the click identifier for that visit and the conversion has to be matched on weaker signals.

How long does the _fbc cookie last?

Meta's documentation recommends setting _fbc as a first-party HTTP cookie with a 90-day expiry. In Safari, a cookie set by JavaScript is capped much shorter by Intelligent Tracking Prevention, which is why many setups also store the click ID on the server.

Do I need fbc and fbp if I already send hashed email?

They are still worth sending. Email and phone match the person, while fbc ties the event to a specific ad click and fbp ties it to a browser the Pixel has already seen. Meta matches on the combination, so more valid identifiers generally means better match quality.

Try EndFrame

Add a server-side path for your conversions.

EndFrame collects events first-party and forwards conversions server-side to Meta, GA4, TikTok, and webhooks with event-ID deduplication — then credits each conversion to its campaign, with the visit-to-conversion path you can audit.

No credit card required

Keep reading