--- title: User journey validation (Coveo UA) slug: n8493194 canonical_url: https://docs.coveo.com/en/n8493194/ collection: coveo-for-commerce source_format: adoc --- # User journey validation (Coveo UA) > **Important** > > We strongly recommend that all new Commerce implementations use the [Event Protocol](https://docs.coveo.com/en/o1n91230/) to log events. This article explains how to validate the proper operation of a basic customer user journey. This verification ensures the correct sequence of events is sent to [Coveo Analytics](https://docs.coveo.com/en/182/) and that the data remains consistent across events. ## What's a user journey? A user journey is the sequence of actions a user may take while in a Coveo-powered commerce implementation. Actions are tracked as [Coveo Analytics events](https://docs.coveo.com/en/260/). Think of it as a path made up of different steps, all linked together like a story. It's crucial to make sure that the sequence of events sent to track this journey is consistent and that the information between these events aligns correctly to validate the effectiveness of your Coveo implementation. ## Key validation factors To effectively test a user journey, you must emulate the experience of a customer visiting your site. As you analyze the journey, consider the following: * Appropriate event triggering: Confirm that the correct event type is sent based on the relevant user interactions. For instance, when a product is added to the cart, ensure that the corresponding `add` event is logged. * Correct logging of searches and clicks: Verify that the search and click events are logged with the valid [`actionCause`](https://docs.coveo.com/en/2064#actioncause-string) values. * Consistent [`searchQueryUid`](https://docs.coveo.com/en/l2jb0279/) value in click events: Validate that the value transmitted in click events corresponds to the `searchQueryUid` value associated with the Search API request that resulted in the displayed product. * Consistent [client ID](https://docs.coveo.com/en/masb0234/): Ensure that the client ID is the same throughout all events. * Alignment of product IDs: Confirm the consistent and accurate matching of product IDs. Verify that the product ID in events corresponds with the value in the [catalog data](https://docs.coveo.com/en/obcf0333/). This alignment should remain consistent across all events related to the same product, including actions such as clicks, adding to cart, and purchases. If your catalog entity contains [variant data or product groupings](https://docs.coveo.com/en/m53g0506/), ensure that this data is transmitted with the events. * Aligning search hub values: For correct [attribution](https://docs.coveo.com/en/m7l98577/), it's important to ensure that the search hub value transmitted to the Search API follows certain [naming conventions](https://docs.coveo.com/en/l29e0540#search-hub). Additionally, the `originlevel1` value in `search` and `click` events should correspondingly match the value of the `searchHub` sent to the Search API. * [Additional clicks for direct add to cart](https://docs.coveo.com/en/n39h1594#send-an-additional-click-event): Verify that adding a product to the cart directly from a Coveo-powered search results page, listing page or a recommendations component, triggers an additional click event. * Verify the accurate transmission of the `trackingId` field, ensuring its consistency across events. Additionally, validate its correspondence with the `website` field within the `context` object of the Search API request. * Ensure that duplicate events aren't being emitted by verifying the outgoing network requests. In the following sections, we will walk you through a specific user journey and verify the above criteria. ## Sample user journey Outlined below is a sample user journey. You can replicate this user journey for your implementation by following the steps shown. While interacting with your site, pay close attention to the events transmitted to Coveo and validate the specified checks in this section. Examine these events using the **Network** tab in your browser's developer tools. Subsequently, compare these events with the observations alongside the data presented in the [Coveo Administration Console](https://docs.coveo.com/en/183/). From a high level perspective, the following is what the user journey will look like: Search -> Click -> Product detail page (PDP) -> Add to cart -> Purchase On the main landing page, a user enters the name of a product they intend to purchase. Subsequently, a results list is presented, from which they can choose the specific product they wish to acquire. After selecting their desired product, they proceed to add it to their cart and initiate the checkout process. . Search: Load the home page of your website, open the [developer tools](https://docs.coveo.com/en/n8493503#access-developer-tools), and ensure that the network log recording is enabled. To only see requests sent to Coveo, input `v15/analytics` in the filter box. Conduct a search using the search box on the home page and validate the following: ** A [`search`](https://docs.coveo.com/en/n7o80165/) event is sent to Coveo. ** The [`actionCause`](https://docs.coveo.com/en/1502#actioncause-string)parameter of this event is `searchBoxSubmit`. ** Validate that the value of the `originLevel1` field in the UA request matches the value of the `searchHub` in the corresponding Search API request. This value should also adhere to the appropriate [naming conventions](https://docs.coveo.com/en/l29e0540#search-hub). ** Pay attention to the `trackingId` field on the UA event request. The value of this field should match the value of the `website` field within the `context` object of the Search API request. ** Take note of the `searchQueryUid` and `clientId` values from the payload. We will need these for the subsequent steps. ![Search submit](https://docs.coveo.com/en/assets/images/coveo-for-commerce/images/user-journey-validation-1-search-submit.png) . Click: Click a product on the search results page and confirm the following: ** A [`click`](https://docs.coveo.com/en) event is sent to Coveo. ** The [`actionCause`](https://docs.coveo.com/en/1502#actioncause-string) parameter of this event is `documentOpen`. ** Verify that the `searchQueryUid` and the `clientId` values match the ones noted for the search event. ** Validate that the value of the `originLevel1` field in the UA request matches the value of the `searchHub` in the corresponding Search API request. This value should also adhere to the appropriate [naming conventions](https://docs.coveo.com/en/l29e0540#search-hub). ** Note the `contentIDValue` from the `customData` key, which represents the ID of the clicked product. ** Verify that the value of the `trackingId` field matches the value noted in the previous step. ![Click validation](https://docs.coveo.com/en/assets/images/coveo-for-commerce/images/user-journey-validation-2-click.png) . Product detail page (PDP): Once clicked upon, the PDP will display more information about the product. On opening the PDP, observe the following: ** A [product detail view event](https://docs.coveo.com/en/l2pd0522/) is sent. Identify the event by verifying the `pa` parameter. *** For the product detail view event, the `t` parameter should be `event` and the `pa` parameter should be `detail`. ** Verify the following: *** Client ID, as highlighted by the `cid` field here, matches the `clientId` noted from the click event. *** Ensure that product identifiers align by validating that the `pr1id` field matches the `contentIDValue` noted from the click event. *** Verify that the value of the `trackingId` field matches the value noted in the previous steps. **Product detail view event request** ![Detail validation](https://docs.coveo.com/en/assets/images/coveo-for-commerce/images/user-journey-validation-3-detail.png) . Add to Cart: When an "Add to Cart" button is selected, confirm the following: ** An [add to cart](https://docs.coveo.com/en/n39h1594/) `collect` event is logged, with the `pa` key set to `add`. ** If a single product is added, the `pr1id` key should match the product ID noted from the click event. ** Validate if the client ID and `trackingId` values are consistent, as done in the previous step. ** Confirm that the `pr1id` field matches the `contentIDValue` noted in the previous step. ![Cart validation](https://docs.coveo.com/en/assets/images/coveo-for-commerce/images/user-journey-validation-4-cart.png) . Purchase the item: A [purchase](https://docs.coveo.com/en/l39m0327/) `collect` event should be logged, with the `pa` key set to `purchase`. Conduct the same checks on the client ID, product ID and `trackingId` fields as done above. ![Purchase validation](https://docs.coveo.com/en/assets/images/coveo-for-commerce/images/user-journey-validation-5-purchase.png) . Confirm events in the [Coveo Administration Console](https://docs.coveo.com/en/183/): Navigate to the [Visit Browser](https://docs.coveo.com/en/274/) to verify if the events sent in the preceding steps are logged here. Create a filter to view only the events sent by the client ID noted above, as shown in the screenshot below. > **Note** > > A slight delay of a few minutes could occur before the events become visible in the Visit Browser. ![Visit Browser](https://docs.coveo.com/en/assets/images/coveo-for-commerce/images/user-journey-validation-6-visit-browser.png) Click the latest visit and go through the events given here to verify if they match those sent in the previous steps. Furthermore, as shown in the screenshot below, you can click an event to verify if the correct fields were logged. ![Visit Browser events](https://docs.coveo.com/en/assets/images/coveo-for-commerce/images/user-journey-validation-6-visit-browser-events.png) ## Validating all user journeys While the steps above focus exclusively on a singular user journey, they provide invaluable insights applicable to verifying other essential user journeys. The example journey emphasizes the search aspect. Similar methodologies can be applied to instances where products are discovered through recommendations or product listing pages. Start by identifying all potential Coveo-related user journeys, from product exploration to purchase. Subsequently, these journeys should be validated against the [key validation factors](#key-validation-factors) outlined in this article.