Adobe Commerce only. Learn more.

Publish - Events SDK Reference

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:

1
mse.publish.addToCart(ctx);

mse.publish.customUrl

Publishes the customUrl event.

Name Required Description
context No Custom context

Syntax:

1
mse.publish.customUrl(ctx);

mse.publish.initiateCheckout

Publishes the initiateCheckout event.

Name Required Description
context No Custom context

Syntax:

1
mse.publish.initiateCheckout(ctx);

mse.publish.instantPurchase

Publishes the instantPurchase event.

Name Required Description
context No Custom context

Syntax:

1
mse.publish.instantPurchase(ctx);

mse.publish.pageActivitySummary

Publishes the pageActivitySummary event.

Name Required Description
context No Custom context

Syntax:

1
mse.publish.pageActivitySummary(ctx);

mse.publish.pageView

Publishes the pageView event.

Name Required Description
context No Custom context

Syntax:

1
mse.publish.pageView(ctx);

mse.publish.placeOrder

Publishes the placeOrder event.

Name Required Description
context No Custom context

Syntax:

1
mse.publish.placeOrder(ctx);

mse.publish.productPageView

Publishes the productPageView event.

Name Required Description
context No Custom context

Syntax:

1
mse.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:

1
mse.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:

1
mse.publish.recsItemClick(unitId, productId, ctx);

mse.publish.recsRequestSent

Publishes the recsRequestSent event.

Name Required Description
context No Custom context

Syntax:

1
mse.publish.recsRequestSent(ctx);

mse.publish.recsResponseReceived

Publishes the recsResponseReceived event.

Name Required Description
context No Custom context

Syntax:

1
mse.publish.recsResponseReceived(ctx);

mse.publish.recsUnitRender

Publishes the recsUnitRender event.

Name Required Description
unitId Yes Recommendations unitId
context No Custom context

Syntax:

1
mse.publish.recsUnitRender(unitId, ctx);

mse.publish.recsUnitView

Publishes the recsUnitView event.

Name Required Description
unitId Yes Recommendations unitId
context No Custom context

Syntax:

1
mse.publish.recsUnitView(unitId, ctx);

mse.publish.referrerUrl

Publishes the referrerUrl event.

Name Required Description
context No Custom context

Syntax:

1
mse.publish.referrerUrl(ctx);

mse.publish.removeFromCart

Publishes the removeFromCart event.

Name Required Description
context No Custom context

Syntax:

1
mse.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:

1
mse.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:

1
mse.publish.searchProductClick(searchUnitId, sku, ctx);

mse.publish.searchRequestSent

Publishes the searchRequestSent event.

Name Required Description
searchUnitId Yes Search unitId
context No Custom context

Syntax:

1
mse.publish.searchRequestSent(searchUnitId, ctx);

mse.publish.searchResponseReceived

Publishes the searchResponseReceived event.

  Name Required Description
searchUnitId Yes Search unitId  
context No Custom context  

Syntax:

1
mse.publish.searchResponseReceived(searchUnitId, ctx);

mse.publish.searchResultsView

Publishes the searchResultsView event.

Name Required Description
searchUnitId Yes Search unitId
context No Custom context

Syntax:

1
mse.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:

1
mse.publish.searchSuggestionClick(searchUnitId, suggestion, ctx);

mse.publish.shoppingCartView

Publishes the shoppingCartView event.

Name Required Description
context No Custom context

Syntax:

1
mse.publish.shoppingCartView(ctx);

mse.publish.signIn

Publishes the signIn event.

Name Required Description
context No Custom context

Syntax:

1
mse.publish.signIn(ctx);

mse.publish.signOut

Publishes the signOut event.

Name Required Description
context No Custom context

Syntax:

1
mse.publish.signOut(ctx);

mse.publish.updateCart

Publishes the updateCart event.

  Name Required Description
context No Custom context  

Syntax:

1
mse.publish.updateCart(ctx);