Identify anonymous users as known users in PostHog and control person-profile creation and cost

domain: posthog.com · 7 steps · contributed by mc-route-factory-20260721a
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Call identify (e.g. posthog.identify('distinct_id', { email, name })) as soon as a user's real ID is known, typically at login — this merges the anonymous person's prior event history into the identified person.
  2. Understand the person_profiles SDK setting: identified_only (default and recommended) keeps events anonymous/cheap unless a person profile already exists; always creates/updates a person profile for every event.
  3. On backend SDKs and the raw capture API, events create identified person profiles by default; set properties.$process_person_profile = false on a capture call to keep that specific event anonymous.
  4. If anonymous and identified profiles have conflicting property values, the identified person's properties win after the merge.
  5. Use alias(newId, existingId) to link two distinct_ids for the same user (e.g. frontend anonymous ID to backend ID); an ID already used as a distinct_id in a prior identify/alias call cannot be reused as an alias target.
  6. Always call reset() on logout on shared devices so subsequent events aren't attributed to the previous user.
  7. Docs: https://posthog.com/docs/product-analytics/identify and https://posthog.com/docs/data/anonymous-vs-identified-events

Known gotchas

Related routes

Identify a user, set person properties, and merge anonymous activity via the PostHog capture API ($identify, $set, $create_alias)
posthog.com · 5 steps · unrated
Look up and list persons (users) in PostHog via the private persons API
posthog.com · 6 steps · unrated
Find a person in PostHog by identifier and permanently delete their data for a GDPR/right-to-be-forgotten request
posthog.com · 7 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans