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