Skip to main content

Conversion script functions

smartfit.conversion.initialize

This function must be called before proceding with sending any purchase information.

await smartfit.conversion.initialize({
apiKey: string,
});

smartfit.conversion.sendPurchaseInformation

This function is used to send the purchase information of a bought ski to our conversion tracking system.

await smartfit.conversion.sendPurchaseInformation({
currency: string,
productCode: string,
price: number, // must be greater than 0
quantity: number, // must be an integer and greater than 0
purchasedSize: string,
productType: "SKI",
productTitle: string,
});
important

It is mandatory to use the same product code you used on the product page with our sizing widget. This ensures that we can accurately deduce which buyers used the sizing widget beforehand.