How to Manage User Attributes?
1. What Are User Attributes?
User attributes are core data that describe user characteristics and can be used as filtering criteria in user journeys.
MA supports three types of user attributes: Standard, Recommended, and Custom. You can perform operations such as Add, Edit, and Delete on custom attributes in Metadata Management > Attribute Management > User Attributes.
Attribute Type Descriptions:
Standard Attributes: Predefined by the system, automatically collected by the SDK, or calculated in the background.
Recommended Attributes: Predefined by the system, requiring developers to report via API calls.
Custom Attributes: Created independently based on business needs.
2. How to Create User Attributes
2.1 Page Creation
Supports creating attributes individually or importing in bulk via Excel. Required information and descriptions are as follows:
| Information | Required | Description |
|---|---|---|
| Attribute Name | Required | Name of the reported attribute. Supports lowercase letters, numbers, and underscores, and must start with a letter (e.g., open_app). Cannot be changed once set. |
| Attribute Description | Required | A clear explanatory note for the attribute, up to 50 characters. Can be modified after being set. |
| Data Type | Required | - |
2.2 API Creation
Call the API to report attributes freely. If an attribute does not exist, it will be automatically created upon reporting.
Available APIs for reporting user attributes: Android API, iOS API, Web API, Rest API.
3. What Are the Statuses of User Attributes?
Custom user attributes are set to Visible by default after creation. You can adjust their status at any time based on business needs.
| Status | Description |
|---|---|
| Visible | Displayed in attribute filters and can receive attribute reports. |
| Hidden | Not displayed in attribute filters but can receive attribute reports. |
| Disabled | Not displayed in attribute filters and cannot receive attribute reports. |
4. What Data Types Are Supported for User Attributes?
| Data Type | Description |
|---|---|
| STRING | String type, e.g., "User Name" is typically set as STRING. |
| NUMBER | Numeric type, supporting integers and decimals, e.g., "Purchase Count" is typically set as NUMBER. |
| BOOL | Boolean type, supporting True/False, e.g., "Is VIP Member" is typically set as BOOL. |
| DATETIME | Date and time type, supporting ISO8601 format data, e.g., "Account Registration Time" is typically set as DATETIME. |
| LIST | Collection type, i.e., an array of string elements (e.g., ["Tesla", "Volkswagen", "Audi"]), e.g., "Interest Tags" is typically set as LIST. |
5. How Are User Attributes Updated?
Unlike one-time event attributes, the system creates and maintains a dynamic "User Attribute Table" for each user, which is continuously updated as you call user attribute APIs.
5.1 Data Viewing and Tracing
- User Attributes Page: View all current attribute values for a user in User Management > User Details > User Attributes.
- Event Details Page: Trace a snapshot of user attributes at the moment a specific event occurred in User Management > User Details > User Activity > Event Details.
- Attribute Update History: Query the history of each attribute change (values before and after the change) in User Management > User Details > User Activity > Attribute Update History.
5.2 Supported Update Methods
To support diverse business scenarios, we provide five flexible attribute update APIs:
| Method | Description |
|---|---|
| set | Overwrite the attribute value. |
| increase | For integer-type attributes, accumulate all reported data. If the attribute did not previously exist, the initial value is treated as 0. |
| add | For LIST-type attributes, append a specific value. |
| remove | For LIST-type attributes, remove a specific value. |
| delete | Delete all values of the attribute. |
For specific calling methods, please refer to the API documentation for each platform (Android / iOS / Web / Rest API) or contact Customer Support for details.
