Setting up the Meta pixel and Conversions API on Shopify
On Shopify, you set up the Meta pixel and Conversions API through Meta's Facebook & Instagram app. Set data sharing to Enhanced or Maximum: the pixel sends data from the browser, the Conversions API sends it from the server, and sales aren't lost to browser blocking. Don't add the pixel a second time through theme code or another app, because a duplicate install counts sales twice. After setup, compare Meta's purchase count with your store's orders.
Why use both the pixel and the Conversions API?
The Meta pixel runs in the visitor's browser and sends events such as page views, add to cart and purchases to Meta. Ad blockers, browser tracking restrictions and visitors who decline cookies mean some of those events never reach Meta.
The Conversions API sends the same events from your store's server straight to Meta, so browser blocking doesn't affect it. Using both, Meta sees more of your sales, optimizes toward people who actually buy, and reports results closer to reality.
Setup: the Facebook & Instagram app
- Install Meta's Facebook & Instagram app from the Shopify App Store and connect your Facebook account.
- During setup, choose your business account, ad account and the pixel (dataset) to use. Make sure it's the pixel your ads optimize for.
- Turn on customer data sharing and choose a data sharing level.
- Check in Meta Events Manager that the pixel is receiving events.
| Level | How it works | When to use it |
|---|---|---|
| Standard | Pixel only (from the browser) | Not recommended: blocked events are lost |
| Enhanced | Pixel + Conversions API; purchases are sent from the server | A good starting point for most stores |
| Maximum | The broadest level: Conversions API plus Meta's latest measurement features | Stores with significant ad spend |
The most common mistake: a duplicate install
If the pixel is added once through the Facebook & Instagram app and again through theme code or another app, every event is sent twice. Meta counts purchases twice, ROAS looks better than it is, and optimization runs on the wrong signal.
- Make sure no old, hand-pasted pixel code is left in your theme (theme.liquid).
- Check whether a second app is also sending Meta events.
- Clean up any old "additional scripts" added to the checkout.
Event match quality
Meta can only attribute a purchase to an ad when it can match the purchase to a person. The event match quality score in Events Manager shows how well that's working for each event.
- Turn on automatic advanced matching for the pixel.
- Keep first-party cookies on.
- Use Enhanced or Maximum; server-side events improve matching.
Post-setup checklist
- Are purchase events arriving in Events Manager in the last 24 hours?
- Do all your sales ad sets optimize for the same pixel? An old test pixel may still be in use.
- Is Meta's weekly purchase count close to your store's order count? Meta also counts view-through purchases, so slightly higher is normal. Close to double suggests a duplicate install; far lower suggests the Conversions API isn't working.
- Do ads that send traffic to your site carry UTM parameters? GA4 needs them to see Meta traffic correctly.
Know the next morning when your pixel breaks
Pixels usually break quietly, after a theme update or an app change. Adworkin checks your Meta account every morning: whether the pixel your sales ad sets optimize for has received events in the last 24 hours, whether ad sets point at different pixels, whether advanced matching and first-party cookies are on, and whether your ads carry UTMs. It also shows Meta's reported purchases next to your actual Shopify orders.
Frequently asked questions
Can't find your answer? Write to us and we'll reply within one business day.
How do I set up the Meta pixel on Shopify?
Install Meta's Facebook & Instagram app from the Shopify App Store, connect your Facebook account, choose your ad account and pixel, then turn on customer data sharing and pick Enhanced or Maximum. Don't add the pixel to your theme code as well.
Do I need a separate app for the Conversions API?
Not for most stores. With Enhanced or Maximum data sharing in the Facebook & Instagram app, the Conversions API runs through Shopify. If you install another app, make sure it doesn't send the same events a second time.
Why is Meta counting sales twice?
The most common cause is a duplicate install: the pixel was added through the app and again through theme code or another app. Remove the extra install and the numbers move closer to your store's orders.
Why does Meta report fewer sales than Shopify?
Ad blockers, browser restrictions and visitors who decline cookies stop some pixel events from reaching Meta. Turning on the Conversions API (Enhanced or Maximum) closes most of that gap.
Is data sent for visitors who decline cookies?
Shopify sends events according to your store's cookie consent settings and respects the permissions visitors give. Configure consent under Shopify's customer privacy settings to match the legal requirements in your region.
Compare what Meta counts with your real orders
Connect Shopify and Meta to know the next morning when your pixel breaks, and see Meta's reported sales next to your real orders. Free for 14 days.