Skip to content
Guide

How to add Facebook Pixel to Shopify in 2026: the app, customer events and avoiding duplicates

Updated October 23, 2026

The simplest way to add Facebook Pixel to Shopify is Meta's own Facebook & Instagram app: you connect your Meta account, pick a pixel and choose how much data to share, with no code. This guide covers that setup, when a custom pixel makes sense instead, why pasting code into theme.liquid isn't the way any more, and how to avoid sending every event twice.

Before you start

  • A Shopify store that isn't password protected, on the Basic Shopify plan or higher.
  • A Facebook Page for your business, owned by a Meta business portfolio where you have admin permissions.
  • Find out whether pixel code was ever added to your theme, or whether an agency or another app already handles your Meta tracking. Two setups sending the same events is a common cause of duplicates.

How to add Facebook Pixel to Shopify with the Facebook & Instagram app

Meta's app shows up in your Shopify admin as Facebook & Instagram (in Shopify's help center it's called Facebook and Instagram by Meta). Both Shopify and Meta point merchants to it, and the data-sharing levels below are settings inside it.

  • In your Shopify admin, click Sales channels, select Facebook & Instagram and click Add app, then Add sales channel to finish installing.
  • Click Start setup, then Next, then Log in with Facebook and sign in.
  • Follow the prompts to connect your business portfolio and Page and to set up the features you want: commerce, ads and the Meta pixel.
  • When you reach the pixel step, pick an existing pixel from the list or click Create new.
  • Accept the terms and conditions and click Submit.

Choose a customer data-sharing level

Data sharing has to be on before the pixel sends anything. Go to Sales channels → Facebook & Instagram → Settings, open the data sharing settings, turn customer data sharing on, choose a level and connect your pixel. Once it's on, the app sends events such as PageView, ViewContent, Search, AddToCart, InitiateCheckout, AddPaymentInfo and Purchase.

  • Standard: pixel only. It shares browsing behavior from the customer's browser, and a browser ad blocker can stop it.
  • Enhanced: the pixel plus the Conversions API, which sends the purchase event from Shopify's servers to Meta's. It also shares name, email, phone number and location to match customers on Meta. Shopify notes that server-to-server data isn't affected by browser ad blockers.
  • Maximum: also the pixel plus the Conversions API, sharing the same customer information as Enhanced, and kept up to date with Meta's latest advertising technology.
  • Meta recommends Enhanced or Maximum. In the data access settings it recommends Always on rather than Optimized.
  • Enhanced and Maximum share customer information, so your privacy policy needs to explain how you share customer data.
  • How the browser pixel and the server side fit together, and how duplicates between them are handled, is covered in Conversions API vs Meta Pixel.

Shopify customer events: app pixels and custom pixels

Shopify now manages tracking code in Settings → Customer events. Customer events are actions such as clicking a link or adding a product to the cart. Pixels are the code that collects those events and passes them to services like Meta.

  • App pixels come from installed apps built on Shopify's Web Pixels API. Once the Facebook & Instagram app is set up, its pixel is listed here. Its permission and customer privacy settings are set by the app, not by you.
  • Custom pixels are code a developer adds by hand: in Settings → Customer events, name the pixel, click Add pixel, paste the code, click Save, then Connect pixel.
  • Shopify's advice is to use an app pixel when one exists and a custom pixel only when no app pixel meets your needs. For Meta, it recommends the Facebook & Instagram channel.
  • Custom pixels can track events on checkout and post-purchase pages. They run in a sandbox where not all pixel code works, they need JavaScript knowledge, and Shopify support doesn't help build them.
  • If a custom pixel needs customer consent, set its Permission option to Required. Asking for consent needs a cookie banner on your store.

Why not paste pixel code into theme.liquid

Older tutorials say to paste the base code into theme.liquid and purchase code into Additional scripts. Today that route is closed or only half works:

  • Meta pixels that were added in Online Store → Preferences without the app were removed from that page as of February 2025.
  • checkout.liquid is no longer supported for the Information, Shipping and Payment steps, and checkout.liquid and additional scripts were sunset for the Thank you and Order status pages on August 28, 2025.
  • Since that date the additional scripts section in checkout settings is view-only. Script tags on those pages ended for Plus stores on the same day and for other plans on August 26, 2026.
  • The data-sharing levels, and with them the Conversions API, live in the Facebook & Instagram app. Code pasted into a theme gets none of that.
  • Shopify's migration guide says to move old pixels to an app pixel or a custom pixel, and for Meta specifically to the Facebook & Instagram channel.

Avoid a double install

If old code stays in place when you add the app, your store has more than one pixel sending the same events. Shopify warns this gives duplicate or incorrect data in your reports.

  • Remove old theme code before connecting the app: Online Store → your current theme → Edit code, open theme.liquid, delete the Meta pixel code in the head section and click Save.
  • Search your other liquid files for fbq(, the function Meta's pixel code calls. Leftover event code fires on top of the app.
  • Use one setup per pixel. If you run a custom pixel for Meta, don't also connect the same pixel in the app, and the other way round.
  • Ask any agency or app that manages your Meta ads whether it adds its own pixel. Shopify notes that tracking the same event more than once is a common problem when migrating.

Check that it works

Shopify points out that data won't appear until customers take action on your store, so browse it yourself: open a product, add it to the cart and start checkout. Then confirm the events on Meta's side.

  • Use Test events in Events Manager or the Meta Ads Data Advisor extension to watch events arrive. How to check if your Meta Pixel is working walks through both.
  • Each action should produce one event. Two PageView or AddToCart events for one click usually means a second install is still running.
  • Pixel Audit opens your store in a real browser, goes through home, product, cart and checkout, and reports missing or duplicate Meta events. It doesn't place orders, so it can't see Purchase, and it can't see Conversions API events.

See which Meta events your product, cart and checkout pages send, and whether any fire twice.

Check my Meta Pixel

Questions

Can I add the Facebook Pixel to Shopify manually?
Yes, as a custom pixel in Settings → Customer events. But Shopify recommends an app pixel when one fits, and for Meta that's the Facebook & Instagram app. Don't run a custom pixel and the app's pixel for the same pixel ID at once.
Does the Shopify Facebook app set up the Conversions API?
Yes, on the Enhanced and Maximum data-sharing levels. Standard uses the browser pixel only.
Do I need Shopify Plus for the Meta pixel?
No. Meta lists the Basic Shopify plan or higher, a store that isn't password protected, and a business portfolio that owns your Facebook Page.
Why isn't my pixel showing any data yet?
Check that customer data sharing is turned on in the app's settings. Data only shows up after someone uses the store, so browse it yourself and watch Test events in Events Manager.

Related guides

Sources