Use the Relay library

This is for:

Developer
Important

The Event Protocol and Coveo Relay are currently in open beta. If you’re interested in using the Event Protocol and Relay library, reach out to your Customer Success Manager (CSM).

What’s Coveo Relay?

Coveo Relay is a compact client library designed for transmitting analytics events to Coveo’s Event service. It plays a pivotal role in Coveo Usage Analytics (Coveo UA), enabling the tracking of user interactions with your search interfaces. This tracking is crucial for powering reports and training Coveo Machine Learning (Coveo ML) models.

Under the hood, Relay sends events to Coveo’s Event API. To perform event validation, refer to the Coveo Explorer extension. Relay integrates with this extension for seamless event validation.

When should I use Relay?

Using Relay for sending events to the Event API is highly recommended over direct interactions with the API, as the library handles many complexities of event transmission.

The initialization options offered by Relay let you authenticate requests and direct them to the correct endpoint. Once set up, Relay actively manages various aspects of generic event logging, including enriching events with browser-specific details like user agent and local time. It also maintains a unique client identifier for each browser and device combination.

Relay allows you to focus on core implementation aspects, ensuring events are triggered by the right user interactions and carry the correct payload. Compared to the older coveoua library, Relay is more lightweight and offers integration with Explorer, providing real-time event validation and enhancing the overall Event Protocol experience.

Where do I start?

To learn the basics of how to use Relay, see the Usage section.

You may also want to explore the Reference section for a detailed description of functions and interfaces offered by the library.