Publish storefront events
Functions
The following functions publish events to notify all subscribers.
mse.publish.addToCart
Publishes the addToCart event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.addToCart(ctx);
mse.publish.customUrl
Publishes the customUrl event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.customUrl(ctx);
mse.publish.initiateCheckout
Publishes the initiateCheckout event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.initiateCheckout(ctx);
mse.publish.instantPurchase
Publishes the instantPurchase event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.instantPurchase(ctx);
mse.publish.pageActivitySummary
Publishes the pageActivitySummary event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.pageActivitySummary(ctx);
mse.publish.pageView
Publishes the pageView event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.pageView(ctx);
mse.publish.placeOrder
Publishes the placeOrder event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.placeOrder(ctx);
mse.publish.productPageView
Publishes the productPageView event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.productPageView(ctx);
mse.publish.recsItemAddToCartClick
Publishes the recsItemAddToCartClick event.
| Name | Required | Description |
|---|---|---|
unitId | Yes | Recommendations unitId |
productId | Yes | Recommended productId |
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.recsItemAddToCartClick(unitId, productId, ctx);
mse.publish.recsItemClick
Publishes the recsItemClick event.
| Name | Required | Description |
|---|---|---|
unitId | Yes | Recommendations unitId |
productId | Yes | Recommended productId |
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.recsItemClick(unitId, productId, ctx);
mse.publish.recsRequestSent
Publishes the recsRequestSent event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.recsRequestSent(ctx);
mse.publish.recsResponseReceived
Publishes the recsResponseReceived event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.recsResponseReceived(ctx);
mse.publish.recsUnitRender
Publishes the recsUnitRender event.
| Name | Required | Description |
|---|---|---|
unitId | Yes | Recommendations unitId |
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.recsUnitRender(unitId, ctx);
mse.publish.recsUnitView
Publishes the recsUnitView event.
| Name | Required | Description |
|---|---|---|
unitId | Yes | Recommendations unitId |
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.recsUnitView(unitId, ctx);
mse.publish.referrerUrl
Publishes the referrerUrl event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.referrerUrl(ctx);
mse.publish.removeFromCart
Publishes the removeFromCart event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.removeFromCart(ctx);
mse.publish.searchCategoryClick
Publishes the searchCategoryClick event.
| Name | Required | Description |
|---|---|---|
searchUnitId | Yes | Search unitId |
name | Yes | Category name |
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.searchCategoryClick(searchUnitId, name, ctx);
mse.publish.searchProductClick
Publishes the searchProductClick event.
| Name | Required | Description |
|---|---|---|
searchUnitId | Yes | Search unitId |
sku | Yes | Product sku |
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.searchProductClick(searchUnitId, sku, ctx);
mse.publish.searchRequestSent
Publishes the searchRequestSent event.
| Name | Required | Description |
|---|---|---|
searchUnitId | Yes | Search unitId |
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.searchRequestSent(searchUnitId, ctx);
mse.publish.searchResponseReceived
Publishes the searchResponseReceived event.
| Name | Required | |
|---|---|---|
searchUnitId | Yes | Search unitId |
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.searchResponseReceived(searchUnitId, ctx);
mse.publish.searchResultsView
Publishes the searchResultsView event.
| Name | Required | Description |
|---|---|---|
searchUnitId | Yes | Search unitId |
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.searchResultsView(searchUnitId, ctx);
mse.publish.searchSuggestionClick
Publishes the searchSuggestionClick event.
| Name | Required | Description |
|---|---|---|
searchUnitId | Yes Search unitId | |
suggestion | Yes | Query suggestion |
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.searchSuggestionClick(searchUnitId, suggestion, ctx);
mse.publish.shoppingCartView
Publishes the shoppingCartView event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.shoppingCartView(ctx);
mse.publish.signIn
Publishes the signIn event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.signIn(ctx);
mse.publish.signOut
Publishes the signOut event.
| Name | Required | Description |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.signOut(ctx);
mse.publish.updateCart
Publishes the updateCart event.
| Name | Required | |
|---|---|---|
context | No | Custom context |
Syntax:
Copied to your clipboardmse.publish.updateCart(ctx);
