Fix guide · Any website · medium · about 30 min
Click ID from Meta ads is not stored
For the finding “Click ID from Meta ads is not stored”. Using Framer? See the Framer guide.
What this means
When someone clicks a Meta ad, Meta adds a click ID to the link: ?fbclid=.... The Meta Pixel on your site is supposed to save that value in a first-party cookie called _fbc, so that later events (a lead, a purchase, possibly on another page) can be tied back to the ad click.
On your site, the click ID did not end up in _fbc.
Why it costs you money:
- Meta has a weaker link between ad clicks and conversions, which lowers event match quality and can lower reported results.
- Campaigns optimize on less complete data, so you may pay more per result.
- If you send server events through the Conversions API, they usually rely on the same
_fbcvalue. If it is missing in the browser, it is missing on the server too.
How to confirm it yourself
Our check opens your page on a mobile-sized browser in the EU with test click IDs added to the URL (for Meta: fbclid=TRACKCHECK_TEST_FBCLID), accepts the cookie banner, and then looks for _fbc. If our report shows a redirect chain, look at it first: it often shows exactly where the click ID was dropped.
To repeat this yourself:
- Open a private (incognito) window and open developer tools (F12) on the Network tab. Tick Preserve log so redirects stay visible.
- Open your page with a made-up click ID added, for example
https://example.com/?fbclid=test123. (This sends a normal page view to your own pixel. It does not create an ad click.) - Look at the first requests in the Network list. If you see a
301,302,307or308redirect, click it and check the Location header: does the new address still contain?fbclid=test123? If not, the redirect is dropping the click ID before any script on your site runs. - Accept the cookie banner and wait a few seconds.
- Go to the Application tab (Chrome) or Storage tab (Firefox), open Cookies for your domain, and find
_fbc. Its value should look likefb.1.<timestamp>.test123: the lettersfb, a number for the domain level (usually1), the time it was created, and the click ID. You should also see_fbp, the pixel’s browser ID.
If _fbc is missing or does not end with your test value, the click ID is being lost.
How to fix
Work through the chain: the link must arrive with fbclid, the pixel must run, and the pixel must be allowed to write cookies.
- Fix redirects that drop the query string. This is the most common cause, and it happens before any tracking code can run.
- Make your ads link straight to the final address: the exact protocol (
https), host (with or withoutwww) and path (with or without the trailing slash) that your site ends up on. - Check redirect rules at your host, CDN or server (
httptohttps, non-wwwtowwwor back, old paths to new paths, language or country redirects). Each rule should keep the query string. Many tools have an option such as “preserve query string” or “forward parameters”; on a web server it is usually a flag on the redirect rule. - Avoid link shorteners and tracking redirectors in ad URLs unless you have tested that they pass
fbclidthrough.
- Make your ads link straight to the final address: the exact protocol (
- Make sure the pixel actually runs on the landing page after consent.
_fbcis written by the pixel. If the pixel does not fire after the visitor accepts cookies, or only starts on the next page (by which time the URL no longer hasfbclid), the cookie is never set. Check the guide “Meta Pixel does not fire after consent”. - Check that first-party cookies are allowed for the pixel. Meta’s pixel uses first-party cookies (
_fbp,_fbc). In Meta Events Manager, open Data sources, select your pixel and open Settings: under Cookie settings, Cookie usage shows whether First-party cookies are on (the default). If they were turned off, click Edit, turn them on and save. If first-party cookies are off, or blocked in code, the cookie will not be written. - Check that nothing removes or rewrites the URL first. Some sites, single-page apps or “clean URL” scripts strip unknown parameters from the address bar on load. If the pixel loads after that, it never sees
fbclid. - Check your consent tool is not deleting the cookie. Some consent tools delete marketing cookies they consider unapproved. After Accept,
_fbcshould stay. - If a server-side setup is supposed to set
_fbc: confirm it builds the value in the format Meta documents (fb.1.<creation time in milliseconds>.<fbclid>) and stores it as a first-party cookie for your domain, with a lifetime of about 90 days.
Common causes
- A redirect without the query string:
httptohttps,example.comtowww.example.com, adding a trailing slash, or a language redirect. - A link shortener or tracking redirect in the ad URL.
- The pixel waits for consent and does not fire after Accept, or only fires on the next page.
- First-party cookies are disabled for the pixel.
- A script strips query parameters before the pixel reads them.
How to verify the fix
- Repeat the test above: no redirect drops
?fbclid=test123, and after accepting cookies_fbcends withtest123. - Navigate to another page on your site:
_fbcis still there. - Re-run the check on IsPixelWorking. The issue should be gone, and the redirect chain in the report (if any) should keep the click ID.
Sources
- Meta for Developers,
fbpandfbcparameters (cookie format, subdomain index, 90-day lifetime, pixel stores the click ID in_fbc): https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc - Meta for Developers, Get started with the Meta Pixel: https://developers.facebook.com/docs/meta-pixel/get-started
- Meta Business Help Center, Check your Meta Pixel cookie settings: https://www.facebook.com/business/help/560982207646475
- Meta Business Help Center, About cookie settings for the Meta Pixel: https://www.facebook.com/business/help/471978536642445