You can remove fbclid with the URL API in JavaScript or with a redirect rule on your server, and Meta will add it again on the next click. On ad traffic that removal usually costs you attribution, because the value is what builds the fbc click identifier your server sends back with the Lead. Strip it from the links you publish, keep it on the links Meta sends you.
What fbclid is and where it comes from
You never add fbclid yourself. Meta generates it and passes it with the URL of your website when someone clicks an ad on Facebook or Instagram, and Meta’s documentation on the click identifier says the automatic attachment does not affect the tracking parameters you have set. So your template keeps working next to it, with the utm_ keys and the ad ID in the same URL.
What it is for: building the fbc value that goes out with Conversions API events, written as version.subdomainIndex.creationTime.fbclid. What it is not: an ad identifier. An fbclid says nothing about which ad was clicked until Meta looks it up on its side, so it never replaces {{ad.id}} in your own records. If you need the ad ID on the lead itself, it has to come from your Facebook URL parameters.
The parameter has three properties worth knowing before you touch it:
- it is case sensitive, so it has to be stored exactly as it arrived;
- it is long, and it arrives as a single opaque string;
- it belongs to one visit. Meta is explicit that a URL parameter applies to the visit that came from the ad, so a return visit on its own carries none of it.
Removing it in the browser
The modern way is the URL API, which parses the query string instead of rewriting characters with string replacements. This deletes the key and any duplicate of it, then rewrites the address bar without adding a history entry:
const url = new URL(window.location.href);
const hadFbclid = url.searchParams.has('fbclid');
url.searchParams.delete('fbclid');
if (hadFbclid) {
window.history.replaceState({}, '', url.pathname + url.search + url.hash);
}
Two details make the difference between a clean removal and a broken one. URLSearchParams.delete removes every occurrence of the key, where a regular expression tends to leave the trailing & behind. And replaceState keeps the person on the same page while the address changes, so a copy of the URL no longer carries a click identifier from someone else’s ad.
Server side, the same thing is a rewrite rule on the tracking domain. Do it in a redirect only if you are sure the parameter reaches your application first, because a redirect that rebuilds the query string drops it before anything can read it. That is the mechanism behind most missing click identifiers: a link shortener, an http to https hop, a CMS redirect or a geo redirect, each one a full request and response that can arrive without the query string.
What you lose when the removal is early
The click identifier is one of the two things Meta matches a lead on, the other being the hashed email and phone from the form. Remove fbclid before your server can read it and the fbc value is never written, so the Conversions API event goes out with less to match, and the delivery system learns less from each lead. The fbc and fbp cookies entry covers the format and how the browser and the server copies compare.
There is a second cost, specific to leads. Once the visitor leaves and comes back on their own, only what you stored on the first visit links the return to the click. A first-party cookie written by your server is that store; a URL parameter that you deleted is not. Any redirect hop is also a chance for the parameter to disappear, which is why a landing page that logs the click on the same domain that serves it keeps more of the value than a chain of hops does.
| Situation | Remove fbclid? | Why |
|---|---|---|
| Ad click landing on your lead form | no | it builds the fbc sent with the Lead |
| URL shown in the address bar after the visit | yes, once stored | it is someone else’s click ID and it looks like clutter |
| Links you share in emails, documents, chat | yes | the recipient would inherit an attribution you did not earn |
| Canonical URL, sitemap, structured data | yes | a canonical address should be stable |
| Public organic posts | yes | no ad click, nothing to keep |
| Logs and analytics exports | keep the stored copy | you need the value to reconcile the lead |
Removing it from the links you publish
For anything a person can copy and forward, the removal should happen before the link leaves your hands:
- Take the URL your landing page reports after a real click on a live ad, not the one typed in Ads Manager.
- Parse it with the URL API and delete the
fbclidkey, so duplicates go too. - Set that clean address as the canonical URL of the landing page.
- Use the clean address in your sitemap, in emails and in any link you paste for a colleague.
- Keep the parameter that arrived in your own record, not in the link you redistribute.
The last step is the one that needs a decision about where the truth lives. A URL parameter describes one visit and disappears; a stored identifier travels with the lead. That is the design behind server-side tracking, where the click identifier is written to a cookie by your server on your own domain, so it survives the hop and stays attached to the form submission.
DropCPL takes that route: the click lands on the domain that serves the landing page, the click identifier goes into a first-party HttpOnly cookie with no redirect in between, and each lead reaches your system with the ad, the creative and the landing page it came from.
Checking that it still works
After any change to the redirect chain or to the address bar, test the path from the click, not from a pasted URL:
- Click a live ad on your own phone, in the Facebook app, and confirm the landing page received the parameter. A tag manager preview or the browser console is enough.
- Submit the form and check that the event leaving your server carries an
fbcvalue and the sameevent_idas the browser copy. - Repeat the visit without clicking the ad, and confirm the stored cookie still links the new session to the old click.
- Only then remove anything from the address bar.
If the parameter never arrives, the problem is upstream of the removal code: check the redirects and the destination URL before rewriting anything. A short list of the other suspects sits in Meta Pixel, Conversions API and attribution, and fbclid has the definition for the people who will ask what the string in the report is.