← Glossary

What Is a Visitor ID?

A visitor ID is a measurement key used to recognise returning visits. Cookie-based IDs normally follow a browser storage context rather than a person, while accounts, identifier transfer and other reporting layers can change how visits are linked.

Updated:

A web visitor ID is an identifier a website or analytics system associates with a browser or visiting client so that later visits can be recognised as coming from the same place. In a common cookie-based design, the first eligible visit causes the measurement script or server to generate a value, stores it in the browser, and sends it with every event; on the next visit the stored value is read back and the visit is counted as returning rather than new. An opaque value need not contain a name, email address or account number. It is a pseudonymous visitor ID in the sense that the system can distinguish this browser from others and link its visits together, without necessarily knowing the person's name. The identifier may still be linkable to a person or a detailed activity history. Google Analytics calls its web version the client ID and stores it in a first-party cookie; Matomo calls it the visitor ID and stores it in a cookie of its own. The mechanics are similar across vendors, and so are the misunderstandings about what the number represents.

How Visitor IDs Are Assigned

Many browser-stored visitor IDs are randomly generated; exact assignment rules vary by analytics implementation. The measurement script checks for an existing value in the storage it uses, typically a first-party cookie set on the site's domain, and sometimes localStorage as a fallback. If none exists, it generates one, using the vendor's chosen format, and writes it with a long expiry. Google's documentation describes the client ID as stored in the first-party _ga cookie and used to distinguish unique users and their sessions; Matomo's documentation describes _pk_id as a first-party cookie containing the unique visitor ID with a default expiry of thirteen months. Mobile apps follow the same pattern with an app-instance identifier generated by the SDK at install.

Consent affects assignment. Analytics systems that honour consent signals withhold the identifier until permission is given; Google's documentation notes that the client ID is not stored when analytics storage is turned off through its consent mode. In jurisdictions where such identifiers require consent for non-essential purposes, a visitor who declines simply never receives one, and the cookie-based continuity is unavailable. That does not prove no other account, request or measurement data can relate the visits. Some systems then fall back to cookieless methods that derive a short-lived key from request characteristics, which produces a weaker, time-limited notion of a returning visitor.

Persistence, Resets and Multiple Devices

The identifier lives as long as its storage does, and that storage is fragile.

EventEffect on the visitor ID
Return visit on the same browser and profileSame ID is read back; visit counted as returning
Cookie expiry reachedNew ID generated on the next visit; the visitor appears new
User clears cookies or site dataCookie-based continuity lost; another identification layer may still link visits
Private or Incognito windowSeparate temporary private-session context, normally discarded when that session ends
Different browser or browser profile on the same deviceSeparate ID per profile, because storage is per profile
Different deviceSeparate ID; nothing links the two without additional data
Browser cookie lifetime capsID may expire earlier than the vendor's default

Visitor ID persistence is therefore bounded from several directions. Vendors set a nominal lifetime, browsers can shorten it, and users can end it at will. Matomo's cookie documentation records that some browsers delete cookies after periods of inactivity, which means the thirteen-month default is a ceiling rather than an expectation. A browser-stored ID does not automatically establish cross-device continuity. A service can add account-based linkage, explicit identifier transfer or probabilistic modelling, each with its own assumptions and controls.

Visitor IDs Compared With Account and Device Identifiers

The visitor vs user ID distinction is the one analytics documentation stresses most.

  • Visitor or client ID. Assigned by the measurement script to a storage context. Pseudonymous, per browser profile, resettable by the user, and unlinked across devices.
  • User ID. Supplied by the site from its own authentication system when someone logs in. Google's documentation describes the User-ID feature as letting a site associate its own identifiers with individual users to connect behaviour across sessions, devices and platforms, and requires that the value contain nothing a third party could use to determine a user's identity. Each user ID is treated as a separate user.
  • Device or hardware identifiers. Values from the operating system such as an advertising ID or a platform-scoped identifier. These belong to the device or app installation, are governed by platform policies, and are outside the browser's storage model entirely.
  • Fingerprint-derived keys. Values computed from browser characteristics rather than stored. They need no storage but are less stable and raise distinct privacy concerns.

Reporting systems combine these layers. Google's reporting identity options evaluate user ID first, then device ID, and in the blended option modelled data, so the same person may be counted once when logged in and several times when not. A website visitor identifier on its own produces a count of browser contexts, and treating that count as a count of people can undercount people sharing one browser and overcount a person using several unlinked contexts.

Where Visitor IDs Are Used

Analytics uses them to compute new versus returning visitors, sessions per visitor and conversion paths across visits. Experimentation platforms use them to keep a visitor in the same test variant on every page. Personalisation stores recently viewed items against the ID. Consent management records the choice made against the same context. Fraud and abuse systems use the ID as one weak signal among many, aware that it can be reset at will. Automation and testing tools inspect the cookie to verify that the measurement script is installed and that a test run was counted once.

Limits and Misreadings

The ID identifies a browser profile's storage, and every property of the number follows from that. An opaque identifier does not reveal a name directly, but can still single out a visitor or be linked to other records. Pseudonymous is therefore different from anonymous; collecting no email address does not make a detailed visit history unidentifiable. A cookie-only identifier may disappear when its storage is cleared, and another profile normally starts with different storage. Counts can rise as a result unless another reporting layer deduplicates them. Logging into the same account can reconnect contexts despite that separation. And it is only as honest as the consent regime around it: an identifier assigned without the required permission is a compliance problem rather than a measurement asset. A visitor ID is a modest, resettable bookkeeping key, and analytics built on it estimates continuity under the system's storage, collection and reporting rules.

Frequently asked questions

Can one person have several visitor IDs?

Yes. Different browsers, profiles and devices can hold different IDs, and storage resets can create new ones. A reporting system may deduplicate some of these using an account ID or another identity layer, so several stored IDs do not necessarily mean several reported users.

Can clearing storage reset an ID?

Clearing the storage that holds a cookie-based ID can cause a fresh value on a later eligible visit. Clearing cookies alone may leave other storage untouched. Account linkage or another identification layer may also connect the visits despite the changed cookie.

Does a visitor ID reveal a real identity?

An opaque ID may reveal no name by itself, yet still single out a visitor and connect a detailed history. Other records can make that history attributable. Pseudonymous IDs should not be treated as anonymous merely because they contain no email address.

How is a visitor ID different from a user ID?

A visitor ID is generated by the measurement script and tied to browser storage. A user ID is supplied by the site from its own login system and can connect the same person across devices and sessions. Analytics tools treat the two as separate layers and prefer the user ID when it exists.

Is a visitor ID assigned without consent?

It depends on the configuration and jurisdiction. Systems that honour consent signals withhold the identifier until analytics storage is permitted, and Google's consent mode does not store the client ID when analytics storage is off. Assigning one where consent is required is a compliance issue.