Skip to main content

TradPlus device-level data report API

Last updated 10/03/2026
tip

Note that data generated by third-party data integration counts toward the cluster's data consumption

Summary​

Interface overview​

InterfaceTypeGranularityAttributionCostRevenueImpressionsClicksConversions
Device-level data report APIAPIUser level✅✅✅

The device-level data report API provides user-level ad monetization data, including metrics such as users' ad impressions, clicks, and revenue on a given day.

Integration process​

  1. Integrate the TradPlus client SDK and the AE SDK, and set the AE user identification IDs in the TradPlus SDK
  2. Log in to the TradPlus dashboard and get the Access Token and app ID
  3. Log in to the AE backend, go to the Third-party Integration module, and add a TradPlus device-level data report API integration plan
  4. Check whether the AE system receives the data successfully, and build reports

1. Client SDK configuration​

The first step in integrating TradPlus data is to connect the AE SDK with the TradPlus SDK on the client and set the AE system's user identification IDs in the TradPlus SDK

1.1 Option 1 (automatic integration)​

  • If you integrate the Android or iOS SDK:

  • If you integrate Unity SDK 2.4.0 or later, or Unreal SDK 1.5.0 or later, you can use this option directly

tip

Note that AE SDK initialization and the code that enables automatic integration must run before the TradPlus SDK is initialized. Follow these steps:

1. Initialize the AE SDK.

2. Call `enableThirdPartySharing` to set the distinct ID automatically.

3. Initialize the TradPlus SDK.

The following are code samples for the SDK on each platform:

// 1. Initialize the Android SDK
TDConfig config = TDConfig.getInstance(this, APPID, TE_SERVER_URL);
TDAnalytics.init(config);
// 2. Call the enableThirdPartySharing API to set ta_distinct_id in TradPlus events
TDAnalytics.enableThirdPartySharing(TDThirdPartyType.TRAD_PLUS);
// 3. Initialize the TradPlus SDK
// ...

This option works by automatically calling an internal TradPlus method to pass the distinct ID of the AE SDK into userId of the TradPlus SDK (one of the parameters returned by the device-level data report API).

1.2 Option 2 (manual integration)​

With manual integration, you can use the AppKeyManager.CUSTOM_USERID (Android) or dicCustomValue (iOS) method of TradPlus to pass the AE distinct ID into userId of the TradPlus SDK (one of the parameters returned by the device-level data report API).

tip

Note (very important): AE SDK initialization and the dicCustomValue /initCustomMap call must run before the TradPlus SDK is initialized. Follow these steps:

1. Initialize the AE SDK.

2. Call ` dicCustomValue ` / ` initCustomMap` to set the distinct ID.

3. Initialize the TradPlus SDK.

The following are manual integration code samples for the SDK on each platform:

// 1. Initialize the Android SDK
TDConfig config = TDConfig.getInstance(this, APPID, TE_SERVER_URL);
TDAnalytics.init(config);
// 2. Get the AE distinct ID, which corresponds to #distinct_id in AE
String distinctId = TDAnalytics.getDistinctId();
// 3. Set the distinct ID in events collected by TradPlus
HashMap<String, String> customMap = new HashMap<>();
customMap.put(AppKeyManager.CUSTOM_USERID, distinctId);
//Set an app-level rule that applies to all placements
SegmentUtils.initCustomMap(customMap);
// 4. Initialize the TradPlus SDK
// ...

2. Get information from the TradPlus dashboard​

After completing the SDK configuration, log in to the TradPlus dashboard and get the Access Token and app ID

  • To get the Access token, go to My Account - Report API key in the TradPlus dashboard and click Generate key
  • You can find the app ID under App Management - Apps & Placements

3. Plan configuration​

After you complete the SDK configuration and get the Access Token and app ID, log in to the AE system and configure the new plan in the Third-party Integration module. The image below shows the configuration page of the TradPlus device-level data report API. Follow this section to create the plan:

3.1 Authorization information configuration​

Click the Configure authorization information button under Authorization Information, and enter the information you obtained during authorization in the pop-up

3.2 Sync Schedule​

In the Sync Schedule module, you can set the policy for the AE system to pull the TradPlus device-level data report API on a schedule. You can choose to pull data for a period of time at a specific time every day or every hour. Because pulled data also counts toward the data volume, avoid pulling data for overly long periods on a schedule

3.3 Pull time zone​

You can also set the time zone of the pulled data. The default is UTC+8

3.4 User identification fields​

Because the TradPlus device-level data report API provides user-level data, you need to set user identification rules for it, that is, the AE system's user identification IDs set in the TradPlus SDK. Based on this configuration, the AE system sets these fields as the user identification fields of the data when it converts the callback data.

If you configured the client SDK as described in the previous step of this document, use the following configuration:

  • Field associated with the account ID: none
  • Field associated with the distinct ID: user_id

3.5 Event Data Configuration​

After you turn on the Event Data Configuration switch, all data sent back is written to the event table. We recommend that you enable event data ingestion.

3.6 User Properties Configuration​

By default, the AE system does not write data from the TradPlus device-level data report API to user properties. If you want to write some fields to the user table, first turn on the rule so that it runs, and then use Property Mapping to add the fields to be written to the user table. For Source Property, enter the ingestion name of the field:

3.7 Configuration​

In the Configuration module, you can control the detailed settings of data pulling, such as the event name after ingestion

The content of the configuration is a JSON, which you can customize as follows:

ModuleNameDescription
sink_eventevent_nameEvent name after ingestion; customizable
transferdouble_columnsMetric fields. Do not modify

3.8 Event ingestion rules​

  • The dateTimeStamp field in the data, that is, the data timestamp, is used as the event's #event_time
  • The event name is tradplus_device_report
  • All other fields are stored. The following are all the event properties that are stored
FieldTypeRemarks
#zone_offsetintTime zone, that is, the time zone used in the request
currencyStringCurrency
appidStringApp ID (TradPlus)
placement_idStringAd placement ID (TradPlus)
placement_nameStringAd placement name (TradPlus)
ad_formatIntAd placement type
ad_format_nameStringAd placement type name
areaStringCountry/region code (ISO 3166-1 two-letter country/region code)
networkIntAd network ID
network_nameStringAd network name
network_placement_idStringAd placement ID of the ad network
network_placement_nameStringAd source name of the ad network (TradPlus)
network_placement_infoStringAd placement details of the ad network
android_idStringDevice ID, androidid
gaidStringGoogle advertising device ID
idfaStringiOS device ID
user_idStringCustom User ID uploaded by the user; this should be the distinct ID of the AE project
channelStringChannel
sub_channelStringSub-channel
oaidStringAndroid device identifier
idfvStringIdentifier for vendor
os_versionStringOS version of the device
att_statusIntApple ATT status (0: not determined by the user; 1: restricted; 2: denied; 3: authorized)
impressionIntImpressions (TradPlus)
clickIntClicks (TradPlus)
revenueFloatRevenue
ecpmFloatRevenue per 1,000 impressions

3.9 Standardized fields​

The AE system standardizes some fields in the TradPlus device-level data report

Original fieldStandardized fieldDescription
network_namete_ads_object.media_sourceMonetization channel
placement_namete_ads_object.placementAd placement
areate_ads_object.countryCountry or region code
currencyte_ads_object.currencyCurrency of the cost or revenue
impressionte_ads_object.impressionsImpressions
clickte_ads_object.clicksClicks
revenuete_ads_object.revenueMonetization revenue
Was this page helpful?