1. Introduction to Global User Association

Refer to the Identify Users - Global User Association in the SDK product features section.

2. API Introduction

Only the API functions for global user association are introduced in this section. For other tracking interfaces, refer to the Introduction to Basic API Functions.

Minimum Supported Versions for ID-Mapping 3.0

Android SDK v6.3.0
iOS SDK v4.3.0

2.1. User Login

Called when a user logs in. The first parameter is obtained from the detailed predefined ID key list, detailed predefined ID key list, and the second parameter is the corresponding user ID.

After the interface is called, the corresponding key and value will be cached locally, and the collected events will include the cached ID information.

 var sensorsApiCloudSdk = api.require('sensorsAnalyticsAPICloudSDK'); sensorsApiCloudSdk.loginWith({ key: 'mobile', id: '133XXXXXXXX' });
JAVA

2.2. Multi-user ID Association

Used when associating multiple user IDs. The first parameter is obtained from the detailed predefined ID key list, detailed predefined ID key list, and the second parameter is the corresponding associated user ID.

After the interface is called, the corresponding key and value will be cached locally, and the collected events will include the cached ID information.

var sensorsApiCloudSdk = api.require('sensorsAnalyticsAPICloudSDK'); sensorsApiCloudSdk.bind({key:'mobile',value:'133XXXXXXXX');
JAVA

2.3. Multi-user ID Disassociation

Used when disassociating multiple user IDs. The first parameter is the key to be disassociated, and the second parameter is the corresponding disassociated user ID.

After the interface is called, relevant unbinding events will be sent, and the corresponding key-value in the locally cached ID information will be cleared (if it exists).

var sensorsApiCloudSdk = api.require('sensorsAnalyticsAPICloudSDK'); sensorsApiCloudSdk.unbind({key:'mobile',value:'133XXXXXXXX');
JAVA

2.4. Get User ID

Get the ID of the global user.

var sensorsApiCloudSdk = api.require('sensorsAnalyticsAPICloudSDK'); var identities = sensorsApiCloudSdk.getIdentities();
JAVA