目录
此内容是否有帮助?

# Third-party Integrations

Install using CocoaPods

pod 'TAThirdParty'

The sample codes for the synchronization of multiple platform data are as follows:

[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing:TDThirdPartyShareTypeAPPSFLYER | TDThirdPartyShareTypeADJUST |TDThirdPartyShareTypeTRADPLUS | TDThirdPartyShareTypeTRACKING | TDThirdPartyShareTypeTOPON | TDThirdPartyShareTypeBRANCH | TDThirdPartyShareTypeIRONSOURCE];

enableThirdPartySharing:customMap, an API that does not support bitwise operation, can be used to add additional parameters.

# 1. AppsFlyer

Call this API before AppsFlyer SDK calls the Start API:

[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing: TDThirdPartyShareTypeAPPSFLYER];

After the created role is registered (optional):

[[ThinkingAnalyticsSDK sharedInstance] login:@"account_id"];
[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing: TDThirdPartyShareTypeAPPSFLYER customMap:@{@"ta_data11":@"ta_value11"}];

Every time you call the login or identify , you need to call enableThirdPartySharing synchronously to update the user ID.

Note: Since AppFlyer's setAdditionalData is called each time, the user ID will be overwritten. You can set parameters via the enableThirdPartySharing API we provide:

NSDictionary *dic = @{@"af_test_key1": @"test1",@"af_test_key2": @"test2"};
[AppsFlyerLib.shared setAdditionalData:dic];

Since previous parameters would be replaced if setAdditionalData is called multiple times, the parameters could be transmitted to TE, and the TE SDK would merge the parameters.

NSDictionary *dic = @{@"af_test_key1": @"test1",@"af_test_key2": @"test2"};
[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing: TDThirdPartyShareTypeAPPSFLYER customMap: dic];

# 2. Adjust

To be called before Adjust SDK initialization:

[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing:TDThirdPartyShareTypeADJUST];

After the created role is registered (optional):

[[ThinkingAnalyticsSDK sharedInstance] login:@"account_id"];
[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing:TDThirdPartyShareTypeADJUST];

# 3. Branch

To be called before the Branch initialize the session:

[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing:TDThirdPartyShareTypeBRANCH];

After the created role is registered (optional):

[[ThinkingAnalyticsSDK sharedInstance] login:@"account_id"];
[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing:TDThirdPartyShareTypeBRANCH];

# 4. TopOn

To be called before ATSDK.init:

[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing:TDThirdPartyShareTypeTOPON];

Every time you call the login or identify , you need to call enableThirdPartySharing synchronously to update the user ID.

Note: Since TopOn's initCustomMap is called each time, the user ID will be overwritten. You can set parameters via the enableThirdPartySharing API we provide:

NSDictionary *dic = @{@"af_test_key1": @"test1",@"af_test_key2": @"test2"};
[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing:TDThirdPartyShareTypeTOPON customMap: dic];

# 5. ReYun

To be called after the account is registered:

[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing:TDThirdPartyShareTypeTRACKING];

# 6. TradPlus

To be called before TradPlus SDK initialization.:

[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing:TDThirdPartyShareTypeTRADPLUS];

# 7. IronSource

To be called before IronSource SDK initialization:

[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing: TDThirdPartyShareTypeIRONSOURCE];

# 8. AppLovin

To be called after AppLovin SDK initialization.

[[ThinkingAnalyticsSDK sharedInstance] enableThirdPartySharing: TAThirdPartyShareTypeAPPLOVIN];