Shopify to Meta Pixel.
Connect your Meta Pixel to Shopify so Meta sees every sale. Each paid order goes to the pixel you pick, with the ad click attached.
What gets sent.
| DATALYR event | When it fires | Sent to Meta as | What it carries |
|---|---|---|---|
| purchase | Shopify marks an order paid | Purchase | Order total, currency, order ID, the ad click, and hashed email and phone when known |
| checkout_started | A checkout is created. Optional rule | InitiateCheckout | The checkout, with a value of 0 |
| order_refunded | A refund is created in Shopify | Not sent | The rule editor blocks a refund trigger aimed at a purchase event, so a refund never counts as a new conversion |
How it's matched.
DATALYR checks these in order and stops at the first one that finds the ad click.
- The visitor ID the App Embed writes onto the order as a cart attribute
- The order email, when the cart attribute found no ad click
- Click IDs and UTM parameters read from the order's landing page URL
Meta gets the click ID (fbc, built from the _fbc cookie or fbclid) and browser ID (fbp), plus email, phone and name hashed with SHA-256 when known.
How it works.
- 01
Connect Shopify.
Open Sources, select connect on Shopify, enter your myshopify.com domain and approve the five permissions. Then turn on the App Embed in your theme editor and save, so each order carries the visit that drove it.
- 02
Connect Meta.
Open Sources, select connect on Meta Ads and sign in with Facebook Login for Business. Set the primary ad account. In Conversions, select manage rules, then new rule: trigger event purchase, target platform Meta, your pixel, platform event Purchase. Set value to dynamic and pick the currency.
- 03
Check one conversion.
Place one order from a Meta ad click. Find purchase in Events, then open the newest row in Conversions and read the reply from Meta.
Check it worked.
- Copy the Pixel ID from Meta Events Manager, Data sources (the 15 to 16 digit ID under the dataset name). It must be the pixel you pick in the rule, or the event lands under a different pixel.
- Set a Test Events code on the rule, then select send test event. The event shows in Events Manager under Test events with the name, value and currency you mapped. Without a code, a test is a real conversion.
- Open the newest row in Conversions. Its status reads sent, and the response body carries Meta's own acceptance field.
View docsInstall on ShopifyShopify revenueMeta AdsConversion delivery
Questions, answered.
Contact usWith the DATALYR App Embed on, open Settings, Pixels & scripts, add a Meta Pixel row and paste your Pixel ID. It loads through the DATALYR script, with no theme edit. Skip it if your theme or Shopify's Meta channel already loads the pixel: two base tags count every conversion twice.
In Meta Events Manager, Data sources. It is the 15 to 16 digit ID under the dataset name. In DATALYR you pick the pixel from a list when you create the rule.
Not for purchases. If Shopify's own Meta sales channel also sends a browser purchase beside the DATALYR conversion, Meta reports about twice your real purchases. Send purchases from one of the two, not both.
No. DATALYR sends events to your existing pixel. For browser events it uses the same event ID the pixel uses, so Meta merges the pair into one conversion. Purchases from Shopify arrive by webhook, so send them from DATALYR or from Shopify's channel, not both.

See what really drives revenue.
Real-time attribution, analytics and conversions for every channel, campaign and ad, ready for your team and your agents.