Online stores

Facebook Pixel and Conversions API for your store 2026: which ad brought the order with cash on delivery?

Connect the Facebook pixel and Conversions API to a store without double counting, report COD purchases at the right time and see which ad brought each order.

11 min read Updated 27 September 2026 ArabyBot team
The ArabyBot teamOfficial Meta partner · written from our own platform data
On this page 9
  1. What is the difference between the Facebook pixel and the Conversions API in a store?
  2. How does event_id stop a purchase being counted twice between the pixel and the Conversions API?
  3. Which Facebook pixel events does an online store need?
  4. When should the ad be told about a purchase with cash on delivery: at the order or at confirmation?
  5. How do you know which ad brought the order, with UTM links and the fbclid click ID?
  6. What about the TikTok pixel, Snapchat and GA4 alongside the Facebook pixel?
  7. How do you test pixel and Conversions API events before launching ads?
  8. How do the pixel connection and order source work on ArabyBot Store?
  9. Frequently asked questions

The short answer

With three layers together: the Meta pixel in the browser, the Conversions API from the server with one event ID so a purchase is never counted twice, and a source saved with every order from UTM parameters and the fbclid click ID. With cash on delivery, the ad is told about the purchase when the order is confirmed, not when the order button is pressed, so it learns from real buyers.

Also asked as: «ازاي اعرف الأوردر جه من انهي اعلان» · «وش الفرق بين البكسل وكونفرجن API» · «كيف بعرف الطلب من أي إعلان إجا» · «كيفاش نربط البيكسل ديال فيسبوك مع المتجر» · «شلون أربط بكسل فيسبوك بالمتجر»

What is the difference between the Facebook pixel and the Conversions API in a store?

The Facebook pixel (Meta Pixel) is code that runs in the visitor's browser and tells Meta what they do in your store. The Conversions API sends the same events straight from the store's server, so no ad blocker or browser restriction stops it. Running both is best: the pixel catches browsing detail, the server makes sure the purchase arrives.

What the pixel catches in the browser, what the server guarantees, and why you run both

When a visitor opens a product page, their browser loads the pixel code, which sends Meta an event such as "viewed a product" along with Meta's cookie and the click ID if the visitor came from an ad. This route is easy and precise about browsing, but it hangs on the browser itself: an ad blocker stops the code, some browsers shorten cookie lifetimes, iOS asks users for permission to be tracked inside apps, and someone who closes the page before it loads records nothing.

The Conversions API closes that gap: when the order is written to the store's database, the server sends the purchase event to Meta directly, with hashed matching data such as the phone number, so Meta can tie it to the account that saw the ad. The server does not need the visitor to stay on the page, which makes it the only way to report a purchase confirmed later.

Facebook pixel versus Conversions API
AspectPixel (browser)Conversions API (server)
Where it runsIn the visitor's browserOn the store's server
Affected by ad blockers and browser limitsYesNo
Browsing detail: views and cartCatches all of itOnly what the store sends
Can report a purchase confirmed hours laterNo — the visitor has leftYes
What it needsThe pixel IDThe pixel ID and an access token from Events Manager

So the question is not "which one?" but "how do I run both without the purchase being counted twice?" — which is the event ID's job.

How does event_id stop a purchase being counted twice between the pixel and the Conversions API?

When the browser and the server both send the same purchase, the two events carry the same name (Purchase) and the same ID (event_id), so Meta counts them as one purchase. Meta states that the merge happens when the second event arrives within 48 hours of the first event with that ID, inside the same pixel.

Think of event_id as the order number written on two copies of an invoice: whichever copy arrives first, the accountant knows they are one invoice. That is why the ID is usually built from the order number itself, not from a random number that differs between browser and server. Three conditions must hold together:

  • The name matches exactly: Purchase on both sides, not Purchase on one and a custom name on the other.
  • The ID matches and is sent by both: the pixel sends it as eventID, the server as event_id.
  • One pixel: an event sent to two different pixels is not merged; each pixel counts what reached it.

