User identification
Create Organization-scoped identities and aliases.
Identities belong to the Organization, not to a single Project. Use your own stable user id and optional aliases:
await emitkit.identify({
userId: "user_123",
properties: { email: "john@example.com", plan: "pro" },
aliases: ["john@example.com"],
});
Identifying the same userId again merges the new properties into the
stored ones: new values replace old ones, and keys you leave out are kept. An
alias moves to the identity that claimed it most recently. The result lists
the aliases this call newly claimed.
An event can use the canonical id or an alias in userId. To honour an
erasure request:
await emitkit.identities.delete("user_123"); // properties and aliases are gone
See Erasing a user for what happens to past events.