How do I set up the Meta pixel on Shopify the right way?
Set it up in 6 steps
- Install the Facebook & Instagram app from the Shopify App Store. It is made by Meta and free (Shopify App Store).
- Connect your Meta accounts: the business portfolio, the ad account and the pixel (Meta now calls it a dataset).
- Open the data sharing settings: Sales channels, then Facebook & Instagram, then Settings, then Share data settings.
- Turn on customer data sharing and choose Enhanced or Maximum. You have to pick a level before the pixel can be used.
- Remove old pixel code from theme.liquid and from Online Store, Preferences, if you ever pasted it there (Shopify Help Center).
- Place a test order and check it in Events Manager (see below).
The three data sharing levels
| Level | How data reaches Meta | What is shared |
|---|---|---|
| Standard | Browser pixel only | Browsing behavior |
| Enhanced | Browser pixel plus the Conversions API | Name, location, email, phone and browsing behavior |
| Maximum | Browser pixel plus the Conversions API | Same as Enhanced, plus "Facebook's latest advertising technology" |
Source: Shopify Help Center. Shopify does not say what Maximum adds beyond that phrase. Ad blockers can stop the browser pixel, which is why Standard alone misses sales. Shopify's documentation names the purchase event as the one sent server to server.
Sharing customer details is optional, and you need to say in your privacy policy what you share.
Which events the pixel sends
The pixel tracks page views, product views, searches, add to carts, checkouts started, payment info added and purchases. The purchase fires when the buyer sees the thank-you page. Its value is the sum of the items in the checkout, including duties, taxes and discounts (Shopify Help Center). If you compare Meta's purchase value with your net sales, expect a gap for that reason alone.
Check that it works
- Open the Purchase event in Events Manager after a test order. Its connection method should list both Browser and Server.
- Look for duplicate warnings. Meta counts a browser purchase and a server purchase as one when both carry the same event ID and event name (Meta for Developers). Two pixels, or a second app also sending purchases, break that.
- Compare one day by hand: purchases in Events Manager against orders in Shopify. If Meta shows about twice as many, something is sending purchases twice.
Common problems
- Purchases counted twice: old theme code plus the app, or two apps that both send purchases. Keep one source per pixel.
- Too few purchases on Standard: ad blockers and browser privacy settings stop part of the browser pixel. Move to Enhanced or Maximum. See why iPhone sales go missing.
- Values that do not match: Shopify's purchase value includes taxes and duties, and currencies can differ between the store and the ad account.
A working pixel is not the same as true ROAS
The pixel tells Meta about the sale. Meta then decides which ad gets the credit, under its own rules: by default a click within 7 days or a view within 1 day.
| Stores | Platform's sales vs matched sales (median) | Platform reported more in | |
|---|---|---|---|
| Meta | 91 | 1.12x | 68% of stores |
| Google Ads | 65 | 0.81x | 23% of stores |
Stores with at least about $1,000 of spend on the channel in the 4 weeks; stores where one side saw under half of the other are left out as broken tracking. No store is named.
So set up the pixel so Meta's AI gets good signals, then check its numbers against your orders before you scale an ad. More on that in what true ROAS is and how it differs from Meta's.