TikTok applies the same rule between its pixel and the Events API: the same event type and the same event_id, within 48 hours of the first event.

Which Facebook pixel events does an online store need?

Four standard events describe the path to purchase: ViewContent when a visitor views a product, AddToCart when they add it to the cart, InitiateCheckout when they start checkout, and Purchase when they buy. The ad learns from every stage, but Purchase is what sales campaigns and return calculations are built on.

Standard pixel events for a store
EventWhen it firesWhat the ad gets from it
ViewContentA product page opensAn audience of product viewers, and catalogue ads that show the same product again
AddToCartA product is added to the cartA stronger interest signal than a view, and an abandoned-cart audience
InitiateCheckoutThe checkout page opensWho came close to buying and did not finish
AddPaymentInfoA payment method is chosenOne more signal just before the purchase
PurchaseThe purchase, with value and currencyOptimising the campaign for sales, and computing return on spend

Each event carries data with its name: the product ID (content_ids), the value and the currency. Two conditions are often missed: the currency must be the store's real one, pounds or riyals rather than dollars, and the product ID in the event must match its ID in the product file (catalogue) you uploaded to Meta; if they differ, catalogue ads cannot tell which product the visitor saw.

When should the ad be told about a purchase with cash on delivery: at the order or at confirmation?

With cash on delivery, pressing "Order now" is not a sale yet: the order may be a duplicate, a fake, or refused at the door. If the ad is told about a purchase at the moment of the order, it learns to find people who order, not people who accept delivery. Reporting at confirmation teaches it from real buyers.

The customer's reply to the confirmation is when the purchase is reported, with both options compared

Each option has something it does well, so the choice depends on how your store is paid:

When to report the purchase with cash on delivery
OptionWhat it does wellWhat it costsSuits
Report at the orderAn instant signal, more events for the ad to learn from, and simpler setupCounts cancelled, refused and fake orders as purchases, so the campaign looks better than it isCard prepayment, or a store that rarely sees cancellations
Report at confirmationCounts only what the customer confirmed, so the ad learns from buyers and the Ads Manager figure comes closer to realityThe signal waits for confirmation, and fewer purchases are reportedCash on delivery and bank transfer

The delay does not lose the event: Meta accepts a server event whose time is up to seven days before it is sent, so an order confirmed an hour or a day later arrives in time. The confirmation itself comes from the customer's reply to a WhatsApp message, a call, or a button in the store panel — what matters is that it happens before shipping. Why confirmation is worth the effort in itself, not only for the ad, is in the guide to reducing COD returns.

Reporting at confirmation goes through the server

When the customer confirms hours later, their browser is not open on the thank-you page, so the pixel cannot send the purchase then. That is why this mode runs through the Conversions API (and the Events API on TikTok) and needs the access token. Choosing confirmation-time reporting without the server connection means no purchase event reaches the ad at all.

How do you know which ad brought the order, with UTM links and the fbclid click ID?

Ads Manager sees only what Meta credits to its own ads, with its own attribution windows. To know each order's source from inside your store, add UTM parameters naming the campaign and the ad to the ad's link, and keep with every order those parameters plus the fbclid click ID Meta adds to the link automatically.

UTM parameters for Meta ads
ParameterValue in a Meta adWhat it means
utm_sourcefacebookThe platform the visitor came from
utm_mediumpaidThe kind of visit: paid
utm_campaign{{campaign.name}}The campaign name, filled in by Ads Manager
utm_term{{adset.name}}The ad set name
utm_content{{ad.name}}The ad's own name
fbclidAdded automaticallyThe click ID from Facebook and Instagram
  1. Open the ad in Ads Manager

    At the ad level, in the tracking section, there is a URL parameters field. The parameters are set per ad, and several ads can be edited together.

  2. Paste the dynamic parameters

    utm_source=facebook&utm_medium=paid&utm_campaign={{campaign.name}}&utm_term={{adset.name}}&utm_content={{ad.name}}

    The double braces are replaced at delivery with the campaign, ad set and ad names, so you do not type names by hand in every ad.

  3. Name campaigns so you understand them in a month

    Product, offer and audience in one short name, so the source report reads without going back to Ads Manager.

  4. Review the source report weekly

    Compare each ad's confirmed orders with what you spent on it — not clicks, and not orders before confirmation.

