Fix guide · WordPress · medium · about 45 min
Facebook click ID (fbclid) lost on WordPress
For the finding “Click ID from Meta ads is not stored”. Also for: Any website, Shopify, Webflow, Framer.
What this means
When someone clicks a Meta ad, Meta adds ?fbclid=... to the link. The Meta Pixel (still often called the Facebook Pixel) on your site should save it in the first-party cookie _fbc, so later events (a lead, an add-to-cart, 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.
- If you send server events through the Conversions API (Meta’s plugins and most tracking plugins can), they usually rely on the same
_fbcvalue, so they lose it too.
How to confirm it yourself
Our check opens your page in a browser in the EU as if arriving from a Meta ad, with a test click ID in the URL, accepts the cookie banner and looks for _fbc. If our report shows a redirect chain, start there.
- Log out of WordPress or use a private (incognito) window. Some plugins that remove URL parameters skip logged-in users, so you would not see the problem while logged in.
- Open developer tools (F12) on the Network tab and tick Preserve log, so redirects stay visible.
- Open the exact URL your ads use, with a made-up click ID added:
https://yourdomain.com/landing-page/?fbclid=test123. (This sends a normal page view to your own pixel. It does not create an ad click.) - If the first request is a redirect (
301,302,307,308), check its Location header. Does the new address still contain?fbclid=test123? - Accept the cookie banner, wait a few seconds, then go to Application > Cookies (Chrome) or Storage > Cookies (Firefox) and look for
_fbc. It should look likefb.1.<timestamp>.test123. You should also see_fbp.
How to fix
-
Link your ads to the final address. WordPress redirects other versions of an address to its canonical one: the
httporhttpsandwwwor non-wwwversion set in Settings > General (WordPress Address and Site Address), and the trailing slash that your permalink structure in Settings > Permalinks uses. In our tests on WordPress sites,httptohttps,wwwand trailing slash redirects kept the query string. Still use the exact final address in every ad, so visitors land without a redirect. -
Check the Redirection plugin, if you use it (Tools > Redirection). Each redirect has a query parameter setting:
- Exact (the default) only matches the query you entered, so an ad URL with
fbclidmay not be redirected at all; - Ignore matches but drops the parameters;
- Pass matches and passes the parameters on to the target.
For any redirect your ads go through, choose Pass. You can also change the default for new redirects under Tools > Redirection > Options (Default query matching).
- Exact (the default) only matches the query you entered, so an ad URL with
-
Check URL cleanup in your SEO plugin. Yoast SEO’s URL cleanup option (in its Crawl optimization settings) redirects away all unregistered URL parameters. It never removes
gclidorutm_parameters, butfbclidis not on that list. It also does not remove anything for logged-in users, which is why you may not have noticed. If it is on, addfbclidto the parameters you want to keep, or turn the cleanup off. If you use a different SEO, security or caching plugin with a similar “remove query strings” or “clean URLs” option, check it the same way. -
Check language redirects. WPML’s Browser language redirect (WPML > Settings > URLs and SEO) redirects visitors in the browser to the version in their language, and Polylang’s Detect browser language option redirects first-time visitors of the home page. Test your ad URL with a browser set to a different language. If the redirect drops
fbclid, link your ads directly to the language version the audience should land on. -
Check redirects outside WordPress: rules in your hosting panel or
.htaccessfile, your CDN, a domain forwarding service, link shorteners or campaign link tools in front of the site. -
Make sure the pixel runs on the landing page after consent.
_fbcis written by the pixel. If it only fires on the next page,fbclidis no longer in the address and_fbcis never written. On WordPress, caching and optimization plugins that combine or delay scripts can cause this; see “Meta Pixel not firing after cookie consent on WordPress”. -
Check that first-party cookies are on. 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 First-party cookies on and save.
-
Check that your consent plugin keeps the cookie. After you click Accept,
_fbcshould still be there on the next page. -
Clear every cache (plugin, host and CDN) after changing redirects or settings, then test again while logged out.
Common causes
- Yoast SEO’s URL cleanup (or a similar option in another plugin) redirects
fbclidaway. - A redirect in the Redirection plugin is set to Ignore or Exact instead of Pass.
- Ads link to an old page, the non-canonical domain or a short link whose redirect drops the query string.
- A language redirect sends visitors to another URL without
fbclid. - The pixel only fires on the next page after consent, often because an optimization plugin delays or combines it.
- First-party cookies are turned off for the pixel.
How to verify the fix
- Repeat the test above with the exact ad URL, logged out: no redirect drops
?fbclid=test123, and after accepting cookies_fbcends withtest123. - Open another page of the 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, pixel stores the click ID in_fbc): https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc - 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
- WordPress Developer Resources,
redirect_canonical()(www, trailing slash and other canonical redirects): https://developer.wordpress.org/reference/functions/redirect_canonical/ - Redirection, Matching a URL (query parameters: exact, ignore, pass): https://redirection.me/support/matching-a-url/
- Redirection, Options (default query matching): https://redirection.me/support/options/
- Yoast, Advanced crawl optimization settings: URL cleanup (parameters never removed, logged-in users): https://yoast.com/help/advanced-crawl-settings-permalink-cleanup/
- WPML, Automatic redirect based on browser language: https://wpml.org/documentation/getting-started-guide/language-setup/automatic-redirect-based-on-browser-language/
- Polylang, Detect the browser preferred language: https://polylang.pro/documentation/support/guides/detect-the-browser-preferred-language/
- IsPixelWorking live test, 2026-10-04, on three public WordPress sites: http to https, www to non-www and trailing-slash redirects (301) kept
?fbclid=in the target URL. Some of these redirects may be served by the host rather than WordPress.