Docs menu · Custom website

Docs / COD Order Protection / Your store

COD Order Protection

Custom websites: the purchase event

What your thank-you page pushes so PixelFly can hold and send the order.

Your store’s purchase event (custom websites)

The WooCommerce plugin pushes this for you. On a custom site, push it 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' }
});

A COD order is payment_method cod, anything containing cash_on_delivery / cash on delivery, or no payment method at all. No order ID? It’s still held (as NOID-…) and approved from the dashboard. Value and currency are needed to send it.

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