Analytics events reference
When you substitute a drop-in with a custom block, that block no longer automatically emits the Adobe Client Data Layer (ACDL) events the drop-in would have sent. This reference describes how the analytics event lifecycle works and lists the events each drop-in emits, so your custom implementation can reproduce them.
How analytics events work
Section titled “How analytics events work”Analytics events follow the same lifecycle regardless of which drop-in emits them:
- Initial context - On page load, the storefront’s core scripts set store- and page-level context (
pageContext,storefrontInstanceContext,shopperContext, and so on). This context is required by every event that follows. See Scripts. - Event-specific context - Immediately before an event fires, the emitting drop-in sets the context specific to that event - for example,
productContextbeforeproduct-page-view. - Event emission - The drop-in pushes the event to the ACDL. The event’s
eventInfosnapshot merges the current initial context with the event-specific context.
If you substitute a drop-in, your custom implementation needs to set the same event-specific context and emit the same event at the same point in the user journey. You only need to reproduce the initial context from Scripts if you’re also bypassing the storefront’s core scripts.
Drop-ins
Section titled “Drop-ins”Jump to the events for a specific drop-in:
- Scripts - initial context, required by every event below
- storefront-pdp
- storefront-cart
- storefront-auth
- storefront-order
- storefront-recommendations
- storefront-product-discovery
Scripts
Section titled “Scripts”The storefront’s core scripts set the initial store- and page-level context before any drop-in-specific instrumentation runs. This context is required by every event listed below, in addition to each event’s own event-specific context.
page-view
Section titled “page-view”Trigger: Page load, eager phase
Fires as soon as the page loads, seeding the data layer with initial page and cart context.
Contexts set:
pageContextshoppingCartContext(seed)
Delayed phase initialization
Section titled “Delayed phase initialization”Trigger: Page load, delayed phase (gated on analytics config + consent)
No event is emitted at this step. Instead, the delayed phase sets the context required for AEP event forwarding. This only runs when analytics configuration and user consent allow it.
Contexts set:
storefrontInstanceContextshopperContexteventForwardingContextaepContext
storefront-pdp
Section titled “storefront-pdp”product-page-view
Section titled “product-page-view”Trigger: Page load, after product data is fetched
Contexts set:
productContextchannelContext
storefront-cart
Section titled “storefront-cart”add-to-cart
Section titled “add-to-cart”Trigger: User adds a product to cart, after the mutation succeeds
Contexts set:
shoppingCartContextproductContextchangedProductsContextchannelContext
remove-from-cart
Section titled “remove-from-cart”Trigger: User removes or reduces the quantity of a cart item, after the mutation succeeds
Contexts set:
shoppingCartContextproductContextchangedProductsContextchannelContext
open-cart
Section titled “open-cart”Trigger: User’s first add-to-cart when the cart was previously empty
Contexts set:
shoppingCartContextchangedProductsContextchannelContext
shopping-cart-view
Section titled “shopping-cart-view”Trigger: User opens the cart or mini-cart panel
Contexts set:
shoppingCartContextchannelContext
initiate-checkout
Section titled “initiate-checkout”Trigger: User clicks “Proceed to Checkout”
Contexts set:
shoppingCartContextchannelContext
storefront-auth
Section titled “storefront-auth”sign-in
Section titled “sign-in”Trigger: User submits the login form successfully
Contexts set:
accountContextchannelContext
sign-out
Section titled “sign-out”Trigger: User clicks the logout button
Contexts set:
channelContext
create-account
Section titled “create-account”Trigger: User submits the account creation form successfully
Contexts set:
accountContextchannelContext
storefront-order
Section titled “storefront-order”place-order
Section titled “place-order”Trigger: User completes order placement successfully
Contexts set: None. This event reads the existing ACDL state at emit time instead of requiring new context to be set.
storefront-recommendations
Section titled “storefront-recommendations”recs-api-request-sent
Section titled “recs-api-request-sent”Trigger: Page load, when the recommendations API request fires
Contexts set: None
recs-api-response-received
Section titled “recs-api-response-received”Trigger: Page load, when the recommendations API response returns
Contexts set:
recommendationsContext
recs-unit-impression-render
Section titled “recs-unit-impression-render”Trigger: Page load, when a recommendation unit mounts into the DOM
Contexts set:
recommendationsContext
recs-unit-view
Section titled “recs-unit-view”Trigger: When a recommendation unit scrolls into the viewport
Contexts set:
recommendationsContext
recs-item-click
Section titled “recs-item-click”Trigger: User clicks a recommendation product
Contexts set:
recommendationsContext
recs-item-add-to-cart-click
Section titled “recs-item-add-to-cart-click”Trigger: User clicks Add to Cart on a recommendation product
Contexts set:
recommendationsContext
storefront-product-discovery
Section titled “storefront-product-discovery”search-request-sent
Section titled “search-request-sent”Trigger: A search API call is made (on page load for PLP, or on user typing in search)
Contexts set:
searchInputContextchannelContext
search-response-received
Section titled “search-response-received”Trigger: The search API response returns
Contexts set:
searchResultsContextchannelContext
search-results-view
Section titled “search-results-view”Trigger: Page load, when search results finish rendering
Contexts set:
channelContext
search-product-click
Section titled “search-product-click”Trigger: User clicks a search result product
Contexts set:
channelContext
category-results-view
Section titled “category-results-view”Trigger: Page load, when category results finish rendering
Contexts set:
channelContext
- The contexts listed for each event are set in addition to the initial context from Scripts, which is required by every event.
channelContextis only required when instrumenting events for AEP collection.- These events are pushed to the ACDL (
window.adobeDataLayer), not the drop-in event bus (@dropins/tools/event-bus.js). See Events for the distinction between the two systems.