@Viwuwei Great question! In most cases, the purchase event happens after the page load, so we typically don’t send order information through the target-global-mbox. Instead, we use the trackEvent method to send these details to Adobe Target once the order is confirmed.
Here’s a sample snippet you can use, which includes all the necessary attributes:
<script type="text/javascript">
adobe.target.trackEvent({
mbox: "orderConfirmPage", // You can rename this if needed
params: {
orderId: "ORDER ID FROM YOUR ORDER PAGE",
orderTotal: "ORDER TOTAL FROM YOUR ORDER PAGE",
productPurchasedId: "PRODUCT ID FROM YOUR ORDER PAGE, PRODUCT ID2, PRODUCT ID3"
}
});
</script>
Make sure this is implemented on your order confirmation page, and that the values are dynamically populated from your order data.
Hope this helps! Feel free to reach out with any other questions.
Best,
Narendra