SegOps AIDocs

How anonymous users are reconciled

A customer almost never identifies themselves on their first click. They land from a search, browse a few products, maybe come back tomorrow — all anonymous — and only later create an account or log in. The question every analytics system has to answer is: when that finally happens, what do you do with everything they did *before* you knew who they were?

SegOps stitches the two together automatically, on the server. Here's how.

A stable anonymous id#

The first time someone arrives, the SDK generates an anonymous id and stores it (in the browser, across page loads and sessions; on a device, in local storage). Every event they send carries it. That id is what ties together a visitor's activity before they're known.

The moment of reconciliation#

When the visitor identifies — logs in, or you call identify() — the SDK sends both their anonymous id and their real user id together. SegOps records a permanent link between them: this anonymous trail belongs to this user. From that point on, anything attributed to the old anonymous id is understood to be the same person.

Crucially, SegOps doesn't go back and rewrite history. The old events stay where they are; the link is applied whenever data is read — when a segment is computed, when you open a profile, when your bill is calculated. So the same person's pre-login browsing shows up in segments that target them, and they're counted as a single customer.

Three rules that keep it honest#

  • The first identification wins. Once an anonymous id is tied to a user, a later, conflicting claim doesn't silently move it. This prevents the runaway identity tangles that "last write wins" stitching is famous for.
  • Two real users are never merged automatically. Folding one account into another is deliberate, and only happens when you explicitly ask for it through the Admin API.
  • Logging out starts fresh. When a user logs out, the SDK rotates to a new anonymous id. The next person to use that shared computer gets a clean slate — they never inherit the previous user's trail.

What you have to do#

Almost nothing. Track events with whatever id you have. If you want logged-in users stitched to their anonymous past, mount one signing route and call identify() after login — SegOps does the rest.


Related: Identity Resolution reference · How we count MTU