Migrate to Event Protocol
Migrate to Event Protocol
This is for:
Developer
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). |
Event Protocol is a new standard for sending analytics events to Coveo.
It simplifies event tracking by reducing the number of events you need to send to Coveo.
For instance, you no longer need to send any search
events as they’re logged server-side when you make a request to the Search API.
The protocol also streamlines the event payload, requiring fewer fields. Such streamlining results in a more efficient and less error-prone event tracking process, yielding better machine learning models and usage analytics reports.
We strongly recommend using the EP in new Commerce implementations and for existing Commerce Coveo UA implementations with poor Data Health (platform-ca | platform-eu | platform-au). Other Commerce implementations should consider migration on a case by case basis. We recommend against migration to EP for non-Commerce implementations, since they aren’t supported yet.
Depending on your current implementation, the migration process can vary:
-
If you use the Coveo Headless or Coveo Atomic libraries, they support EP by default since the V3 release. See Headless migration to EP and Atomic migration to EP.
NoteThe Coveo JavaScript Search Framework doesn’t support EP. We recommend migrating to Atomic or Headless.
-
If you use the Search API directly, capture search events server-side, or, in a Commerce context, use the Commerce API.
-
If you use the Usage Analytics Write API directly, migrate to the Event API (see EP reference).
-
If you use the Coveo UA library to log events, use the Relay library.
But before migrating to the Event Protocol, it’s important to understand why certain Coveo UA functionalities are no longer supported by the new Event Protocol. This article goes over those differences and how they affect your migration.
Custom events, custom data, and custom context
EP doesn’t support custom events or customData
within events (for example, Search event customData
).
EP limits support for custom context.
Rather than supporting these, EP consolidates the common use cases into more streamlined and efficient event schemas. This yields cleaner data, which in turn yield more powerful ML models and usage analytics reports.
Custom events
Under the Coveo UA protocol, custom events tracked user interactions that weren’t tracked by search and click events. The common use cases are covered by the EP event schemas, which are more streamlined and efficient than custom events. For example, requesting more facet values used to be tracked via custom events, but is now tracked via search events.
Some implementers also relied on custom events to track their own custom interactions, which they might have used in reports. Such custom events aren’t supported by EP, but common user interactions are covered by event schemas.
Custom data
Under the Coveo UA protocol, customData
logged additional event information, some of which was leveraged by ML models, and some of which wasn’t.
The commonly used custom data is now covered by the more streamlined EP event schemas or are inferred automatically.
For example:
-
customData.context_website
has been replaced bytrackingId
in Commerce schemas. -
customData.group
is inferred automatically.
Custom context
EP offers limited support for custom context, which was previously supported by the Coveo UA protocol and leveraged for reporting or ML.
Client events
In contrast with the Coveo UA protocol, the Event Protocol doesn’t support logging custom context.
Certain Event Protocol schemas support a context
parameter, but its format is fixed.
That is, such context
doesn’t let you specify custom keys.
Server events
Support for custom context in server events depends on the Coveo API providing a free-form context parameter.
The Search API does expose such a free-form context
parameter, allowing you to specify custom context in your search requests.
The Search API includes this custom context in the corresponding search events it logs server-side.
Coveo Machine Learning models can learn from this context, and you can also leverage it in query pipeline conditions or UA reports.
To send custom context in search requests, we recommend using Headless. If you use Atomic, use Headless through Atomic.
On the other hand, the Commerce API context
parameter has a fixed structure and doesn’t support custom keys.
That is, the Commerce API doesn’t support custom context.
Machine Learning (ML)
Outside of Coveo for Commerce, several ML models don’t yet support EP, such as RGA models. Stay tuned for updates on the support of more models under EP.
Also, due to the custom events, data, and context that are no longer supported, the following differences apply to Coveo ML models under EP:
-
Custom context is no longer supported by Content Recommendations models.
-
Filtering model input or output based on custom events, data or context is no longer supported (for example, when creating an ART model).
If you used either of those functionalities and migrate to EP, adjust and test your ML models. Due to the more streamlined and efficient event schemas, the ML models should be more powerful under EP.
Reporting
Besides the fact that you can’t report on the custom events, data and context that’s no longer supported, EP reporting also differs from UA reporting due to search count differences. Every search request to the Search/Commerce API logs a search event, whereas the previous protocol sometimes logged custom events (for example, loading more results was previously tracked as a custom event).
This might cause a noticeable change in the clickthrough rate, because the denominator (search count) can be higher under the new protocol given the same user interactions. For example, if a user loads more results multiple times, the search count increases, which decreases the clickthrough rate under EP, whereas it would have remained constant under the previous protocol.
The goal of this reporting change is to align with the industry definitions for metric calculation.
Identifying users
To improve security, client-side specification of usernames is no longer supported. To specify usernames, enforce them through search tokens. This change makes it impossible for malicious actors to impersonate others in usage analytics events.
Finally, user stitching won’t be supported under EP initially, but will be supported in the future.