Meta pixel
COD form orders skip Shopify checkout, so Meta doesn’t see them by default. Connect your Meta pixel and the app sends page views, product views, carts and every COD order to Meta Events Manager, from the browser and from our server through the Conversions API.
You need two things from Meta: your Dataset ID (Pixel ID) and, for the Conversions API, an access token. Keep two browser tabs open: Meta Events Manager and Settings → Meta Pixel in the app.
1. Find your Dataset ID in Meta
- In Meta Events Manager, open Datasets and pick the dataset for your store.
- Click the Settings tab.
- Copy the Dataset ID under Details.
2. Generate an access token in Meta
The access token lets the app send events through the Conversions API. Still on the dataset’s Settings tab, scroll to Set up direct integration.
- Select Set up with Dataset Quality API (recommended).
- Click Generate access token.
- In the window that opens, pick your store’s dataset under Select dataset and click Generate access token.
Meta warns that once a dataset is set up with the Dataset Quality API, you can’t opt out again. This doesn’t affect how the app works.
- Click the token to copy it.
Copy and save the token now. Meta doesn’t store it, so if you lose it you’ll need to generate a new one. Keep it private: anyone with it can send events to your dataset.
3. Add the pixel in the app
- In the app, go to Settings and click Meta Pixel under Pixels.
- Click Add Meta pixel.
- Enter a Pixel name, for example “Main Pixel”. Only you see it.
- Click Create pixel.
4. Connect the dataset and Conversions API
On the pixel’s page:
- Paste the Dataset ID from step 1 into Dataset ID (Pixel ID).
- Switch on Conversions API. It sends every COD order from our server too, so ad blockers and iOS can’t hide it. Meta counts each order once.
- Paste the token from step 2 into Access token.
- To check the connection, copy the Test event code from Meta Events Manager’s Test events tab, paste it here and click Send test event. The test event appears in Meta within a few seconds. The code is only used by this button, never for real orders.
5. Choose which events to send
COD form events are sent as a shopper moves through your COD form:
| Event | Sent when |
|---|---|
| Form opened | A shopper opens the COD form. Send as picks the Meta event name, for example InitiateCheckout + AddToCart. |
| AddPaymentInfo | A shopper picks a delivery option in the form |
| Purchase | A COD order is placed, with Shopify’s order total |
Additional events are sent on every page once the app embed is on in your theme: PageView, ViewContent (product page), ViewCategory (collection page), Search and AddToCart (your theme’s Add to cart button). Meta automatic events is off by default; it’s mostly noise for a COD store.
Avoid double counting. If the Facebook & Instagram app or another pixel app already sends these events to the same dataset, turn the Additional events off here, or each view is counted twice.
6. Match your catalog and pick products
Product ID must match the IDs in your Meta catalog, or dynamic ads can’t find the product:
- Variant ID (recommended): the variant the customer picked. Shopify’s Facebook & Instagram catalog uses this.
- Product ID: the Shopify product ID.
- Custom format: build your own ID from a template with variables.
Product targeting chooses which products send product events (views, add to cart, the COD form and purchases):
- All products: no filtering.
- Specific products: only the products you pick, useful when one pixel serves one product line.
7. Check it works
Place a test order through the COD form, then open your dataset in Meta Events Manager. The Purchase event appears within about 30 minutes. The sidebar in the app shows Meta Pixel: On once the pixel is connected.
Troubleshooting
| Problem | Fix |
|---|---|
| No events in Meta | Check the Dataset ID matches the dataset you’re looking at, and the app embed is on in your theme. |
| Send test event fails | Copy a new access token from Meta. Tokens are shown once, so a typo means generating another. |
| Page views counted twice | Another app sends them too. Turn off Additional events in the app. |
| Dynamic ads show the wrong product | Set Product ID to the format your Meta catalog uses, usually Variant ID. |