User Association Introduction
When identifying users in simple user association, there are two types of user ID values: anonymous ID and login ID. It cannot meet the requirements of complex multi-touch user association. For more details, please refer to the User Identification Introduction in the SDK product functions section.
API Introduction
This section only introduces the API functions of simple user association. For other tracking interfaces, please refer to the Basic API Introduction.
User Login
When a user successfully registers or logs in, you need to call the SDK's login() method.
sensors.login("登录 ID");
In order to accurately record the behavior information of logged-in users, it is recommended to call the user login method at the following moments:
· When a user registers successfully · When a user logs in successfully · When a logged-in user launches the mini program
Custom Anonymous ID
By default, the SDK will generate an anonymous ID and ensure its uniqueness. If you need to replace the default allocated anonymous ID by Sensors Analytics, you can immediately call the identify("User-defined Anonymous ID") method after initializing the SDK.
//设置自定义匿名 ID,在初始化 SDK 之后立即调用 sensors.identify(“用户自定义匿名 ID ”);