Ensure that Coveo Usage Analytics click and view events are recorded

Important

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

  1. Open your web browser’s developer tools.

    Note

    The examples in this article use the Google Chrome developer tools. For browser-specific information, see:

  2. 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.

  1. Access the page in which you have integrated your search component.

  2. Access your browser’s network monitoring tool.

  3. Perform a click action.

  4. In the network monitoring tool, under the Name column, you should see a request whose path contains /rest/ua/v15/analytics/click:

    Click event path | Coveo

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.

Important

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:

  1. Access the page in which you have integrated your search component.

  2. Access your browser’s network monitoring tool.

  3. Reload the page.

  4. In the network monitoring tool, under the Name column, you should see a request whose path contains /rest/ua/v15/analytics/view.

    View event path | Coveo
Note

If your implementation doesn’t rely on any Coveo search UI library (Atomic, Headless, or Quantic), see Log view events.