Identity resolution
Linking anonymous and logged-in activity to the same person.
Users browse anonymously, sign up, switch devices and share accounts. Identity resolution stitches those sessions together. Getting it wrong inflates user counts and breaks funnels at exactly the signup step you care about.
Why it matters for a product engineer
People browse anonymously, sign up, then come back on another device. If analytics sees three people instead of one, user counts grow and funnels break, often at the signup step. Identity is also a privacy decision: linking activity across devices is something people should know about. A product engineer owns both sides.
How to do it
- Give each visitor an anonymous ID on the first visit.
- At signup or sign-in, call identify with a stable user ID from your database, never an email or a name. The anonymous events then join that person.
- Send server events with the same user ID, so browser and server agree.
- Reset the identity at sign-out, so the next person on a shared device does not join the previous one.
- Decide what you will not link: devices, households, accounts that share a login. Write it down.
- Test it: sign up in a fresh browser, sign in on a second one, and check that one person appears.
Common mistakes
- Calling identify with a value that is not unique, such as “guest” or “undefined”.
- Different user IDs on the client and the server.
- Never resetting, so everyone on a shared computer becomes one person.
- Linking identities in ways the privacy notice does not mention.
Example
This site’s analytics stay anonymous on purpose. A campaign label, such as a newsletter link, stays attached for 30 minutes in one browser tab, so an internal click does not erase it. Nothing links visits across days or devices. So the analytics cannot show whether the same person came back in a second week, which is the product’s real goal. That evidence comes from observed sessions and follow-ups instead.
How one person stays one person through signup
- 04The anonymous events join this person
- 05Servers have no anonymous session
One identify call at signup links the anonymous visits to the person. If the server sends a different ID, one person becomes two.
ReportedPostHog docs, Identifying users
Sources: Identifying users (PostHog docs) ↗ · Identity resolution (PostHog docs) ↗
Resources
2- docsStart here
Identifying users ↗
PostHog docs · 15 minShows exactly when to call identify, how anonymous events get merged, and the mistakes that split one person into two.
- docsGo deeper
Identity resolution ↗
PostHog docs · 12 minTreats identity as an engineering problem across browser, mobile, server and third-party data, which is what it becomes in practice.
Tools
2- ToolOpen source
PostHog
Open-source product analytics with session replay, feature flags, experiments and surveys in one tool.
- ToolFreemium
Twilio Segment
Collects events once and sends them to analytics, marketing and warehouse tools, with tracking plan enforcement.