Skip to content
Analytics

Instrumentation

For Live Search and Product Recommendation APIs to work correctly, you must collect and send user interaction events to Commerce.

User interaction events power Adobe Sensei features, like intelligent merchandising for Live Search and to personalize product recommendations units. These events also populate performance dashboards for Live Search and Product Recommendations.

Adobe Client Data Layer (ACDL)

The Adobe Client Data Layer (ACDL) reduces the effort to instrument websites by providing a standardized method to expose and access any kind of data for any script. It consists of a JavaScript client-side event-driven data store that can be used on web pages to:

  • Collect data about what visitors experience on the web page
  • Communicate this data to digital analytics and reporting servers

The ACDL provides an API to:

  • Register data that is to be merged into the data layer state.
  • Trigger events that relate to the data stored in the data layer.
  • Get the current data layer state of all merged data.
  • Register listeners that are called for specific events or data changes.
  • List the history of registered data and triggered events.

Validate storefront events

To validate events, you can use this draft validator. Events written to ACDL must comply to a specific schema as defined by the Storefront Event SDK.

The boilerplate loads the Storefront Events Collector in the delayed phase to automatically send those events. For the collector to work, you must ensure that the configuration file is properly populated with all configuration parameters. The configuration parameters are a mix between those that are required for Catalog Service access and some specific to data services. The easiest way to retrieve them is using the magento/module-data-services-graphql module, which exposes additional GraphQL functionality.