Funnel events
Sitecore Discover JS SDK for React offers the following funnel events that are dispatched when a user adds an item to their cart or wish list, completes an order, and so on.
trackAddToCartEvent
Tracks add to cart events.
Dispatch this event verbosely because the SDK cannot infer when this action is happening.
| Argument | Type | Description | Value |
|---|---|---|---|
products | array<ProductEventModel> | Required. List of products added. | n/a |
page | string | Required. Describe the page type. | PDP if event happened on product page. CATEGORY if event happened on category page. CART if event happened on cart page. QVIEW if added from a quick view modal. "home" if added on home page. |
context | Context | Required. Describes the page and context within which this event is dispatched. | n/a |
trackOrderConfirmEvent
Tracks details of the purchase made.
Dispatch this event verbosely because the SDK cannot infer when this action is happening.
| Argument | Type | Description |
|---|---|---|
| products | array<ProductEventModel> | Required. List of products to confirm. |
| user | UserEventModel | Required. |
checkout | CheckoutEventModel | Required. |
context | Required. Describes the page and context within which this event is fired. |
trackStatusCartEvent
Tracks cart status.
Dispatch this event verbosely because the SDK cannot infer when this action is happening.
| Argument | Type | Description |
|---|---|---|
products | array<ProductEventModel> | Required. List of products in cart. |
context | Context | Required. Describes the page and context within which this event is fired. |
trackPDPViewEvent
Sent when a user enters a product detail page.
Dispatch this event verbosely because the SDK cannot infer when this action is happening.
| Argument | Type | Description |
|---|---|---|
sku | string | Required. The stock keeping unit (SKU) of the product. |
fitment | object | Fitment of SKU, if defined. |
context | Context | Required. Describes the page and context within which this event is fired. |
trackAddToWishlistEvent
Tracks add to wishlist events
Dispatch this event verbosely because the SDK cannot infer when this action is happening.
| Argument | Type | Description | Value |
|---|---|---|---|
products | array<ProductEventModel> | Required. List of products added. | n/a |
page | string | Required. Describe the page type. | PDP if event happened on product page. CATEGORY if event happened on category page. CART if event happened on cart page. QVIEW if added from a quick view modal. "home" if added on home page. |