Log commerce events

This is for:


This article guides you on how to log events using Coveo Usage Analytics (Coveo UA) for Coveo for Commerce. It covers the various events to implement, as well as prerequisites and best practices.


  1. Access to a Coveo organization that you can manage from the Administration Console. If you have never used the Coveo Administration Console before, log in now.

  2. To use the Coveo analytics library, authentication credentials need to be passed in the form of an API key.

    The Coveo analytics library can send events to the Coveo UA service. See Initialize the Coveo Analytics JavaScript.

Capture events

Capturing commerce events allows you to trace a user’s journey through your commerce site by providing accurate data on the user’s interaction with various elements on your site. The typical events required are search and clicks. Commerce-specific events include Product detail view, cart, and purchase process.

Search events

One of the most common type of logged events is when an end user interacts with a search interface in a way that triggers a query to the Search API. Capturing search events reveals valuable insights into how users engage with search features.

Click events

Capturing a click event refers to the process of tracking and recording user interactions when they click specific elements, such as products or recommendations, within an ecommerce website or application.

Product detail view

Product detail views are logged whenever a user accesses a product detail page (PDP) to view more information about that product.

Cart modification and purchase events

The same principles apply when you capture cart events and capture purchase events.

Page views (deprecated)

The pageview is not needed and provides no value out of the box. It is available for legacy reasons. For more information, see collect.

Event validation

Data validation ensures the accuracy of data sent to Coveo, which is crucial for the effectiveness of Coveo Machine Learning (Coveo ML) algorithms. Additionally, accurate event data is vital for measuring visitor interactions, conversions, and revenue, as it forms the basis for reporting in Coveo experiences.

Measure and optimize the personalization experience

The collected data also feeds attribution dashboards, which you can review on the Data Health dashboard, and machine learning (ML) models which will ultimately help fine-tune the relevance of your site. The built-in dashboards in the Administration Console let you review your data health and fix validation errors.


Commands and actions, as well as global and product data fields, can be found on the Commerce UA API reference page.