Smart Snippets usage analytics events

To track the usage of a Smart Snippets model, Coveo Usage Analytics (Coveo UA) logs events for actions performed on the main snippet and in the related questions (people also ask) section of a snippet.

You can inspect the search page that uses a Smart Snippet model to better understand and retrieve the usage analytics events. This article also provides a reference for the usage analytics events that are tracked by Coveo UA.

Inspect your search page

Use your browser developer tools to retrieve what’s tracked:

  1. Open a {coveo-powered-search-page} configured to leverage Coveo ML Smart Snippets.

  2. Open your web browser’s developer tools.

    Note

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

  3. Select the Network tab.

    DevTools
  4. On the search page, perform a query that will trigger a Smart Snippet in the search results.

  5. On the snippet, or on one of the related questions, perform an action (for example, Click Show More to expand the snippet).

  6. Back in the developer tools window, under the Name column, click the latest click or custom call to Coveo UA. When hovering over the request, depending on whether you’re inspecting a click or custom event, the path should contain /rest/ua/v15/analytics/click or /rest/ua/v15/analytics/custom.

  7. Select the Payload tab. You should now see the tracked usage analytics event.

In the following example, the question What is the thesaurus? is queried on the search page. This triggers a snippet that provides the user with enough information, therefore they click Yes next to Was this useful?. This action is visible in the latest request to Coveo UA in the developer tools, which in this case is custom?org=.

Inspect event example

Smart Snippets usage analytics events reference

This section lists the click and custom usage analytics events logged when users interact with a snippet.

Click event

The following click event is logged in the JSUI v2.10090 (or a later version) and in Coveo Headless library:

Usage analytics event Value Triggered

Click

  • Main snippet section:

    • actionCause: openSmartSnippetSource

    • actionType: smartSnippet

  • Related questions (people also ask) section:

    • actionCause: openSmartSnippetSuggestionSource

    • actionType: smartSnippet

When you open the link that contains the snippet.

  • Main snippet section:

    • actionCause: openSmartSnippetInlineLink

    • actionType: smartSnippet

  • Related questions (people also ask) section:

    • actionCause: openSmartSnippetSuggestionInlineLink

    • actionType: smartSnippet

When you open an inline link displayed on a snippet.

Custom events

The following custom events are logged in the JSUI v2.10090 (or a later version) and in Coveo Headless library:

Custom events Value Triggered

Show more/less

  • eventValue: expandSmartSnippet and collapseSmartSnippet

  • eventType: smartSnippet

  • actionCause: expandSmartSnippet and collapseSmartSnippet

  • actionType: smartSnippet

When you select Show more or Show less in the main snippet section.

Accordion open/close

  • eventValue: expandSmartSnippetSuggestion and collapseSmartSnippetSuggestion

  • eventType: smartSnippet

  • actionCause: expandSmartSnippetSuggestion and collapseSmartSnippetSuggestion

  • actionType: smartSnippet

When you expand a People also ask (related question) suggestion.

Was this useful?

  • eventValue: likeSmartSnippet and dislikeSmartSnippet

  • eventType: smartSnippet

  • actionCause: likeSmartSnippet and dislikeSmartSnippet

  • actionType: smartSnippet

When you select Yes or No for Was this useful? in the main snippet section.

Explain why

  • eventValue: openSmartSnippetFeedbackModal and closeSmartSnippetFeedbackModal(clicking the X )

  • eventType: smartSnippet

  • actionCause: openSmartSnippetFeedbackModal and closeSmartSnippetFeedbackModal (clicking the X )

  • actionType: smartSnippet

When you click Explain why from Was this useful? in the main snippet section.

Send

  • eventValue: sendSmartSnippetReason and closeSmartSnippetFeedbackModal (for cancel)

  • eventType: smartSnippet

  • actionCause: sendSmartSnippetFeedbackModal and closeSmartSnippetFeedbackModal (for cancel)

  • actionType: smartSnippet

When you send a reason from the Explain why pop-up.