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:

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:

  1. Open a private (incognito) window and open developer tools (F12) on the Network tab. Tick Preserve log so redirects stay visible.
  2. 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.)
  3. Look at the first requests in the Network list. If you see a 301, 302, 307 or 308 redirect, 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.
  4. Accept the cookie banner and wait a few seconds.
  5. Go to the Application tab (Chrome) or Storage tab (Firefox), open Cookies for your domain, and find _fbc. Its value should look like fb.1.<timestamp>.test123: the letters fb, a number for the domain level (usually 1), 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.

  1. 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 without www) and path (with or without the trailing slash) that your site ends up on.
    • Check redirect rules at your host, CDN or server (http to https, non-www to www or 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 fbclid through.
  2. Make sure the pixel actually runs on the landing page after consent. _fbc is 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 has fbclid), the cookie is never set. Check the guide “Meta Pixel does not fire after consent”.
  3. 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.
  4. 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.
  5. Check your consent tool is not deleting the cookie. Some consent tools delete marketing cookies they consider unapproved. After Accept, _fbc should stay.
  6. 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

How to verify the fix

  1. Repeat the test above: no redirect drops ?fbclid=test123, and after accepting cookies _fbc ends with test123.
  2. Navigate to another page on your site: _fbc is still there.
  3. 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