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 fulfill the complex multi-touchpoint user association requirements. For detailed information, please refer to the User ID Introduction in the SDK product functionality section.
API Introduction
This section only introduces the API functions of simple user association.
User Login
When a user registers or logs in successfully, the SDK's login() method should be called.
sensors.login("登录 ID");
To accurately record the behavior information of logged-in users, it is recommended to call the user login method at the following times:
· When a user registers successfully · When a user logs in successfully · Whenever a logged-in user launches the mini-program
Custom Anonymous ID
By default, the SDK generates an anonymous ID and ensures its uniqueness. If you need to replace the default anonymous ID assigned by Sensors Data, you can immediately call the identify("User-defined Anonymous ID") method after initializing the SDK.
//设置自定义匿名 ID,在初始化 SDK 之后立即调用 sensors.identify(“用户自定义匿名 ID ”);