Docs menu · Overview

Docs / COD Order Protection

Overview

COD Order Protection

Hold cash-on-delivery purchases at checkout, confirm the real orders, then send them to Meta, GA4, Google Ads and TikTok with the original order time.

Why this exists

In COD markets, a large share of orders are cancelled, refused at the door or simply fake. If you count a purchase at checkout, Meta and Google learn to find more people who place orders — including the ones who never pay. COD Order Protection counts the order only once it is real, so your ad platforms optimise for revenue you actually collect.

How it works

  1. A customer places a cash-on-delivery order. Your GTM holds the purchase: nothing reaches Meta, GA4, Google Ads or TikTok at checkout. Prepaid orders (bKash, card, …) go out as usual.
  2. PixelFly keeps the order in COD Held Orders: value, products, customer, cookies, click IDs and the GA client/session.
  3. You confirm or reject it in the dashboard, or your store does it automatically through the webhook.
  4. Confirmed: PixelFly sends the purchase, with the original order time, to your ad platforms. Rejected: nothing is sent.

Setting it up takes three steps

Work through them in order. Nothing is held until both the API key and host are filled in, so a half-finished setup never loses orders.

1

Turn it on in PixelFly

Below on this page. Takes a minute, and gives you the keys the next step needs.

2

Set up GTM, then your store

Pick your setup from the four options below, then tell your store to mark COD orders.

3

Confirm orders, and test

Approve in the dashboard or automatically, then check both order types before going live.

Step 1: turn it on in PixelFly

Do this before switching COD on in GTM. Every setup starts here.

  1. Open PixelFly → your container → Power-ups → COD Order Protection and switch it on.
  2. Choose a fire path — where confirmed orders are sent:
    • sGTM /data — recommended if you have an sGTM server. Confirmed orders run your existing server tags, Google Ads included.
    • Receivers — required for proxy containers. Add one Receiver per platform you want reached (Meta, GA4, TikTok, Google Ads).
  3. Copy these four values somewhere — the next step asks for them:
    ValueLooks likeWhere it's used
    API Keypf_live_…GTM, to hold orders
    Hold URLhttps://…/cod/holdGTM, as the host
    Webhook URLhttps://…/cod/webhookAuto-confirming (optional)
    Webhook Secretpfwh_…Auto-confirming (optional)

    The API Key is on your container page, the other three on the Power-up. These are two different secrets: the pf_live_ key holds orders, the pfwh_ secret only confirms them. Swapping them is the most common setup error.

Step 2: set up GTM

Pick the one that matches your setup. If you are not sure, you have an sGTM server if you pay for sGTM hosting or set up a server container — otherwise choose a proxy container.

Then tell your store to mark COD orders: WooCommerce plugin or custom website.

Step 3: confirm orders, and test

Decide how held orders get approved — by hand in the dashboard, or automatically from your store, CRM or courier — then place one prepaid and one COD test order before you publish.

Confirming and rejecting orders · Testing and troubleshooting

Where a confirmed purchase goes

PlatformsGTM (fire path sGTM /data)Proxy (Receivers)
MetaFacebook CAPI tagMeta Receiver
GA4GA4 server tagGA4 Receiver, with GA4 purchase via = pixelfly
TikTokTikTok Events API tagTikTok Receiver
Google AdsGoogle Ads Conversion (COD confirmed) tagGA4 → Google Ads import, or a Google Ads (click conversions) Receiver. One, not both

The order keeps its GA client and session IDs, so GA4 and a GA4 → Google Ads import credit the ad that brought the shopper. Google Ads needs the click ID (gclid) saved at checkout.

Worth knowing before you start

  • Prepaid orders are untouched. Only COD is held; everything else fires at checkout exactly as it does today.
  • Confirm within 7 days where you can. Meta then records the original order time (GA4: 72 hours). Later confirmations still go out, dated when you confirm.
  • Use one COD system only. If the GTM hold is on, the WooCommerce plugin's own legacy delay must be off, or orders are held twice.
  • There is a monthly limit on sending, not on holding — 50 on Free up to 10,000 on Enterprise. Over it, confirmed orders wait instead of being sent. Details.
  • Nothing breaks half-built. While the host or API key is still a placeholder, purchases go out as they always did.

We use cookies to enhance your experience, analyze site traffic, and for marketing purposes. By continuing to use our site, you consent to our use of cookies. Learn more