Meta Cookie Lab
Inspect your browser IDs and test fbclid → fbc.
Captured from the page URL when present. Keep the click ID exactly as received, including letter case.
fbc · click identifier
fb.<domain index>.<timestamp ms>.<fbclid>
fbp · browser identifier
fb.<domain index>.<timestamp ms>.<random number>
This ID is independent of fbclid. This page reads the existing _fbp cookie; it does not invent a replacement.
Values for your PHP endpoint
Preview only. Missing IDs are omitted; IDs are sent without hashing. No CAPI request is made.
Optional: collect fbp with your Meta Pixel
Use a test Pixel ID. Clicking the button loads Meta’s script and sends a PageView to that Pixel. Only enable this when you permit Meta tracking for this test.
The tester checks for cookies for 10 seconds after loading. A loaded script does not confirm Meta received the event. Verify delivery in Events Manager. If cookies remain missing, check your consent setup, blockers and browser settings.
How to test and use this in production
Upload this file as
index.htmlortest.htmlto an HTTPS domain. Cookie testing needs HTTP(S), not a double-clicked local file.Open the page with
?fbclid=YOUR_REAL_CLICK_ID. You can use a made-up value to check formatting only; it cannot demonstrate real ad attribution.Click Save fbc cookie, then reload. The same click keeps its original timestamp. A different click builds a new value. Without a new click, the saved cookie is reused.
To get fbp, read a cookie already set on this domain, or use the optional Pixel test. This page cannot read cookies from your other domains.
On your real landing page, collect IDs after your consent gate, store them with the lead / subid, and reuse them for later conversions. Do not generate a fresh ID or click timestamp for every postback. If both the cookie and fbclid are absent, omit fbc.
This test saves a host-only _fbc cookie at Path=/ for up to 90 days; the browser can shorten its lifetime. It does not use localStorage to restore deleted cookies. Cookie timestamps use milliseconds; your CAPI event_time uses seconds.