Skip to content

Checkout Page

trackCheckout()

Call when the user reaches the checkout page.

javascript
(async function () {
  await new Promise(function (resolve) {
    if (window.AffiliateSDK) return resolve();
    var interval = setInterval(function () {
      if (window.AffiliateSDK) {
        clearInterval(interval);
        resolve();
      }
    }, 50);
  });

  await window.AffiliateSDK.trackCheckout({
    items: [
      {
        productId: "PROD-001",
        name: "Running Shoes",
        price: 44.99,
        quantity: 2,
      },
    ],
  });
})();

Released under the MIT License.