--- title: Event Protocol slug: o1n91230 canonical_url: https://docs.coveo.com/en/o1n91230/ collection: coveo-for-commerce source_format: adoc --- # Event Protocol > **Note** > > We strongly recommend that all new Commerce implementations use the [Event Protocol](https://docs.coveo.com/en/o9je0592/) to log events. > > For existing implementations using the Coveo UA Protocol, refer to the [Coveo UA Protocol documentation](https://docs.coveo.com/en/o1n91392/). This article guides you on how to log events using the Event Protocol for Coveo for Commerce. It covers the various events to implement, as well as prerequisites and best practices. Using Event Protocol facilitates clean data tracking, allowing the platform to enrich key commerce events such as `click`, `detail`, `add` and `remove` from cart, and `purchase` events with [metadata](https://docs.coveo.com/en/218/) from the [catalog entity](https://docs.coveo.com/en/3143/), including `ec_category`, `ec_brand`, and `ec_item_group_id`. ## Choosing your approach Since there are [several approaches for building product discovery interfaces](https://docs.coveo.com/en/o6q90192/), the approach you pick will determine how you log events. [%header, cols=2] |=== | Approach | How to log events | [Headless](https://docs.coveo.com/en/o52e9091/) | Dedicated Headless controllers | Atomic | Dedicated Atomic components | [Commerce API](https://docs.coveo.com/en/103/) | [Relay](https://docs.coveo.com/en/o1n90002/) or [Relay in Google Tag Manager](https://docs.coveo.com/en/relay/latest/usage/gtm/)[.footnote]^1^ |=== -- 1. Although we recommend using one of the provided client-side libraries, if you're unable to use them, you can log events directly by calling the [Event API](https://docs.coveo.com/en/n9da0377/). -- ## Prerequisites . Access to a [Coveo organization](https://docs.coveo.com/en/185/) that you can manage from the [Administration Console](https://docs.coveo.com/en/1841/). If you have never used the [Coveo Administration Console](https://docs.coveo.com/en/183/) before, [log in now](https://docs.coveo.com/en/1697/). > **Notes** > > * Contact [Coveo Sales](https://www.coveo.com/en/contact) to enable Coveo for Commerce features in your organization. > > * You can review your organization [license limits](https://docs.coveo.com/en/1562/) in the Administration Console. > > * Ensure that you set the [required privileges](https://docs.coveo.com/en/3151/) for your commerce organization. . To send events to Coveo, you must configure [authentication credentials](https://docs.coveo.com/en/o8ld0051/). . Ensure that [storefront associations](https://docs.coveo.com/en/o48e0216/) are correctly configured in your organization. Proper storefront associations is critical for collected UA events to be enriched with your Coveo catalog's metadata. ## 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. Commerce-specific events include events such as product detail view, cart, and purchase. ### Click events It's important to record interactions when a user clicks specific elements, such as products or recommendations, within an ecommerce website or application. For more information on how to log clicks, see [Capture click events](https://docs.coveo.com/en/o1n92447/). ### Product detail events Product detail view events are logged whenever a user accesses a [product detail page](https://docs.coveo.com/en/n8ad7392/) to view more information about that product. To learn more about how to send these events, see [Capture product view events](https://docs.coveo.com/en/o1n93101/). ### Cart events When a user modifies the content of their cart, a cart event needs to be sent. For more information on how to log cart events, see [Capture cart events](https://docs.coveo.com/en/o1n93466/). ### Purchase events After adding an item to their cart, a user can proceed to purchase the items in their cart. The purchase event is sent when the user completes the purchase. To learn more about how these events, see [Capture purchase events](https://docs.coveo.com/en/o1n93059/). ## Data validation [Data validation](https://docs.coveo.com/en/o2170365/) ensures the accuracy of data sent to Coveo, which is crucial for the effectiveness of [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) algorithms. Additionally, accurate event data is vital for measuring [visitor](https://docs.coveo.com/en/nbub9475/) interactions, conversions, and revenue, as it forms the basis for [reporting](https://docs.coveo.com/en/266/) in Coveo experiences.