0% read
Meta Ads

Meta Pixel and Conversions API Setup for Shopify: A Simple Guide

Set up the Meta Pixel and Conversions API on Shopify so your Meta Ads know who really bought, without double-counting sales.

Quick answerThe Meta Pixel tracks events in the browser and the Conversions API (CAPI) sends the same events from your server. Use both together on Shopify, make sure each event shares an event ID so Meta does not count it twice, then confirm everything in Events Manager using Test Events.

What the Pixel and the Conversions API are

The Meta Pixel is a small piece of code that runs in your customer's browser and tells Meta about actions like viewing a product or buying. The Conversions API, or CAPI, sends the same information from your server to Meta directly. Browsers and privacy tools can block the Pixel, so the server route makes your data more complete.

Better data matters because Meta uses it to decide who to show your ads to. If it cannot see your sales, it cannot find more buyers.

Setting it up on Shopify

01
Install Meta's sales channel app (called Facebook and Instagram) from the Shopify App Store and log in with your business account.
02
Connect your Business Manager, Facebook Page, ad account and Pixel in the app.
03
Set data sharing to the highest level offered, which enables server-side events through Conversions API. Shopify's wording changes, so read the options in the app.
04
Make sure you do not have the Pixel installed a second time by hand in your theme code, which causes duplicate events.
Check for duplicates firstIf your store already has a Pixel pasted into the theme and you also install the app, purchases can be counted twice. Use the Meta Pixel Helper browser extension to see how many Pixels fire.

The events that matter for a store

EventWhen it fires
ViewContentSomeone views a product
AddToCartSomeone adds a product to the cart
InitiateCheckoutSomeone starts checkout
PurchaseSomeone completes an order, with value and currency

How deduplication works

Meta treats a Pixel event and a server event as the same action when their event name and event ID match, and it matches events received within about 48 hours of each other. The Shopify integration handles this for standard events. If you build a custom setup, you must send the same event ID from both sides. Our guide on fixing Meta Ads attribution goes deeper.

How to test it

01
Open Events Manager and choose your Pixel, then Test Events.
02
Visit your store in another tab and add a product to the cart.
03
Watch the events appear, and check the Purchase event after a test order.
04
Confirm each event shows once, with both browser and server as sources.

Once tracking is clean, you can build campaigns with confidence. Continue with how to set up Meta Ads for an online store. Tracking trouble? Our Meta Ads team in Surat audits it for free.

Not sure your tracking is right?

A broken Pixel quietly wastes budget. We check yours in the free audit.

Get your free audit

Frequently asked questions

Do I need both the Pixel and the Conversions API?
Using both is the recommended setup. Browser tracking can miss events because of privacy settings and ad blockers, and the server connection fills the gap.
What is event deduplication?
When the Pixel and CAPI both report the same purchase, Meta matches them using the same event name and event ID so the purchase is counted once.
How do I check that it works?
Use Test Events in Events Manager. Make a test purchase and confirm each event appears once and shows both browser and server sources.
What is Event Match Quality?
A score in Events Manager that shows how well Meta can match your events to people. Sending more customer information, such as hashed email and phone, generally helps.
NS

Nishant Sinha

Founder at Nivaro, a Surat-based performance marketing agency. Owns strategy, creative direction and the tracking/development work that makes performance decisions measurable. Read more about Nivaro.