--- title: Smart Snippets usage analytics events slug: m62a0057 canonical_url: https://docs.coveo.com/en/m62a0057/ collection: leverage-machine-learning source_format: adoc --- # Smart Snippets usage analytics events To track the usage of a [Smart Snippets](https://docs.coveo.com/en/laea5490/) [model](https://docs.coveo.com/en/1012/), [Coveo Analytics](https://docs.coveo.com/en/182/) logs [events](https://docs.coveo.com/en/260/) for actions performed on the main snippet and in the related questions (people also ask) section of a [snippet](https://docs.coveo.com/en/laeb0292/). You can [inspect the search page](#inspect-your-search-page) that uses a Smart Snippet model to better understand and retrieve the Coveo Analytics events. This article also provides a [reference](#smart-snippets-usage-analytics-events-reference) for the events that are tracked by Coveo Analytics. ## Inspect your search page Use your browser developer tools to retrieve what's tracked: . Open a Coveo-powered search page [configured to leverage Coveo ML Smart Snippets](https://docs.coveo.com/en/l9le0392#step-5-configure-the-search-interface). . Open your web browser's developer tools. > **Note** > > The examples in this article use the **Google Chrome** developer tools. > For browser-specific information, see: > > * [Google Chrome](https://developers.google.com/web/tools/chrome-devtools/open) > > * [Mozilla Firefox](https://developer.mozilla.org/en-US/docs/Tools) > > * [Safari](https://support.apple.com/en-ca/guide/safari/sfri20948/mac) . Select the **Network** tab. ![Access Chrome DevTools Network tab via a Coveo-powered search interface](https://docs.coveo.com/en/assets/images/query-pipeline-in-dev-tools.gif) . On the search page, perform a query that will trigger a Smart Snippet in the search results. . On the snippet, or on one of the related questions, perform an action (for example, Click **Show More** to expand the snippet). . Back in the developer tools window, under the **Name** column, click the latest `click` or `custom` call to Coveo Analytics. 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`. . Select the **Payload** tab. You should now see the tracked 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 Analytics in the developer tools, which in this case is `custom?org=`. ![Inspect event example showing Smart Snippet feedback | Coveo](https://docs.coveo.com/en/assets/images/inspect-event-example.png) ## Smart Snippets usage analytics events reference This section lists the [click](https://docs.coveo.com/en/m62a0057#click-event) and [custom](https://docs.coveo.com/en/m62a0057#custom-events) usage analytics events logged when users interact with a snippet. ### Click event The following click event is logged in the [JSUI v2.10090](https://docs.coveo.com/en/m56a0507#october-2021-release-v210090) (or a later version) and in [Coveo Headless library](https://docs.coveo.com/en/headless/latest/): [cols="3",options="header"] |=== |Usage analytics event |Value |Triggered .2+|`Click` a| * 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. a| * 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](https://docs.coveo.com/en/m56a0507#october-2021-release-v210090) (or a later version) and in [Coveo Headless library](https://docs.coveo.com/en/headless/latest/): [cols="3",options="header"] |=== |Custom events |Value |Triggered | `Show more/less` a| * `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` a| * `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?` a| * `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` a| * `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` a| * `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. |===