Client ID, Visitor ID, and Visit ID Dimensions

In many situations, users of the search system are authenticated, which means that Coveo knows their usernames and can log this information in the analytics. However, users are sometimes anonymous, which is the case on most websites. Knowing how many distinct users did a query or opened an item is a very important piece of information. To obtain that information, Coveo uses the client ID to populate the unique user ID dimension when a user is anonymous.

Visit ID

The visit ID is a random and unique value generated every time a user visits the search site. A visit ends after 30 minutes of inactivity. Therefore, all user interactions over the course of the same visit are recorded using the same visit ID, allowing you to analyze the user workflow within a visit (see What’s a User Visit).

The visit ID is required to track individual visits of users across the following:

  • Visits for the same user

  • Accounts for the same user

  • Users on the same browser

The visit ID is also necessary to train the Machine Learning (ML) algorithms, which provide Automatic Relevance Tuning (ART), Query Suggestions (QS), Dynamic Navigation Experience (DNE), and Content Recommendations (CR) to track event sequences and improve the services.

A metric related to the visit ID dimension is the unique visit ID metric. Unlike the Search Event Count, the unique visit ID lets you ignore the count of the same queries submitted during a visit.

EXAMPLE

If a user submits a query ten times in the same visit, the unique visit ID metric for this query will increase by only one, while the query count will increase by ten.

Client ID

The client ID is a unique value that identifies a user on a specific browser and website. Using the related metric, unique visitor ID, it lets you know the number of distinct browsers in which a query was sent or an item was clicked, counting them only once even if the same search actions were recorded over the course of many visits.

Although similar to the visitor ID, the client ID takes precedence; when both are present, the Usage Analytics service selects the client ID to resolve the visit associated with an event. Furthermore, when the client ID is present, Coveo UA doesn’t return a cookie containing the visitor ID value.

Visitor ID

The visitor ID has been deprecated.

If your implementation uses the January 2021 JSUI Release (or newer), you must use the client ID to populate the unique user ID dimension when a user is anonymous. This deprecation was done in order to obtain a more accurate picture of the unique visitor count. Previously, if there was an anonymous user, and no visitor ID was provided, we would generate a visitor ID for each event. As a result, the unique user ID value was different every time.

It should be noted that this deprecation doesn’t affect user visits, however it does affect the user ID and unique visitors by user ID in reports.

The visitor ID is a random and unique value generated when a user visits the search site for the first time. Similar to the client ID, it uses the related metric, the unique visitor ID, and lets you know the number of distinct browsers in which a query was sent or an item was clicked, counting them only once even if the same search actions were recorded over the course of many visits.

The visitor ID is required to provide the following functions:

  • Usually, a browser represents a single user since most users don’t share their computer or mobile device. However, it’s possible that two or more users use the same browser. In that case, the visitor ID can’t by itself differentiate between users.

  • The visitor ID is only considered if the client ID isn’t present.

General Information

  • When sending an event, the client ID always has precedence over the visitor ID when both are present. The visitor ID is therefore considered only if the client ID isn’t present.

  • When sending an event, if no ID is provided, the Usage Analytics service will generate a visitor ID. The generated ID is returned in the response.

  • By default, the client ID is supplied to Coveo UA and kept in the local storage of the user’s browser.

  • Changing a client ID always results in a new visit.

Visit ID, Client id, and Visitor ID Differences

The following table highlights the main differences between the visit ID, the client ID, and the visitor ID.

Dimension characteristics Visit ID Client ID Visitor ID (deprecated)

Different value for each visit made by the same user

Different value across different Coveo organizations for the same user

Different value for many users using the same browser

Expiration

After 30 minutes of inactivity

Virtually never (depending on the implementation)

Virtually never (depending on the implementation)

Required to gather usage analytics events

Can be specified in requests to Coveo Usage Analytics (Coveo UA)

Entirely managed by Coveo UA

What's Next for Me?