Usually when conducting user behavior data analytics, there may be a variety of identification IDs we use to identify users, such as mobile phone number, application account number, user device ID, etc. DataFinder presets the commonly used user identification ID types for you, and also supports you to add more ID types. It also provides you with ID-MAPPING computing capabilities, MAPPING calculations for multiple types of IDs, and uses ssid to restore a real natural person as much as possible to improve the accuracy and reliability of the data. This article shows you how to use the multi-ID type feature.
Attention segmentation | Detailed description |
|---|---|
function switch | This feature is for advanced use and is currently available on demand for customers with relatively complex business needs.
|
binding relationship |
warning Since an app only supports binding one principal, if you need to use the multi-principal feature to perform data analytics on multiple agents, you need to create multiple apps in your project, each binding one principal. |
Other related products | When using the multi-agent function, you also need to activate the CDP product at the same time. |
See more about the functional logic of multi-ID types Multi-Application/ Multi-Agent/ Multi-ID Type Overview.
You need to research and plan the business scenarios for analysis first, plan how many business applications there are, how many ID types there may be, and the binding relationship between them, etc., output the corresponding ID design scheme, and then report and analyze the data according to the ID design scheme.
The following is an example of a bank app reporting a multi-user ID caliber to provide you with an example of the summary process and key points of research and planning.
Sort out the current status of ID data. Conduct research according to business system requirements, collect user ID types that need to be reported, such as customer numbers and mobile phone numbers, and design ID schemes according to business scenarios (ID types, priority relationships between IDs, and which IDs to report in different application scenarios).
After enabling the multi-ID type function, you need to contact the DataFinder technical support staff to add the required ID type in the background configuration according to the ID design plan.
tip
DataFinder presets five ID types for you: ssid, uer_unique_id, device id (web_id, device_id, anonymous_id), and other ID types can be added by technical support personnel background configuration.
The ID type is currently lowercase only and can be joined between characters by _.
Take the banking app as an example, add two user id types: cust_num and phone.
After enabling the multi-ID type function, when reporting the ID value of the user ID, you need to mark clearly which ID type the reported ID data is.
warning
When reporting the multi-caliber ID, please make sure that the ID type has been configured in the background. After the unconfigured ID type is reported, the data will be directly discarded at the receiving end, and will not be displayed in the error message of user scrutiny and data management .
If switching between user_unique_id_type is involved in an app with a login status, be sure to reset user_unique_id and user_unique_id_type before reporting the new ID type. To avoid ssid association/generation errors.
Each end of the DataFinder supports the ID type of the ID data when reporting multi-ID caliber data. Take the bank app reporting the user ID as the customer number as an example. The user ID configuration code examples of each end are shown below. For other code descriptions of events, please refer to the data access documentation of each end.
window.collectEvent('config', { user_unique_id: '12345656788888' // The actual value of the business id user_unique_id_type: 'cust_num' // user id type. Same id design scheme })
See the Data Access SDK for more information Web/JavaScript SDK Integration.
$$Rangers.config({ user_unique_id: '12345656788888',// The actual value of the business id user_unique_id_type: 'cust_num',// user id type. Same id design scheme });
See the Data Access SDK for more information Mini Program SDK Integration.
@param uniqueID user id, unless there are special requirements, please do not pass empty strings or strings containing only spaces @param type user id type AppLog.setUserUniqueID(String uuid, String uuidType)
Configuration example:
//The second parameter cust_num is enumeration value of the id type, the same as the id design scheme AppLog.setUserUniqueID("12345656788888" ,"cust_num");
See the Data Access SDK for more information Android SDK Integration.
*! @abstract configure when UserUniqueID changes @discussion If there is a value, set it as the ID value; Please call [BDAutoTrack clearUserUniqueID] or pass nil when logging out @discussion SDK will be saved, hence configure it only when changes. @param uniqueID user id, unless there are special requirements, please do not pass empty strings or strings containing only spaces @param type user id type @return whether configure successfully or logout successfully. */ - (BOOL)setCurrentUserUniqueID:(nullable NSString *)uniqueID withType:(nullable NSString *)type;
Configuration example:
//The second parameter cust_num is enumeration value of the id type, the same as the id design scheme [[BDAutoTrack sharedTrack] setCurrentUserUniqueID:@"12345656788888" withType:@"cust_num"];
See the Data Access SDK for more information iOS SDK Integration.
In the user section of the event report, report the ID type by adding user_unique_id_type fields.
Configuration example:
{ "user": { "user_unique_id": "12345656788888", "user_unique_id_type": "cust_num" }, "header": { //omit }, "events": [ //omit ] }
See the Data Access SDK for more information Java SDK.
The basic aperture switching is achieved in the above way, but in some scenarios, we can obtain other ID types associated with the subject. To ensure the accuracy of the association, we recommend setting the id bind to report the relationship between the caliber and the caliber in real time.
The timing of id binding: It is recommended that the ID relationship be bound as much as possible before reporting the event, such as binding the ID relationship through the data in the business system through the Http API. If it is reported by the end side, and the user login status can be obtained before the user needs to bind the ID relationship, it can be bound first, and the login status (user_uniqe_id) setting is performed in the successfully bound callback function ( refer to Android example ).
Taking the ID binding of a bank app as an example, the configuration points and examples of each end are as follows:
warning
Js SDK 5.2.0 version later support, specific reference to SDK access documentation, the core part of the code example is as follows.
window.collectEvent('bindToken', { phone: '1230000000' //key is an enumeration value of type id, the same as the id design scheme cust_num: '12345656788888' //key is an enumeration value of type id, the same as the id design scheme }, (result) => { //Operation follow-up processing according to status })
See the Data Access SDK for more information Web/JavaScript SDK Integration.
$$Rangers.bind({ phone: '1230000000',//key is an enumeration value of type id, the same as the id design scheme cust_num: '12345656788888'//key is an enumeration value of type id, the same as the id design scheme }).then((status) => { //Business operation follow-up processing according to status });
See the Data Access SDK for more information Mini Program SDK Integration.
Client side currently supports android/ios versions after 6.14.1.
@interface BDAutoTrack (OneID) - (void)bind:(NSDictionary<NSString *,NSString *> *)idmappings completion:(void (^)(BOOL success,NSError *error))completion; @end
Example:
NSDicitionary *idMappings = @{ @"phone":@"1230000000", //The first parameter phone is an enumeration value of type id, the same as the id design scheme @"cust_num":@"12345656788888" //The first parameter cust_num the enumeration value of the id type, the same as the id design scheme } [BDAutoTrack.sharedTrack bind:idMappings completion:^(BOOL success, NSError *error) { if (success) { // } }];
See the Data Access SDK for more information iOS SDK Integration.
Client side currently supports android/ios versions after 6.14.1.
// Bind API interface IDBindCallback { void onSuccess(IDBindResult result); void onFail(int code); } class IDBindResult { String newSsid; String failedIdList; } // AppLog void bind(Map<String, String> identities, IDBindCallback callback);
Example:
Map<String, String> ids = new HashMap<String, String> ids.put("phone", "1230000000"); //The first parameter cust_num the enumeration value of the id type, the same as the id design scheme ids.put("cust_num", "12345656788888"); //The first parameter cust_num the enumeration value of the id type, the same as the id design scheme AppLog.bind(ids, new IDBindCallback() { void onSuccess(IDBindResult result) { // Request successful and set login status AppLog.setUserUniqueID("12345656788888" ,"cust_num"); } void onFail(int code) { // binding request failed } });
See the Data Access SDK for more information Android SDK Integration.
Server level ID binding is done by reporting special events:
Example:
{ "user": { "user_unique_id": "__rangers" // fixed format and value }, "header": { "app_id": "1000****" //required }, "events": [ { "event": "__id_bind", // fixed format and value "local_time_ms": 1668755974348, //timestamp of current time "params": { "phone": "1230000000",// key is an enumeration value of type id, the same as the id design scheme "cust_num": "12345656788888", // key is an enumeration value of type id, the same as the id design scheme } } ] }
See the Data Access SDK for more information Java SDK.
After enabling the function of configuring multiple ID types, when you conduct event analysis in the future, the different types of ID data reported by the same natural person will be related to the same ssid through the ID-MAPPING calculation of DataFinder, and a natural person will be identified through the ssid as accurately and truly as possible to improve the accuracy and reliability of the data.
In the User Detail section, you can either perform cross-ID event queries for the same user through the generated ssid, or you can switch the ID type (you can select the ID type configured by the ID scheme), and query only the event tracking events reported by this ID through the reported business ID.