adjust-icon

TradPlus SDK integration

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 OnGlobalAdImpression function. See the Send ad revenue information guide for more information.

void OnGlobalAdImpression(Dictionary<string, object> adInfo)
{
var revenue = double.Parse(adInfo["ecpm"], System.Globalization.CultureInfo.InvariantCulture) / 1000;
var unitId = "";
var adType = "";
var networkName = "";
AdjustAdRevenue adRevenue = new AdjustAdRevenue(Json.Serialize(adInfo));
#if UNITY_IOS
unitId = adInfo["adunit_id"];
adType = adInfo["adType"];
networkName = adInfo["adNetworkName"];
#else
unitId = adInfo["tpAdUnitId"];
adType = adInfo["format"];
networkName = adInfo["adSourceName"];
#endif
adRevenue.SetRevenue(revenue, "USD");
adRevenue.AdRevenueUnit = unitId;
adRevenue.AdRevenuePlacement = adType;
adRevenue.AdRevenueNetwork = networkName;
Adjust.TrackAdRevenue(adRevenue);
}