User IDs are important information in many scenarios.
- Mobile Analysis Service (MAS) presets a string-type attribute named
userId. You can log in to the console and go to the Mobile Analysis Service > Custom analysis > Custom configuration > Attribute page to view the attribute details.
- Event tracking logs contain the User ID field. For more information, see Log model > Custom event tracking.
- Event analysis related to user volume (UV) depends on the User ID field.
- When you use the mPaaS Delivery Service to perform App release to the specific whitelist of users in gray release mode, user IDs are required on the client.
A user can use an App before login, which means the user ID may be empty, but the device ID is usually available. In this case, the device ID can be used for user behavior analysis instead of the user ID.
For example, you can specify the user ID or device ID for calculation when using the funnel analysis function. When the user ID is used for calculation, the number of users is the number of distinct user IDs. When the device ID is used for calculation, the number of users is the number of distinct device IDs.
To use the user ID-related analysis functions, you need to call the SDK APIs to set user IDs.
- Avoid using special symbols when setting up user IDs. Numbers and letters are recommended.
- Do not use the device ID read by UTDID as
- Case 1: Call the
If you want to collect the number of registered users of an App, call the
MPLogger.reportUserLogin("userId");API. This API automatically sets the global user ID as the input parameter. No manual operation is required.
- Other cases: Call the
MPLogger.setUserId("userId");API to set a user ID.
For more information, see Active device/user reporting log.
Set the user ID in the Category of
MPaaSInterface. For more information, see Configure a project.
@implementation MPaaSInterface (Demo)
- (NSString *)userId