Troubleshoot user visits

Accurate user visit tracking is essential for meaningful analytics and helps you understand how users interact with your Coveo search solution. In some cases, you may encounter issues while exploring user visits that require further investigation. For example, you might notice multiple visits from the same user but with different client IDs.

This article provides troubleshooting steps to ensure consistent visit tracking, helping you maintain reliable analytics for better insights.

Access your browser developer tools

When troubleshooting user visits directly from your search page, you’ll need to access your browser developer tools.

  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.

Find the client ID

The client ID is a UUID that helps identify a specific browser. In the context of user visits, it enables Coveo Usage Analytics (Coveo UA) to link events like searches and clicks to the same user, therefore it’s important to ensure that one is provided in each request.

  1. Access your browser developer tools.

  2. In your search page, perform a query.

  3. In the Name column of the Network tab, look for POST or GET requests on /rest/v15/analytics/.

  4. In the Payload tab, under the Request Payload section, find the client ID.

    Client ID in payload | Coveo
Notes
  • If you’re using the Collect endpoint, look for the cid parameter.

  • If you don’t see the client ID in the request, check for a visitor query parameter in the request:

    In the Payload tab, under the Query String Parameters section, find the visitor query parameter.

    Visitor query parameter in payload | Coveo

The coveo_visitorId cookie is a first-party cookie that stores the client ID value, and the clientId property in the payload should match the value of the cookie. If you’re using the visitor query parameter to track visits, make sure that the value of the parameter matches the value of the cookie.

  1. Access your browser developer tools.

  2. In your search page, perform a query.

  3. In the Name column of the Network tab, look for POST or GET requests on /rest/v15/analytics/.

  4. In the Cookies tab, find the coveo_visitorId cookie.

    Coveo visitor cookie | Coveo
  5. Verify that the coveo_visitorId cookie value matches the client ID or visitor query parameter value, depending on which one is present in the request.

Leverage the Event browser

The Event browser (platform-ca | platform-eu | platform-au) tab of the Data Health page helps you inspect user visits by filtering events marked as Invalid. You can then assess the client ID and visit ID to identify potential inconsistencies in the visit tracking process.

See Event browser for more information.

Check whether your website uses an intermediate server

Using intermediate servers between users and Coveo UA, such as a proxy server, can cause inconsistencies in the visit tracking process. A user’s request may be altered or anonymized before it reaches the website, which can impact the accuracy of the visit data.

If this is the case, you may want to consider using a reverse proxy instead.

Tracking issues across subdomains

If you noticed that visits are handled correctly when the user stays within a specific part of the website, but stop working when they move to another section, you may want to consider the following troubleshooting steps:

If your cookie storage medium isn’t resilient to changes in the domain name, you may lose track of your user visits when they move from one section to another. Therefore, you should ensure that the coveo_visitorId cookie is set on the whole website domain.

Example

You have both a.example.com and b.example.com. If you only set a cookie on a.example.com, the cookie wouldn’t be visible on b.example.com.

To track visits across those two websites, you would need to explicitly set the cookie on the whole example.com domain.

Verify the authentication providers

If you use different authentication providers across your website subdomains, your users' usernames can change depending on the active one. This change in usernames can affect visit tracking, as each time the username changes, a new visit starts, therefore breaking the user’s journey into multiple visits.

Example

You have both a.example.com and b.example.com. A user has to authenticate using Google on a.example.com and Microsoft on b.example.com.

This causes the user to change from one user name to another, therefore dividing the user visit.

Consider customizing your data tracking

While a client ID should remain the same between subdomains, it would change between top-level domains. If your search solution includes more than one top-level domain, you may want to consider customizing your data tracking to ensure consistent visit tracking across all top-level domains. For information on how to troubleshoot this issue, see Customize data tracking.