Users
Identifying and tracking users across events.
A user in Vanta represents a person who triggers events in your application.
Identifying users
Include a userId when sending events to associate them with a user:
typescript: await vanta.track({
await vanta.track({
event: 'purchase',
userId: 'user_123',
data: { product: 'Premium' }
})User properties
Attach properties when identifying a user:
typescript: await vanta.identify({
await vanta.identify({
userId: 'user_123',
properties: {
email: 'sarah@example.com',
plan: 'premium'
}
})User records
Vanta creates a user record when you first send an event with a userId. It tracks firstSeenAt and lastSeenAt timestamps.
User records are scoped to a project. The same userId in different projects creates separate records.