Node SDK

identify

Associate server-side behavior with a known user.

userId or anonymousId is required. Use identify after login, signup, account changes, and safe trait updates. Do not send passwords, tokens, raw profile fields, or authentication payloads.

Reserved traits#

Use reserved traits only for their intended meanings. Custom traits are also supported.

TraitTypeDescription
addressobjectUser address; may contain city, country, postalCode, state, or street.
agenumberUser age.
avatarstringURL to the user avatar.
birthdaydateUser birthday.
companyobjectCompany represented by the user; may contain name, id, industry, employee_count, or plan.
createdAtdateDate the user account was created; use ISO-8601.
descriptionstringUser description.
emailstringUser email address.
firstNamestringUser first name.
genderstringUser gender.
idstringUnique user ID in your database.
lastNamestringUser last name.
namestringUser full name.
phonestringUser phone number.
titlestringUser title, usually a position.
usernamestringUnique user username.
websitestringUser website.

Optional fields are context, timestamp, integrations, and messageId. The callback, when supplied as the second argument, runs after dispatch processing.