What is a custom user ID
The custom User ID is an identifier that should be set for each of your users. It will allow you to use our Segment API.
Anything that can identify a user uniquely will work. It can be:
- A unique ID you are using in your login system.
- An email address.
- A username.
- Otherwise, you will need to create a stable identifier for your app. The most common way to do that is to generate a RFC4122 UUID.
We suggest you to hash this information before setting it.
Why using a custom user ID
We strongly recommend providing this custom user identifier to be able to use our Herow Segment API to target specific user profiles from your database (e.g. users who have a premium plan) and engage them with specific content while creating a campaign on Herow. Without this custom user id, it might be difficult to match user identifier between your database and Herow database -to know more about which user IDs we manage, read our API Segment documentation-.
Setting custom user ID
To set a custom user ID, you should make the following call as soon as the user is logged:
If the user logout, you can use the removeCustomId method.