Open Nayuken opened 1 month ago
CRP flow: Fire this on the order confirmation page when the user returns from the payment platform. Fire this after the page load completed event on the page.
window.dataLayer = window.dataLayer || []; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ "event": "purchase", "detailed_event": "Order Placed", "ecommerce": { "coupon": "<coupon>", "currency": "<currency>", "items": [ { "item_name": "<item_name>", "item_id": "<item_id>", "item_brand": "<item_brand>", "item_category": "<item_category>", "price": <price>, "discount": <discount>, "quantity": <quantity>, "course_name": "<course_name>", "program_dates": "<program_dates>", } ], "payment_method": "<payment_method>", "tax": <tax>, "transaction_id": "<transaction_id>", "value": <value> } });
Order Placed
CRP flow: Fire this on the order confirmation page when the user returns from the payment platform. Fire this after the page load completed event on the page.
Javascript Code
Variable Definitions
Further's Event Validation