Measuring

User identity

Why it is needed

Our visitor id is a one-way hash that changes every day — we use no cookies. That has a consequence: cross-day tracking of anonymous traffic is mathematically impossible. The sentence "30% of last week's visitors came back" cannot be constructed from anonymous data.

Rather than fabricate it, we open a second route: when a user logs in, you give us your own id.

// only for a logged-in user
vitrus.identify("user-id");

// optionally with traits, shown on the user's profile
vitrus.identify("user-id", { plan: "pro" });

Traits are sent once, as an identify event, and stored as sent — unlike the id, they are not hashed. Only send what your privacy notice covers.

How the identity is stored

  • The raw value never touches disk. It is hashed one-way on the server.
  • It is scoped per site. The same user cannot be correlated across two sites.
  • It is persistent (no daily salt) — that is what makes retention possible.
  • It is not stored in the browser. It is lost on reload, so call it each session.
  • Strict mode ignores it entirely — see privacy mode.
Don't pass an email address. It technically works (it gets hashed), but an opaque id — your database's user id, for instance — is the right thing to send.