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

  1. In Meta Events Manager, open Datasets and pick the dataset for your store.
  2. Click the Settings tab.
  3. Copy the Dataset ID under Details.
Meta Events Manager on a dataset's Settings tab, with the Settings tab and the Dataset ID outlined in red. Business details and IDs are blurred.
The Dataset ID is on the dataset's Settings tab.

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.

  1. Select Set up with Dataset Quality API (recommended).
  2. Click Generate access token.
The Set up direct integration section with Set up with Dataset Quality API and the Generate access token button outlined in red.
Choose Set up with Dataset Quality API, then Generate access token.
  1. In the window that opens, pick your store’s dataset under Select dataset and click Generate access token.
The Select datasets window with the Select dataset dropdown and the Generate access token button outlined in red.
Select your dataset and generate the 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.

  1. Click the token to copy it.
The generated access token box outlined in red. The token is blurred.
Copy the token straight away: Meta shows it only once.

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

  1. In the app, go to Settings and click Meta Pixel under Pixels.
  2. Click Add Meta pixel.
The app's Meta Pixel settings with the Meta Pixel menu item and the Add Meta pixel button outlined in red.
Open Meta Pixel in Settings and click Add Meta pixel.
  1. Enter a Pixel name, for example “Main Pixel”. Only you see it.
  2. Click Create pixel.
The Add Meta pixel window with the Pixel name field and the Create pixel button outlined in red.
Name the pixel and create it.

4. Connect the dataset and Conversions API

On the pixel’s page:

  1. Paste the Dataset ID from step 1 into Dataset ID (Pixel ID).
  2. 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.
  3. Paste the token from step 2 into Access token.
  4. 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.
The pixel's settings with the Dataset ID field, the Conversions API switch, the Access token field, the Test event code field and the Send test event button outlined in red.
Paste the Dataset ID and token, turn on the Conversions API and send a test event.

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.

The COD form events and the Additional events warning outlined in red.
COD form events are on by default. Watch for double counting in Additional events.

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.
The Product ID options and the Product targeting options outlined in red.
Keep Variant ID unless your catalog uses another format.

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.
Esc