--- title: Validate usage analytics metadata slug: mc2g0367 canonical_url: https://docs.coveo.com/en/mc2g0367/ collection: project-guide source_format: adoc --- # Validate usage analytics metadata When logging [Coveo Analytics events](https://docs.coveo.com/en/260/), you should ensure that you send the right data to [Coveo Analytics](https://docs.coveo.com/en/182/) and [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/). This is particularly important in the following scenarios: * Your implementation doesn't rely on any Coveo search UI library ([Atomic](https://docs.coveo.com/en/lcdf0264/), [Headless](https://docs.coveo.com/en/lcdf0493/), or Quantic). * Your implementation relies on one of these libraries, but it includes custom code that can modify standard UA events. * Your implementation relies on one of these libraries, and you're pushing [custom user context](https://docs.coveo.com/en/3389/). > **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](https://connect.coveo.com/s/case/Case/Default) for help. ## Access your browser's network monitoring tool . 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. ## Usage analytics event properties The following table indicates the properties that are sent to [Coveo Analytics](https://docs.coveo.com/en/182/) and [Coveo ML](https://docs.coveo.com/en/188/), depending on the logged event type. [%header,cols="1,3a"] |=== |Event category |Body properties |Search events |* [Required Request Body Properties](https://docs.coveo.com/en/1502#required-request-body-properties) * [Coveo ML-Required Request Body Properties](https://docs.coveo.com/en/1502#coveo-ml-required-request-body-properties) * [Coveo ML-Optional Request Body Properties](https://docs.coveo.com/en/1502#coveo-ml-optional-request-body-properties) * [Optional Request Body Properties](https://docs.coveo.com/en/1502#optional-request-body-properties) * [Search Event `customData` (key-value pairs)](https://docs.coveo.com/en/1502#search-event-customdata-key-value-pairs) |Click events |* [Required Request Body Properties](https://docs.coveo.com/en/2064#required-request-body-properties) * [Coveo ML-Required Request Body Properties](https://docs.coveo.com/en/2064#coveo-ml-required-request-body-properties) * [Coveo ML-Optional Request Body Properties](https://docs.coveo.com/en/2064#coveo-ml-optional-request-body-properties) * [Optional Request Body Properties](https://docs.coveo.com/en/2064#optional-request-body-properties) * [Click Event `customData` (key-value pairs)](https://docs.coveo.com/en/2064#click-event-customdata-key-value-pairs) |View events |* [Required Request Body Properties](https://docs.coveo.com/en/2651#required-request-body-property) * [Coveo ML-Required Request Body Properties](https://docs.coveo.com/en/2651#coveo-ml-required-request-body-properties) * [Coveo ML-Optional Request Body Properties](https://docs.coveo.com/en/2651#coveo-ml-optional-request-body-properties) * [Optional Request Body Properties](https://docs.coveo.com/en/2651#optional-request-body-properties) * [View Event `customData` (key-value pairs)](https://docs.coveo.com/en/2651#view-event-customdata-key-value-pairs) |Custom events |* [Required Request Body Properties](https://docs.coveo.com/en/2650#required-request-body-properties) * [Coveo ML-Required Request Body Properties](https://docs.coveo.com/en/2650#ml-required-request-body-properties) * [Optional Request Body Properties](https://docs.coveo.com/en/2650#optional-request-body-properties) * [Custom Event `customData` (key-value pairs)](https://docs.coveo.com/en/2650#custom-event-customdata-key-value-pairs) |=== ## Validate usage analytics event property values . Access your Coveo-powered search interface. . [Access your browser's network monitoring tool](#access-your-browsers-network-monitoring-tool). . In the search box, perform a query. . Enable debugging mode by appending `&debug=true` to the current URL. ![Enable debugging mode | Coveo](https://docs.coveo.com/en/assets/images/debugging-mode-url.png) . In the network monitoring tool, under the **Name** column, select a request to the Search API. Depending on the category of the event that you want to inspect, the request path should contain one of the following: ** `/rest/ua/v15/analytics/search` ** `/rest/ua/v15/analytics/click` ** `/rest/ua/v15/analytics/view` ** `/rest/ua/v15/analytics/custom` . You can see the values for each logged property on the **Payload** tab. ![Request payload | Coveo](https://docs.coveo.com/en/assets/images/implementation-guide/request-payload.png) Some of these values must match those which were passed in the [corresponding request to the Search API](https://docs.coveo.com/en/mc2g0074#test-queries). You should make sure that the right values are being sent. > **Important** > > You should validate the `searchHub`/`originLevel1` and `tab`/`originLevel2` properties. . Click the corresponding request to the Search API. The request path should contain `/rest/search/v2`. . Select the **Preview** tab. . Find and expand the `executionReport` property, and then expand the `children` sub-property. . Expand the last `ResolveContext` property, and then expand the `result` sub-property. ![Result of resolve context property | Coveo](https://docs.coveo.com/en/assets/images/implementation-guide/resolve-context-result.png) You can now compare these values to those found in the UA event request payload. [Coveo ML](https://docs.coveo.com/en/188/) uses search hub and [tab](https://docs.coveo.com/en/1343/) values to separate its models. If the search hub or tab values of your [queries](https://docs.coveo.com/en/mc2g0074#test-queries) and UA events don't correspond, [Coveo ML](https://docs.coveo.com/en/188/) won't be able to suggest relevant content. The following table shows the equivalent Search API and Usage Analytics API properties: [%header,cols="2"] |=== |Query value |Usage analytics event value |`searchHub` |`originLevel1` |`tab` |`originLevel2` |=== If these equivalent properties have different values, [Coveo ML](https://docs.coveo.com/en/188/) won't consider the query and UA events to be related. This will prevent [Coveo ML](https://docs.coveo.com/en/188/) rules from applying. > **Note** > > You can find the `searchUid` value on the **Preview** tab of your network monitoring tool: > > ![Find the Search UID | Coveo](:https://docs.coveo.com/en/assets/images/find-search-uid.png)