adjust-icon

TradPlus SDK integration

Added in v4.38.1

If you want to record your ad revenue with the TradPlus SDK, you can use the SDK-to-SDK integration to pass this information to Adjust’s servers.

Before you begin

Follow the integration guide to integrate the Adjust SDK in your app.

Example

To record ad revenue information with Adjust, create an AdjustAdRevenue instance inside your TradPlusSdk.setGlobalImpressionListener function. See the Send ad revenue information guide for more information.

TradPlusSdk.setGlobalImpressionListener(new GlobalImpressionManager.GlobalImpressionListener() {
@Override
public void onImpressionSuccess(TPAdInfo tpAdInfo) {
AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue("tradplus_sdk");
double ecpm = Double.valueOf(tpAdInfo.ecpm) / 1000;
adjustAdRevenue.setRevenue(ecpm, "USD");
adjustAdRevenue.setAdRevenueNetwork(tpAdInfo.adSourceName);
adjustAdRevenue.setAdRevenueUnit(tpAdInfo.tpAdUnitId);
adjustAdRevenue.setAdRevenuePlacement(tpAdInfo.format);
Adjust.trackAdRevenue(adjustAdRevenue);
}
});