Adobe Commerce storefront events
When you install Adobe Commerce, storefront events are deployed to your site. These events capture data from shoppers' interactions on your site. When you install and configure SaaS-based Adobe Commerce features such as Product Recommendations, Live Search, or Data Connection the modules deploy behavioral data collection to your storefront for specific events. This mechanism collects anonymized behavioral data from the events and help to power Product Recommendations and Live Search or in the case of Data Connection, send that behavioral data to the Adobe Experience Platform.
Publish, subscribe, and handle the storefront events
Adobe provides an eventing framework that you can use to programmatically access Adobe Commerce storefront events.
data-variant=info
data-slots=text
- Adobe Commerce Storefront Events SDK—Provides access to a common data layer and an event publishing/subscription service.
- Adobe Commerce Storefront Events Collector—Listens for and handles events sent from the SDK.
Available events based on module
The following section lists the events from which each module collects behavioral data.
data-variant=info
data-slots=text
Product Recommendations
The Product Recommendations module collects behavioral data from the following events:
Although Product Recommendation metrics are optimized for Luma storefronts, they also work with other storefront implementations:
Required dashboard events
The following events are required to populate the Product Recommendations dashboard.
data-variant=info
data-slots=text
page-view, recs-request-sent, recs-response-received, recs-unit-renderunitIdpage-view, recs-request-sent, recs-response-received, recs-unit-render, recs-unit-viewunitIdpage-view, recs-request-sent, recs-response-received, recs-item-click, recs-add-to-cart-clickunitIdpage-view, recs-request-sent, recs-response-received, recs-item-click, recs-add-to-cart-click, place-orderunitId, sku, parentSkupage-view, recs-request-sent, recs-response-received, recs-item-click, recs-add-to-cart-click, place-orderunitId, sku, parentSkupage-view, recs-request-sent, recs-response-received, recs-unit-render, recs-item-click, recs-add-to-cart-clickunitId, sku, parentSkupage-view, recs-request-sent, recs-response-received, recs-unit-render, recs-unit-view, recs-item-click, recs-add-to-cart-clickunitId, sku, parentSkuThe following events are not specific to Product Recommendations, but are required for Adobe Sensei to interpret shopper data correctly:
viewadd-to-cartplace-order
Recommendation Type
This table describes the events used by each recommendation type.
page-view, product-viewpage-view, place-orderpage-view, add-to-cartpage-view, product-viewpage-view, product-viewpage-view, product-viewpage-view, product-viewpage-view, product-viewpage-view, place-orderpage-view, product-viewpage-view, add-to-cartLive Search
The Live Search module collects behavioral data from the following events:
- searchProductClick
- searchRequestSent (also part of the Data Connection list.)
- searchResponseReceived (also part of the Data Connection list.)
- searchResultsView
- searchSuggestionClick
Events used for ranking strategy
The following table describes the events used by Live Search ranking strategies.
page-view, product-viewpage-view, place-orderpage-view, add-to-cartpage-view, product-viewdata-variant=info
data-slots=text
Required dashboard events
Some events are required to populate the Live Search dashboard.
data-variant=info
data-slots=text
page-view, search-request-sent, search-response-receivedsearchRequestIdpage-view, search-request-sent, search-response-receivedsearchRequestIdpage-view, search-request-sent, search-response-receivedsearchRequestIdpage-view, search-request-sent, search-response-receivedsearchRequestIdpage-view, search-request-sent, search-response-received, search-results-view, search-product-clicksearchRequestIdpage-view, search-request-sent, search-response-received, search-results-view, search-product-clicksearchRequestId, sku, parentSkupage-view, search-request-sent, search-response-received, search-results-view, search-product-click, product-view, add-to-cart, place-ordersearchRequestId, sku, parentSkudata-variant=info
data-slots=text
product-view event is required when a user adds a product from the Product Detail Page (PDP). However, it is not required for conversion rate if a user adds a product directly from the search results page and completes checkout without visiting the PDP.Required contexts
All events require the Page and Storefront contexts. This should happen at the page level/storefront application layer rather than when generating individual events. For example, in a PHP storefront, the PHP application container is responsible for setting them at runtime.
Usage
Here is a sample implementation of the search-request-sent event:
const mse = window.magentoStorefrontEvents;
/* set in application container */
// mse.context.page(pageCtx);
// mse.context.setStorefrontInstance(storefrontCtx);
/* set before firing event */
mse.context.setSearchInput(searchInputCtx);
mse.publish.searchRequestSent("search-bar");
Caveats
- Ad blockers and privacy settings can prevent events from being captured and might cause the engagement and revenue metrics to be under-reported. Additionally, some events might not be sent due to shoppers leaving the page or network issues.
- Headless implementations must implement eventing to power intelligent merchandising.
data-variant=info
data-slots=text
Data Connection
The Data Connection module collects behavioral data from the following categories of events:
General
- addToCart
- openCart
- removeFromCart
- shoppingCartView
- pageView
- productPageView
- startCheckout
- completeCheckout
Profile
Search
These events are also part of the Live Search collection of events.
B2B
Learn more about how Data Connection uses behavioral data.