First visit or last visit?

A customer may see your ad today and come back days later from a Google search to order. The last source says "Google"; the first source says "the ad". Both are right because they answer different questions: the first says who introduced the customer to you, the last says what brought them back to buy. That is why a good store keeps both with every order, not one of them.

If your ad opens a WhatsApp chat instead of the store, the order's source is the chat, measured another way that we explain in the click-to-WhatsApp ads tracking guide.

What about the TikTok pixel, Snapchat and GA4 alongside the Facebook pixel?

The logic is the same on every platform: an event from the browser, a copy from the server where available, and a shared ID that stops duplicates. TikTok matches Meta with a pixel and the Events API; Google measures with GA4 and the Google Ads conversion tag. Connect the platforms you actually spend on, not every one that exists; each extra pixel is weight on the page and one more place for errors.

  • TikTok: a pixel in the browser and the Events API from the server, merged by event type and event_id as above.
  • Snapchat: on ArabyBot Store it runs on the browser pixel only, so its events are more exposed to ad blockers than Meta's and TikTok's.
  • GA4: it builds you no ad audience, but it sees every source rather than one platform's. If you send it the purchase, send the order number as transaction_id so a reloaded thank-you page is not counted twice.
  • Google Tag Manager: useful for custom tags, but the commonest source of duplicates: add the pixel in the store's field and again inside GTM and every event goes twice.

How do you test pixel and Conversions API events before launching ads?

Open Meta's Events Manager, choose the pixel, then the Test Events tool, enter your store's link and browse as a shopper: open a product, add it to the cart, start checkout, then place a test order. You should see every event arrive with its value and currency, and the purchase appear once.

What you should see in the Test Events tool before launching ads
  1. Open the Test Events tool

    In Events Manager, choose the data source (the pixel), then the Test Events tab, and open your store from the browser the tool points to.

  2. Walk the path to purchase

    A product page, then the cart, then checkout. Check that ViewContent, AddToCart and InitiateCheckout arrived, with the right value and currency.

  3. Place a test order with your own number

    If your store sends order confirmation on WhatsApp, the message really goes to the number in the order; do not type an invented number, it may belong to a real person. Cancel the order after the test.

  4. Check the server and the merge

    Meta says server events show in Events Manager within about 20 minutes of being sent. Then open "Event details" for the purchase event from the Overview page, then the Event Deduplication tab, which shows the share of events merged, and check the Event Match Quality score, which Meta recommends keeping at 6 or higher.

  5. In confirmation-time mode

    Confirm the test order from the panel, then wait for the purchase to arrive from the server. Remember that events sent with a test code (test_event_code) are not dropped by Meta but flow into measurement and targeting, so remove the test code when the test is over.

Common mistakes that ruin pixel measurement

  • The pixel installed twice: in the store's field and in GTM, or leftovers of an old plugin. Every event arrives doubled, and the merge cannot save you because the two IDs differ.
  • A different event ID in browser and server: one purchase is counted as two, and the return shown in Ads Manager doubles.
  • Reporting refused orders as purchases: with cash on delivery the ad then learns from ordering, not from accepting delivery.
  • Skipping domain verification: verification with Meta proves the domain belongs to your business account and gives you control over your link previews. You verify a domain you own, so do it when you move your store to your own domain, and again if you move to a new one.
  • The wrong currency or value: a zero value, or dollars in a store that sells in pounds, and the computed return means nothing.
  • Ad links without UTM: orders then show in the source report as direct or unknown visits.
  • Switching pixels during a running campaign: it cuts off the event history the ad learns from.

