Third-party data
Latest version: v0.3.5
Update time: 2025-02-10
Downloads: Source code Framework download
Integrate with CocoaPods:
pod 'TAThirdParty'
ThinkingSDK supports third-party data integration starting from v2.8.0. The following sample code syncs data from multiple platforms:
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeAppsFlyer | TDThirdPartyTypeAdjust | TDThirdPartyTypeTradPlus | TDThirdPartyTypeTracking | TDThirdPartyTypeTopOn | TDThirdPartyTypeBranch | TDThirdPartyTypeIronSource];
To add extra parameters, you can use
enableThirdPartySharing:customMap. This API doesn't support bitwise operations
1. Appsflyer
Call the API before the AppsFlyer SDK calls the start method
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeAppsFlyer];
After the user registers or creates a character (optional)
[TDAnalytics login:@"account_id"];
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeAppsFlyer properties:@{@"ta_data11":@"ta_value11"}];
Each time you call the AE login method or setDistinctId method, you also need to call enableThirdPartySharing to update the user identifier.
Note: Each call to AppFlyer's setAdditionalData overwrites the user identifier that was set. You can set parameters through the enableThirdPartySharing method that we provide:
NSDictionary *dic = @{@"af_test_key1": @"test1",@"af_test_key2": @"test2"};
[AppsFlyerLib.shared setAdditionalData:dic];
Because each call to setAdditionalData overwrites the previous parameters, you can pass the parameters to AE, and the SDK concatenates and merges them internally
NSDictionary *dic = @{@"af_test_key1": @"test1",@"af_test_key2": @"test2"};
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeAppsFlyer properties:dic];
2. Adjust
Call this before the Adjust SDK is initialized
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeAdjust];
After the user registers or creates a character (optional)
[TDAnalytics login:@"account_id"];
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeAdjust];
3. Branch
Call this before the Branch SDK is initialized
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeBranch];
After the user registers or creates a character (optional)
[TDAnalytics login:@"account_id"];
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeBranch];
4. TopOn
Call this before ATSDK is initialized:
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeTopOn];
If you call the AE login or setDistinctId multiple times, call enableThirdPartySharing again to sync the data.
Note: Each call to TopOn's setCustomData overwrites the user identifier that was set. You can set parameters through the enableThirdPartySharing method that we provide:
NSDictionary *dic = @{@"test_key1": @"test1", @"test_key2": @"test2"};
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeTopOn properties:dic];
5. TradPlus
Call this before TradPlusSdk is initialized
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeTradPlus];
6. ironSource
Call this after IronSourceSdk is initialized
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeIronSource];
7. AppLovin
- Impression level
Call this after AppLovinSdk is initialized
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeAppLovin];
- User level
To get monetization data, implement -[MAAdRevenueDelegate didPayRevenueForAd:]. In this method, get the monetization data and report it through enableThirdPartySharing of the SDK. The sample code is as follows:
- (void)didPayRevenueForAd:(MAAd *)ad {
//Get the ad data
NSDictionary *adInfo = @{
@"ad_id": ad.adUnitIdentifier,
@"revenue": @(ad.revenue),
@"countryCode": [[[ALSdk shared] configuration] countryCode],
@"networkName": ad.networkName,
@"adUnitId": ad.adUnitIdentifier,
@"adFormat": ad.format,
@"placement": ad.placement
};
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeAppLovin];
[TDAnalytics track:@"appLovin_sdk_ad_revenue" properties:adInfo];
}

