1. User Association Introduction

When identifying users through simple user association, there are two types of user IDs: device ID (anonymous ID) and login ID. They cannot meet the complex user association requirements. For detailed information, please refer to User Identification Introduction in the SDK product features section.

2. API Introduction

This section only introduces the API functions of simple user association. For other tracking interfaces, please refer to uni-app Sensors Analytics JS Plugin.

When a user registers or logs in successfully, you need to call the SDK's login() method.

sensors.login("登录 ID");
JS

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 · Each time a logged-in user starts the app

2.1. Custom Anonymous ID

By default, the SDK generates an anonymous ID and guarantees its uniqueness. If you need to replace the default anonymous ID assigned by Sensors Analytics, you can immediately call the identify("User-defined anonymous ID") method after initializing the SDK to perform the replacement.

//设置自定义匿名 ID,在初始化 SDK 之后立即调用 sensors.identify(“用户自定义匿名 ID ”);
CODE