Add traits about an identified user

LogRocket.identify also takes a JSON object ad an optional second argument. This object can contain any key/value pair of data that you'd like to associate with the given user.

Specify Name and Email Address

If the name or email keys are given they will be displayed instead of the UID in the UI. They can also be used in the search box to quickly find user sessions:

LogRocket.identify('123456', {
  name: 'John Smith',
  email: '[email protected]',
});

Specify other user traits

Other user information can also be given. This information will not be displayed in the session list directly, but can used for searching through sessions using a User Traits filter. They will also be displayed in the user details section of the session playback.

LogRocket.identify('123456', {
  name: 'Jane Smith',
  email: '[email protected]',
  age: 43,
  favoriteColor: 'blue',
  currentSubscription: 'professional-plan',
});

🚧

Custom user data is identified on the user and will be the same across all of their sessions. Use LogRocket.track() to add information to individual sessions.