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 performed 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.

Client ID

The client ID is a unique value that identifies a user on a browser for a 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 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:

Notes
  • 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.

Client ID vs Visitor ID

  • When sending an event that contains both the client ID and the visitor ID, the client ID always has precedence over the visitor ID.

  • 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.

Important

Although we continue to support the visitor ID, we recommend that you use the client ID instead (if your implementation uses the January 2021 JSUI Release or newer) to populate the unique user ID dimension when a user is anonymous and 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.

Note the following:

  • Using the visitor ID instead of the client ID affects the user ID and unique visitors by user ID in reports.

  • If both the client ID and the visitor ID are present, the client ID takes precedence.

  • The value of the client ID can be used as a visitor ID (if a visitor ID is required).

Example

Acme Solutions provides a Coveo-powered search page to their employees as a reference tool for HR questions. Towards the end of the summer, an employee uses a browser where cookies have been disabled to access the search page in order to find answers to some questions they have about their vacation balance.

  • If Acme Solutions uses the client ID, a single visit is registered in the Visit Browser page and the client ID populates the unique user ID dimension.

    Visit-Browser-ClientID
  • If Acme Solutions doesn’t use the client ID, a new visit is logged in the Visit Browser page each time the anonymous user clicks, searches, or views something during their inquiry. The number of visits show as 5 and a separate visitor ID is generated for each event.

    Visit-Browser-VisitorID

Visit ID

The visit ID is a random and unique value generated by Coveo UA 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.

A single visit can only have one client ID or a visitor ID.

The visit ID is also used for training 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.

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

Different value for each visit made by the same user

check

x

x

Different value across different Coveo organizations for the same user

check

x

x

Different value for many users using the same browser

check

x

x

Expiration

After 30 minutes of inactivity

Virtually never (depending on the implementation)

Virtually never (depending on the implementation)

Required to gather usage analytics events

x

check

check

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

x

check

check

Entirely managed by Coveo UA

check

x

x