Events

Measure the path from scent discovery to purchase.

The SDK records core lifecycle events automatically. Add purchase tracking on your order confirmation page to connect recommendations to revenue.

widget_opened

Widget mounts on the storefront.

quiz_started

Shopper starts the quiz.

quiz_completed

Shopper submits quiz answers.

result_viewed

Recommendations are shown.

product_clicked

Shopper clicks a recommended product.

email_captured

Shopper saves an email for follow-up.

purchase_completed

Order confirmation attribution from trackPurchase.

Purchase attribution

Call SillageWidget.trackPurchase() on the order confirmation page. The SDK uses the stored widget session when available, or you can pass sessionId directly from your storefront.

Order confirmation tracking

html

<script src="https://mysillage.co/widget/v1/sillage-widget.js" async></script>
<script>
  window.addEventListener('load', function () {
    SillageWidget.trackPurchase({
      apiKey: 'sw_live_your_key',
      productId: 'oud-velvet-50ml',
      orderId: 'ORDER-1042',
      value: 420,
      currency: 'SAR'
    });
  });
</script>