Skip to main content

Third-party data

Last updated 10/03/2026
note

If the version of the data collection SDK is lower than 3.0.0, use plugin version 1.3.0. If the version of the data collection SDK is 3.0.0 or later, use a plugin version later than 2.0.0

implementation 'cn.thinkingdata.android:TAThirdParty:2.0.2'

The following sample code syncs data from multiple platforms:

TDAnalytics.enableThirdPartySharing(TDThirdPartyType.APPS_FLYER | TDThirdPartyType.ADJUST);

To add extra parameters, you can use enableThirdPartySharing(int var1, Map<String, Object> var2). This API doesn't support bitwise operations

If the SDK version is <=1.20 and you use ProGuard, add the following to the configuration file to prevent the feature from failing:

-dontwarn cn.thinkingdata.thirdparty.**
-keep class cn.thinkingdata.thirdparty.** { *; }
-keep class cn.thinkingdata.module.routes.** { *; }

1. Appsflyer​

Call the API before the AppsFlyer SDK calls the start method:

TDAnalytics.enableThirdPartySharing(TDThirdPartyType.APPS_FLYER);

After the user registers or creates a character (optional):

TDAnalytics.login("account_id")
TDAnalytics.enableThirdPartySharing(TDThirdPartyType.APPS_FLYER);

Each time you call the AE login or identify method, you also need to call enableThirdPartySharing to update the user identifier.

Note: Each call to AppsFlyer's setAdditionalData overwrites the user identifier that was set. You can set parameters through the enableThirdPartySharing method that we provide:

Map<String, Object> additionalData = new HashMap<>();
additionalData.put("af_test_key1", "test1");
additionalData.put("af_test_key2", "test2");
TDAnalytics.enableThirdPartySharing(
TDThirdPartyType.APPS_FLYER,
additionalData
)

2. Adjust​

Call this before the Adjust SDK is initialized:

TDAnalytics.enableThirdPartySharing(TDThirdPartyType.ADJUST);

After the user registers or creates a character (optional):

TDAnalytics.login("accoount_id")
TDAnalytics.enableThirdPartySharing(TDThirdPartyType.ADJUST);

3. Branch​

Call this before Branch initializes the session:

TDAnalytics.enableThirdPartySharing(TDThirdPartyType.BRANCH);

After the user registers or creates a character (optional):

TDAnalytics.login("accoount_id")
TDAnalytics.enableThirdPartySharing(TDThirdPartyType.BRANCH);

4. TopOn​

Call this before ATSDK.init:

TDAnalytics.enableThirdPartySharing(TDThirdPartyType.TOP_ON);

If you call the AE login or identify multiple times, call enableThirdPartySharing again to sync the data.

Note: Each call to TopOn's initCustomMap overwrites the user identifier that was set. You can set parameters through the enableThirdPartySharing method that we provide:

Map<String, Object> customMap = new HashMap<>();
customMap.put("key1", "value1");
customMap.put("key2", "value2");
TDAnalytics.enableThirdPartySharing(TDThirdPartyType.TOP_ON, customMap);

5. Tradplus​

Call this before TradPlusSdk.initSdk:

TDAnalytics.enableThirdPartySharing(TDThirdPartyType.TRAD_PLUS);

6. IronSource​

Call this after IronSourceSdk is initialized:

TDAnalytics.enableThirdPartySharing(TDThirdPartyType.IRON_SOURCE);

7. AppLovin​

  • Impression level

Call this before AppLovinSdk is initialized:

TDAnalytics.enableThirdPartySharing(TDThirdPartyType.APPLOVIN_IMPRESSION);
  • User level

To get monetization data, create a MaxAdRevenueListener and override the onAdRevenuePaid() method. In this method, get the monetization data and report it through enableThirdPartySharing of the AE SDK. Finally, pass the listener to setRevenueListener(). The sample code is as follows:

void onAdRevenuePaid(final MaxAd ad){
TDAnalytics.enableThirdPartySharing(TDThirdPartyType.APPLOVIN_USER,ad);
}
Was this page helpful?