SDK reference
Identify users
Pass your user's ID once they sign in, and their visits join one profile with their name and email.
Set traits
Traits are flat values: strings, numbers, booleans or null. Update them by calling identify() again, and remove one by setting it to null. With the provider, change traits instead.
identify(user.id, { plan: "enterprise", trial_ends_at: null });Display names and emails are encrypted at rest.
Attribute revenue to the user
With the Stripe integration, put the user ID in payment metadata:
await stripe.paymentIntents.create({ amount, currency, metadata: { databuddy_profile_id: user.id } });Group users by company
Users identified with an email are grouped by their work email domain on the Accounts page, with the company's name and logo when they can be found. To group them by your own workspaces, with plan and billing, see Accounts.
Related
How is this guide?