Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Commerce Drop-Ins

Custom events reference

When you build a custom block to replace a drop-in, that block no longer automatically emits the Adobe Client Data Layer (ACDL) events the drop-in would have sent. To keep analytics, personalization, Live Search, Product Recommendations, and Adobe Experience Platform (AEP) forwarding working correctly, your custom implementation must push the equivalent events to window.adobeDataLayer at the same points in the user journey.

This page lists every ACDL event emitted by the default drop-in blocks, grouped by the script or block that emits it, along with the required data layer contexts each event depends on.

EventBlock / ScriptTriggerRequired Contexts
page-viewScriptsPage load, eager phasepageContext, shoppingCartContext (seed)
(delayed analytics init)ScriptsPage load, delayed phase (gated on analytics config + consent)storefrontInstanceContext, shopperContext, eventForwardingContext, aepContext
product-page-viewstorefront-pdpPage load, after product data is fetchedproductContext, channelContext
add-to-cartstorefront-cartUser adds a product to cart, after mutation succeedsshoppingCartContext, productContext, changedProductsContext, channelContext
remove-from-cartstorefront-cartUser removes or reduces quantity of a cart item, after mutation succeedsshoppingCartContext, productContext, changedProductsContext, channelContext
open-cartstorefront-cartUser’s first add-to-cart when the cart was previously emptyshoppingCartContext, changedProductsContext, channelContext
shopping-cart-viewstorefront-cartUser opens the cart or mini-cart panelshoppingCartContext, channelContext
initiate-checkoutstorefront-cartUser clicks “Proceed to Checkout”shoppingCartContext, channelContext
sign-instorefront-authUser submits the login form successfullyaccountContext, channelContext
sign-outstorefront-authUser clicks the logout buttonchannelContext
create-accountstorefront-authUser submits the account creation form successfullyaccountContext, channelContext
place-orderstorefront-orderUser completes order placement successfullyNone; reads existing ACDL state at emit time
recs-api-request-sentstorefront-recommendationsPage load, when the recommendations API request firesNone
recs-api-response-receivedstorefront-recommendationsPage load, when the recommendations API response returnsrecommendationsContext
recs-unit-impression-renderstorefront-recommendationsPage load, when a recommendation unit mounts into the DOMrecommendationsContext
recs-unit-viewstorefront-recommendationsWhen a recommendation unit scrolls into the viewportrecommendationsContext
recs-item-clickstorefront-recommendationsUser clicks a recommendation productrecommendationsContext
recs-item-add-to-cart-clickstorefront-recommendationsUser clicks Add to Cart on a recommendation productrecommendationsContext
search-request-sentstorefront-product-discoverySearch API call is made (on page load for PLP, or on user typing in search)searchInputContext, channelContext
search-response-receivedstorefront-product-discoverySearch API response returnssearchResultsContext, channelContext
search-results-viewstorefront-product-discoveryPage load, when search results finish renderingchannelContext
search-product-clickstorefront-product-discoveryUser clicks a search result productchannelContext
category-results-viewstorefront-product-discoveryPage load, when category results finish renderingchannelContext

These events and contexts are seeded by the storefront’s core scripts before any block-level instrumentation runs. Custom blocks depend on these contexts being present in the ACDL.

Block / Script: Scripts
Trigger: Page load, eager phase

Fires as soon as the page loads, seeding the data layer with the initial page and cart state that later events build on.

Required contexts:

  • pageContext
  • shoppingCartContext (seed)

Block / Script: Scripts
Trigger: Page load, delayed phase (gated on analytics config + consent)

No event is emitted at this step. Instead, the delayed phase pushes the contexts required for AEP event forwarding. This only runs when analytics configuration and user consent allow it.

Required contexts:

  • storefrontInstanceContext
  • shopperContext
  • eventForwardingContext
  • aepContext

Trigger: Page load, after product data is fetched

Required contexts:

  • productContext
  • channelContext

Trigger: User adds a product to cart, after the mutation succeeds

Required contexts:

  • shoppingCartContext
  • productContext
  • changedProductsContext
  • channelContext

Trigger: User removes or reduces the quantity of a cart item, after the mutation succeeds

Required contexts:

  • shoppingCartContext
  • productContext
  • changedProductsContext
  • channelContext

Trigger: User’s first add-to-cart when the cart was previously empty

Required contexts:

  • shoppingCartContext
  • changedProductsContext
  • channelContext

Trigger: User opens the cart or mini-cart panel

Required contexts:

  • shoppingCartContext
  • channelContext

Trigger: User clicks “Proceed to Checkout”

Required contexts:

  • shoppingCartContext
  • channelContext

Trigger: User submits the login form successfully

Required contexts:

  • accountContext
  • channelContext

Trigger: User clicks the logout button

Required contexts:

  • channelContext

Trigger: User submits the account creation form successfully

Required contexts:

  • accountContext
  • channelContext

Trigger: User completes order placement successfully

Required contexts: None. This event reads existing ACDL state at emit time instead of requiring new contexts to be pushed.


Trigger: Page load, when the recommendations API request fires

Required contexts: None

Trigger: Page load, when the recommendations API response returns

Required contexts:

  • recommendationsContext

Trigger: Page load, when a recommendation unit mounts into the DOM

Required contexts:

  • recommendationsContext

Trigger: When a recommendation unit scrolls into the viewport

Required contexts:

  • recommendationsContext

Trigger: User clicks a recommendation product

Required contexts:

  • recommendationsContext

Trigger: User clicks Add to Cart on a recommendation product

Required contexts:

  • recommendationsContext

Trigger: A search API call is made (on page load for PLP, or on user typing in search)

Required contexts:

  • searchInputContext
  • channelContext

Trigger: The search API response returns

Required contexts:

  • searchResultsContext
  • channelContext

Trigger: Page load, when search results finish rendering

Required contexts:

  • channelContext

Trigger: User clicks a search result product

Required contexts:

  • channelContext

Trigger: Page load, when category results finish rendering

Required contexts:

  • channelContext

  • channelContext is 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.