How do the pixel connection and order source work on ArabyBot Store?

You paste the pixel ID and the Conversions API token into the tracking settings, and the store sends browsing events from the browser and sends the purchase from the server too, with the same event ID. You choose when the purchase is reported: at the order or at confirmation. Every order keeps its source: UTM parameters, the click ID, the referring site, the landing page and the first visit.

Platforms ArabyBot Store sends to
PlatformFrom the browserFrom the server
Meta (Facebook and Instagram)Meta PixelConversions API for the purchase, with the same event ID
TikTokTikTok PixelEvents API for the purchase
SnapchatSnap PixelNo — browser only
GoogleThe GA4 tag, Google Tag Manager and the Google Ads conversion label—
Microsoft ClarityFor visitor behaviour, not ads—
  • When the purchase is reported: one setting — at the order, or at confirmation. The confirmation itself is a WhatsApp message the customer answers before shipping, when a WhatsApp Business number is connected to the bot, or a button in the panel for stores without WhatsApp.
  • A pixel per product: a product can carry its own Meta pixel beside the store's.
  • Site verification: fields for the verification codes from Meta, Google and Bing.
  • Order source: with every order, plus reports by source and campaign.
  • «Your store's visitors»: visitors right now, each visit's pages, time and scroll depth, its source and ad, whether it opened in an in-app browser, where the shopper stopped at checkout, and a click map. It is switched on and off in the settings, records no video, and stores neither what the visitor types nor the IP address.
  • Product feeds: for Meta, TikTok, Snap and Google, for catalogue ads — how to use them is in the guide to selling on Facebook and Instagram from the store.

What it does not do: it sends nothing to Snapchat from the server, and it promises no particular ad return. The store makes sure the event arrives correct, once, at the time you chose; the ad's performance is set by the product, the offer and the audience. You create the Conversions API token in your own Meta account, so the data stays between your store and your ad account. The whole store is described on the ArabyBot Store page, and its tracking part under order source and the pixel.

Frequently asked questions

1

Is the Facebook pixel enough on its own, without the Conversions API?

It is enough to start, but it loses the events an ad blocker or a cookie-restricting browser stops, and it cannot report a purchase when a cash-on-delivery order is confirmed hours later, because the visitor has left the page. The server connection closes both gaps, and the shared event ID stops the purchase being counted twice.

2

Why does the purchase count in Ads Manager differ from my store's orders?

Because each counts something different: Ads Manager credits its ads with what happened inside the attribution window you chose, may estimate some conversions, and does not see orders that came from a Google search or a chat. Your store counts every real order with its recorded source. Decide spend on the confirmed orders in your store, and use Meta's number to compare your ads with each other.

3

What happens if an order is cancelled after the ad was told about the purchase?

A sent event is not withdrawn from Meta. That is why the report comes after confirmation, not before, and why the confirmation has to be real: a reply from the customer to a message or a call, not just the order reaching the panel.

4

Do I need a developer to connect the Conversions API to my store?

On a platform that has it built in, no: you create the access token from the pixel's settings in Events Manager and paste it with the pixel ID into the store's settings. On ArabyBot Store both fields are in the tracking settings. A hand-built site needs server code that builds and sends the event.

5

How is an order that came from a chat attributed?

An ad that opens a WhatsApp chat directly is measured inside the chat, not in the store: the chat carries the ad that started it, and an order recorded in it has that chat as its source. Details in the click-to-WhatsApp ads tracking guide.

The ArabyBot teamOfficial Meta business partner in the Middle East 239 guides Figures from our platform All guides

How we write these guides Figures come from our platform and Meta's actual invoices, dated with their sample; we describe what works today, not what we plan, and say what we do not do and when someone else is the better choice. Reviewed by the ArabyBot team on 27 September 2026.

Share this guide

Your store and the bot that sells from it — in one account

One account for the store and the bot, with a trial before you pay.