Home / Data Architecture

Identity Resolution: Stitching Anonymous Visitors to Known Users

Identity Resolution: Stitching Anonymous Visitors to Known Users

A visitor reads your blog on their phone during lunch. That evening, they open your pricing page on a laptop. Two weeks later, they sign up. To your analytics, that’s often three different people. To your business, it’s one customer with one journey.

Closing that gap is the job of identity resolution—the process of recognizing that scattered sessions and devices belong to the same person. Get it right, and your funnel finally reflects reality. Get it wrong, and you’ll overcount visitors while undercounting the journeys that actually matter.

I’ve untangled identity problems on consumer apps and B2B SaaS alike. The mechanics differ by stack, but the core ideas hold everywhere. This guide explains how identity resolution works, the trade-offs involved, and how to implement it without overreaching.

What Is Identity Resolution?

Diagram of identity stitching: anonymous sessions merged into one profile via a shared match key
Anonymous sessions merge into one profile once a shared match key (like user_id) appears.

Identity resolution is the practice of connecting the events a person generates across devices, browsers, and sessions into a single, unified profile. It answers one deceptively hard question: are these two streams of activity the same human?

The challenge is that the web is anonymous by default. A browser gets an ID. Clear cookies or switch devices, and that ID resets. Without resolution, every reset spawns a “new” user, inflating your counts and fragmenting your journeys.

Resolution stitches those fragments back together using shared signals—most powerfully, a login.

Anonymous vs Known Identifiers

Every identity system juggles two kinds of IDs. Understanding the difference is the foundation of everything else.

Identifier What It Is Lifespan
Anonymous ID Random ID stored in a cookie or device Until cookies clear or device changes
User ID Stable ID tied to an account on login Permanent across devices and sessions

The magic happens at the moment those two link. A visitor browses anonymously, then logs in. At that instant, you can connect their pre-login activity to their account—if your tracking is set up to carry the anonymous ID forward.

How Identity Stitching Works

The most reliable form of identity resolution is deterministic stitching: matching profiles using a known, exact identifier like a User ID. There’s no guessing involved.

A typical flow looks like this:

  1. 1 A visitor arrives anonymously and gets a temporary anonymous ID.
  2. 2 Their browsing fires events tagged with that anonymous ID.
  3. 3 They log in. Your code now sets a stable User ID.
  4. 4 The analytics tool merges the anonymous history with the User ID profile.

In GA4, this is exactly what the User-ID feature does. You pass a logged-in identifier, and GA4 unifies sessions across devices under one user. GA4 then applies a reporting identity that can blend that User ID with device signals to recognize the same person across sessions.

Deterministic vs Probabilistic Matching

Not every match is exact. Some systems guess, using signals like IP address, device type, and behavior patterns. That’s probabilistic matching, and it carries real trade-offs.

  • Deterministic: Matches on a known, exact ID like an email hash or User ID. High accuracy, requires a login.
  • Probabilistic: Infers matches from shared signals. Wider reach, but introduces error and privacy concerns.

My advice for most teams: lead with deterministic matching. It’s accurate, transparent, and far easier to defend to users and regulators. Reach for probabilistic methods only when you fully understand the risks.

Identity Resolution and Privacy

Connecting a person’s activity across devices is powerful—and sensitive. Identity resolution must respect consent and data-protection rules, not work around them.

The goal of identity resolution is a clearer view of real journeys—never to defeat a user’s choice not to be tracked. Consent comes first; resolution operates inside it.

That means honoring consent signals before stitching, storing identifiers securely, and never stuffing raw personal data like emails into your analytics payload. Done responsibly, identity resolution fits naturally alongside a clean consent setup rather than fighting it.

Common Identity Mistakes

1. Using Email as the User ID

An email is personal data. Sending it as your raw User ID violates most platforms’ terms. Hash it, or use an internal account ID that maps back to the user only inside your own systems.

2. Setting the User ID Too Late

If you only assign a User ID well after login, you lose the chance to stitch the early session. Set it the moment authentication succeeds so the merge captures the full journey.

3. Ignoring Pre-Login Activity

The pre-login browsing is often the most valuable part of the funnel—it’s where discovery happens. A resolution setup that throws it away misses how people actually found you.

4. Stitching Without Consent

Merging identities for users who declined tracking is both a compliance failure and a trust failure. Always check consent state before you resolve.

5. Treating Households as Individuals

Shared devices muddy the picture. A family laptop can blend several people’s behavior into one profile. Be cautious about over-interpreting cross-device data on shared hardware.

Pros and Cons of Identity Resolution

Pros Cons
  • Accurate user counts instead of inflated session counts
  • Complete cross-device journeys from discovery to conversion
  • Better attribution because touchpoints connect to one person
  • Stronger personalization built on a unified profile
  • Requires a login to do deterministic matching well
  • Probabilistic matching adds error and privacy risk
  • Must be built around consent, not bolted on after
  • Shared devices can blur multiple people into one profile

An Identity Resolution Checklist

  • Generate a stable anonymous ID for every visitor
  • Set a non-personal User ID the moment a user logs in
  • Carry the anonymous ID forward to stitch pre-login activity
  • Favor deterministic matching over probabilistic guessing
  • Check consent before merging any identities
  • Keep raw personal data out of your analytics payload

Identity resolution is the difference between counting browsers and understanding people. Build it on a stable login, run it inside consent, and your analytics will finally show the journeys your business actually cares about.

FAQ

What is identity resolution in analytics?

Identity resolution connects the events a person generates across different devices, browsers, and sessions into one unified profile. It answers whether separate streams of activity belong to the same human, usually by linking anonymous browsing to a known account at login.

What is the difference between deterministic and probabilistic matching?

Deterministic matching links profiles using an exact, known identifier like a User ID—it’s highly accurate but needs a login. Probabilistic matching infers connections from signals like IP and device type. It reaches more users but introduces error and greater privacy concerns.

Can I use an email address as a User ID?

No. An email is personal data, and sending it as a raw identifier violates most analytics platforms’ terms. Hash the email or use an internal account ID instead, keeping the mapping back to the real person only inside your own secure systems.

How does identity resolution handle privacy and consent?

Responsibly implemented, it checks consent before stitching any identities and never works around a user’s choice not to be tracked. Identifiers should be stored securely and raw personal data kept out of analytics payloads. Resolution operates inside consent, not outside it.

Why do my analytics show more users than I actually have?

Without identity resolution, each new device, browser, or cleared cookie creates a fresh anonymous ID—so one person counts as several users. Linking those sessions to a stable User ID at login collapses the duplicates and gives you accurate counts of real people.

MJ

Marcus Jery

Marcus Jery is a web-analytics architect with 10+ years untangling tracking for startups and enterprises. He writes Jery — practical, vendor-neutral guidance on tracking plans, event schemas, and attribution.