Skip to content

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

Commerce Drop-Ins

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.

Analytics events follow the same lifecycle regardless of which drop-in emits them:

  1. 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.
  2. Event-specific context - Immediately before an event fires, the emitting drop-in sets the context specific to that event - for example, productContext before product-page-view.
  3. Event emission - The drop-in pushes the event to the ACDL. The event’s eventInfo snapshot 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.

Jump to the events for a specific drop-in:


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.

Trigger: Page load, eager phase

Fires as soon as the page loads, seeding the data layer with initial page and cart context.

Contexts set:

  • pageContext
  • shoppingCartContext (seed)

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:

  • storefrontInstanceContext
  • shopperContext
  • eventForwardingContext
  • aepContext

Trigger: Page load, after product data is fetched

Contexts set:

  • productContext
  • channelContext

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

Contexts set:

  • shoppingCartContext
  • productContext
  • changedProductsContext
  • channelContext

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

Contexts set:

  • shoppingCartContext
  • productContext
  • changedProductsContext
  • channelContext

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

Contexts set:

  • shoppingCartContext
  • changedProductsContext
  • channelContext

Trigger: User opens the cart or mini-cart panel

Contexts set:

  • shoppingCartContext
  • channelContext

Trigger: User clicks “Proceed to Checkout”

Contexts set:

  • shoppingCartContext
  • channelContext

Trigger: User submits the login form successfully

Contexts set:

  • accountContext
  • channelContext

Trigger: User clicks the logout button

Contexts set:

  • channelContext

Trigger: User submits the account creation form successfully

Contexts set:

  • accountContext
  • channelContext

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.


Trigger: Page load, when the recommendations API request fires

Contexts set: None

Trigger: Page load, when the recommendations API response returns

Contexts set:

  • recommendationsContext

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

Contexts set:

  • recommendationsContext

Trigger: When a recommendation unit scrolls into the viewport

Contexts set:

  • recommendationsContext

Trigger: User clicks a recommendation product

Contexts set:

  • recommendationsContext

Trigger: User clicks Add to Cart on a recommendation product

Contexts set:

  • recommendationsContext

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

Contexts set:

  • searchInputContext
  • channelContext

Trigger: The search API response returns

Contexts set:

  • searchResultsContext
  • channelContext

Trigger: Page load, when search results finish rendering

Contexts set:

  • channelContext

Trigger: User clicks a search result product

Contexts set:

  • channelContext

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