This article provides a comprehensive reference for the userorbit.identify() API method, detailing its required parameters, standard and custom properties, and best practices for its use in personalizing user experiences and targeting in-app content.
Use
identify() to associate the current SDK session with a known application user.Identify a user
await userorbit.identify(user.id, {
email: user.email,
name: user.name,
attributes: {
plan: user.plan,
role: user.role,
},
});JavaScriptInit-time identity
You may includeuserId, email, name, and attributes in the first init() call when identity is already known. For authentication changes after initialization, prefer identify().Update fields
UsesetEmail(email) for email and setAttribute(key, value) for one custom attribute.Sign-out
Calllogout() when the known user signs out. Use reset() when you need to clear local SDK state, such as an account switch on a shared browser.