Ensure that Coveo Usage Analytics click and view events are recorded
Ensure that Coveo Usage Analytics click and view events are recorded
This guide provides guidelines to analyze, review, and test different aspects of a Coveo-powered implementation. It shouldn’t be considered an official, definitive guide to testing an implementation before it goes live, but rather a guide showcasing the basic components that Coveo implementations typically include. Every Coveo implementation is different and may require custom configuration. Therefore, you may notice discrepancies between the components and features listed in this guide and those you’re using in your actual implementation. If you encounter issues, or have any questions related to this article, contact Coveo Support for help. |
Access your browser’s network monitoring tool
-
Open your web browser’s developer tools.
NoteThe examples in this article use the Google Chrome developer tools. For browser-specific information, see:
-
Select the Network tab.
Test click events
When a click action is performed (for example, clicking a result link), you must ensure that an appropriate click event is logged.
-
Access the page in which you have integrated your search component.
-
Perform a click action.
-
In the network monitoring tool, under the Name column, you should see a request whose path contains
/rest/ua/v15/analytics/click
:
If you aren’t logging click events, you need to do one of the following:
-
If you’re using either the Coveo Atomic or Quantic libraries, you need to add the result link component to all of your result templates. This component handles click events for you, and shouldn’t be removed from your result templates.
-
If you’re using Coveo Headless, you should use the
InteractiveResult
controller to handle click events.
Note
If your implementation doesn’t rely on any of these UI libraries, see Open query results and Log click events. |
Test view events
If you want to leverage Coveo Machine Learning (Coveo ML) content recommendations, you must ensure that your search interface logs view events every time a tracked page is opened.
The Atomic and Headless libraries don’t send view events automatically. You must add code to log view events on every page that you want to be able to recommend through a recommendation interface. Depending on how you choose to build your search interface, see: |
-
Access the page in which you have integrated your search component.
-
Reload the page.
-
In the network monitoring tool, under the Name column, you should see a request whose path contains
/rest/ua/v15/analytics/view
.
Note
If your implementation doesn’t rely on any Coveo search UI library (Atomic, Headless, or Quantic), see Log view events. |