Fix guide · Shopify · medium · about 30 min

Facebook click ID (fbclid) lost on Shopify

For the finding “Click ID from Meta ads is not stored”. Also for: Any website, WordPress, 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 store should save it in the first-party cookie _fbc, so later events (an add to cart, a purchase) can be tied back to the ad click. On your store, 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 _fbc value, so they lose it too.

How to confirm it yourself

Our check opens your page in a browser in the EU as if the visitor arrived from a Meta ad, accepts the cookie banner and looks for _fbc. If our report shows a redirect chain, start there: it often shows where the click ID was dropped.

  1. Open a private (incognito) window, open developer tools (F12) on Network, and tick Preserve log so redirects stay visible.
  2. Open the exact URL your ads use, with a made-up click ID added: https://yourstore.com/products/example?fbclid=test123. (This sends a normal page view to your own pixel. It does not create an ad click.)
  3. If one of the first requests is a redirect (301, 302, 307, 308), click it and check its Location header. Does the new address still contain ?fbclid=test123?
  4. Accept the cookie banner and wait a few seconds. Where consent is required, the Facebook & Instagram app’s pixel waits for it, so _fbc may appear only after you accept.
  5. Go to Application > Cookies (Chrome) or Storage > Cookies (Firefox), select your domain and look for _fbc. It should look like fb.1.<timestamp>.test123. 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

  1. Point your ads at the final address. Your primary domain is set under Settings > Domains; your other domains, including the .myshopify.com address, redirect to it. In our tests on Shopify stores, these redirects (also http to https, and with or without www) and Shopify’s market redirects to a country folder (for example /en-de) kept the query string, including fbclid. Still use the exact final address in every ad (primary domain, https, and the market folder if you use one), so visitors land without a redirect.
  2. Test automatic redirection for your markets. If automatic redirection is on (Online Store > Preferences), visitors may be sent to another domain or folder for their country. Open your ad URL with ?fbclid=test123 through a VPN in each of your main markets and check that the click ID survives.
  3. Check Shopify URL redirects. Redirects under Content > Menus > View URL redirects only work for addresses that no longer exist, and Shopify notes that URLs with query strings might not work as expected. If an ad points to an old address, change the ad to the current page.
  4. Check redirects outside Shopify and in apps: domain forwarding at your registrar, link shorteners, link-in-bio pages, and apps that send visitors to another address (country selectors, A/B tests, age checks). These are common places where the query string is dropped.
  5. Make sure the pixel runs on the landing page after consent. _fbc is written by the pixel. When a visitor accepts, Shopify starts the app pixels that were waiting for consent and replays the events that already happened on the page, so the Facebook & Instagram app’s pixel should store _fbc while fbclid is still in the address. If the pixel does not fire after “Accept” at all (often because a consent app is not connected to Shopify’s Customer Privacy API), see “Meta Pixel not firing after cookie consent on Shopify”.
  6. Check the pixel uses first-party cookies. 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 (they are on by default). If they were turned off, click Edit, turn First-party cookies on and save.
  7. If your Meta pixel runs in a custom pixel (directly or through GTM), it runs in Shopify’s sandbox frame. Use the test above to check that _fbc still ends up on your store’s domain. If it does not, use the Facebook & Instagram app’s pixel instead (and remove the custom pixel, so events are not sent twice).
  8. Check your consent app does not delete the cookie. Some consent tools delete marketing cookies they consider unapproved. After “Accept”, _fbc should stay.

Common causes

  • Ads link to an address that goes through a redirect outside Shopify (registrar forwarding, a link shortener, a link-in-bio tool) that drops the query string.
  • An app redirects visitors to another page or country version without keeping the query string.
  • An ad points to an old address that relies on a URL redirect.
  • The pixel never fires after consent on the landing page, so it never reads fbclid.
  • First-party cookies are disabled for the pixel.

How to verify the fix

  1. Repeat the test above with the exact ad URL: no redirect drops ?fbclid=test123, and after accepting cookies _fbc ends with test123.
  2. Open another page of the store: _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