Do Not Use a Non-Unique Identifier
Passing a non-unique identifier in the identify field, such as 'undefined', 'null', or 'user' will result in all anonymous user data being merged into one user profile. This will destroy the integrity of your data and cannot be undone. Review the Identify Pitfalls section of our Using Identify guide for steps to manage anonymous users.
If you assign the same identity to a user on a separate device, their past sessions and event activity will be merged into the existing Heap user with that identity.
To better understand the client-side
addUserProperties APIs, take a look at our comprehensive guide.
identity: a string that uniquely identifies a user, such as an email, handle, or username. This means no two users in one environment may share the same identity. Must be fewer than 255 characters.