Skip to content

Order confirmation snippet

Load the Global script on your order confirmation page. Call Neocom.trackPurchase() once per completed order, using the actual order ID, total, currency and line items. Keep the readiness check if your checkout runs the snippet before the Global script is ready.

Order confirmation page
<script>
(function () {
function reportPurchase() {
window.Neocom.trackPurchase({
// The unique ID of this order in your e-commerce platform
order_id: "your order id",
// Total order value, in the currency below
value: 1140.0,
// ISO 4217 currency code
currency: "EUR",
// Optional: hostname used in the product URLs of your data feed
// hostname: "www.yourshop.com",
// One entry per purchased line item
contents: [
{ id: "sku-1", quantity: 2, price: 500.0 },
{ id: "sku-2", quantity: 1, price: 140.0 }
]
});
}
if (window.Neocom) reportPurchase();
else window.addEventListener("neocomloaded", reportPurchase, { once: true });
})();
</script>

All values must be filled dynamically from the actual order.

See the trackPurchase payload reference for fields and types. Use the purchased variant’s catalog SKU as a string, including any leading zeros. If checkout runs on a separate hostname, check the hostname for the agent or quiz before overriding it.

Use a recognizable test order and trace it through to the Admin Portal.