What Are the Visitor ID and Visit ID Dimensions and How Can I Use Their Values?

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. Sometimes, though, users are 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 achieve that, Coveo uses two tracking cookies: one for the Visit ID and one for the Visitor ID.

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. Thus, 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 Is a User Visit?).

A related metric to the Visit ID dimension is the Unique Visit ID metric. Unlike the Query Count, the Unique Visit ID allows you to ignore the count of the same queries submitted during a visit.

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.

Visitor ID

The Visitor ID is similar to a Visit ID but never expires. Thus, it is possible to keep the same visitor ID for an unlimited amount of time. Using the related metric, Unique Visitor ID, allows you to know the number of distinct users who submitted a query or clicked an item, counting them only once even if they did the same query or clicked the same item over the course of many visits.

General information

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

  • By default, the visitor ID is kept in the browser, more precisely in a third-party cookie.

  • A visitor ID is lost when:

    • A user clears their cookies;

    • A user blocks third-party cookies and does not store the visitor ID elsewhere.

  • Changing a visitor ID results in a new visit.

  • The visitor ID should be in UUID v4 format (see Universally Unique Identifier).