1. Events

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.

Note

Dispatch this event verbosely because the SDK cannot infer when this action is happening.

ArgumentTypeDescriptionValue
productsarray<ProductEventModel>Required.

List of products added.
n/a
pagestringRequired.

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.
contextContextRequired.

Describes the page and context within which this event is dispatched.
n/a

trackOrderConfirmEvent

Tracks details of the purchase made.

Note

Dispatch this event verbosely because the SDK cannot infer when this action is happening.

ArgumentTypeDescription
productsarray<ProductEventModel>Required.

List of products to confirm.
userUserEventModelRequired.
checkoutCheckoutEventModelRequired.
contextRequired.

Describes the page and context within which this event is fired.

trackStatusCartEvent

Tracks cart status.

Note

Dispatch this event verbosely because the SDK cannot infer when this action is happening.

ArgumentTypeDescription
productsarray<ProductEventModel>Required.

List of products in cart.
contextContextRequired.

Describes the page and context within which this event is fired.

trackPDPViewEvent

Sent when a user enters a product detail page.

Note

Dispatch this event verbosely because the SDK cannot infer when this action is happening.

ArgumentTypeDescription
skustringRequired.

The stock keeping unit (SKU) of the product.
fitmentobjectFitment of SKU, if defined.
contextContextRequired.

Describes the page and context within which this event is fired.

trackAddToWishlistEvent

Tracks add to wishlist events

Note

Dispatch this event verbosely because the SDK cannot infer when this action is happening.

ArgumentTypeDescriptionValue
productsarray<ProductEventModel>Required.

List of products added.
n/a
pagestringRequired.

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.
If you have suggestions for improving this article, let us know!