Search K
Appearance
Appearance
The identity feature allows you to enrich user profiles by adding key-value properties. This feature is optional but valuable for obtaining a more detailed user profile, enabling filtering and searching based on these properties.
For example, you can attach a user's email address, plan information, or last payment date to their profile. Later, you can use these properties to filter and search for specific user segments, such as finding all users on a particular plan.
To publish a user's identity in Palzin Track, you will need to make HTTP POST requests to the designated log endpoint. Here's how to get started:
https://api.palzin.live/v1/identity
To add identity along with associated properties in Palzin Track, follow these guidelines when crafting your request:
Header
Content-Type | Header | application/json |
Authorization | Header | Your Authorization Token |
Body
project* | String | Project name |
user_id* | String | User ID |
properties | Key/Value | User Properties |
{
// Response
}
{
// Response
}
TIP
Important: Fields ending with an (*) are required in your request!
It's important to note that property keys can override each other. For example, consider users who start with a free trial and then upgrade to a paid plan. To keep track of the user's current plan and other properties like their name and email address, you should call the identity endpoint when the user signs up and again when they upgrade to a paid plan.
{
"project": "my-project",
"user_id": "12345",
"properties": {
"plan": "free",
"name": "John Doe",
"email": "[email protected]",
"username": "johndoe"
}
}
{
"project": "my-project",
"user_id": "12345",
"properties": {
"plan": "free",
"name": "John Doe",
"email": "[email protected]",
"username": "johndoe"
}
}
Later, when the user upgrades to a paid plan, call the identity endpoint again with the updated plan value:
{
"project": "my-project",
"user_id": "12345",
"properties": {
"plan": "business"
}
}
{
"project": "my-project",
"user_id": "12345",
"properties": {
"plan": "business"
}
}
Note that property keys may only contain lowercase alphabet characters and are optionally separated with hyphens also referred as dashes(-). For example, plan and plan-type are valid property keys, but Plan and plan_type are not. Values may be any string, boolean, or number.