Docs menu · Custom website
Getting Started
Integrations
Server-side GTM
COD Order Protection
Advanced Features
Downloads
Tools & Support
Docs / COD Order Protection / Your store
COD Order Protection
Custom websites: the purchase event
What your thank-you page needs to push so PixelFly can hold the order and send it later.
Push this on the thank-you page, once per order
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: 'purchase',
eventId: 'purchase_1042', // unique per order (Meta keeps one copy)
payment_method: 'cod', // or 'bkash', 'card', …
ecommerce: {
transaction_id: '1042', value: 1580, currency: 'BDT', shipping: 80,
items: [{ item_id: '189', item_name: 'Cat Toy', price: 750, quantity: 2 }]
},
user_data: { email: 'a@b.com', phone_number: '01712345678', first_name: 'Rina', last_name: 'Begum' }
});
What each part does
| Field | Needed? | Why |
|---|---|---|
payment_method | Required | Decides whether the order is held. See the rule below. |
value and currency | Required | Without them a confirmed order cannot be sent, and waits as missing purchase data. |
transaction_id | Strongly advised | How you confirm the order later. Without one it is held as NOID-… and can only be approved by hand. |
eventId | Strongly advised | Stops Meta counting the same purchase twice. |
user_data | Advised | Email and phone are how Meta matches a confirmed order back to the person who saw your ad. Fewer fields, weaker matching. |
items | Optional | Product-level reporting and catalogue matching. |
What counts as a COD order
PixelFly treats the order as cash on delivery when payment_method is:
- exactly
cod; - anything containing
cash_on_deliveryorcash on delivery; - or missing entirely — held on the safe side, because an unknown payment method is more often COD than not.
Anything else is prepaid and fires at checkout as usual. If your prepaid orders are being held, this field is the first place to look.
Next
Place one prepaid and one COD test order and confirm the held one appears with its value, products and customer.