Conversion (purchase) event tracking
You may want to track custom events or fire a script when a purchase happens, for example to track conversions. This script can help you do this when you're using the checkout embed or checkout pop-up.
Tracking conversion (purchase) events on your website
The following script should be added to your own website, on each page where you have added your checkout and the customer will make the purchase.
event.data.payload contains the following data:
checkoutId: the ID of your checkout
orderId: the ID of your customer's order
customerEmail: your customer's email address
value: the final purchase amount
currency: the currency of the purchase