You can use the Adjust SDK to send AD(X) data to Adjust as an AdjustAdRevenue
instance. To do this:
Create a new function that triggers when the rewardedAd.OnPaidEvent
method is called in the AD(X) SDK. This function should receive the eCPM (Effective Cost Per Mille) amount as an argument.
Instantiate an ADJAdRevenue
object with the source ADJAdRevenueSourceADX
.
Fill in the details of your AdjustAdRevenue
object. Divide the ecpm
value by 1000 to return the estimated revenue for the ad.
Send the ad revenue information to Adjust by calling the trackAdRevenue
method.
Example
func rewardedAd. paidEventHandler ( ecpm : double) {
let revenue: double = ecpm / 1000 ;
let adjustAdRevenue = AJDAdRevenue ( source : ADJAdRevenueSourceADX);
adjustAdRevenue. setRevenue (revenue, currency : "USD" );
adjustAdRevenue. setAdRevenueUnit ( "ADX Rewarded Ad" );
Adjust. trackAdRevenue (adjustAdRevenue);
rewardedAd.paidEventHandler = ^ ( double ecpm) {
double revenue = ecpm / 1000 ;
ADJAdRevenue * adjustAdRevenue = [[ADJAdRevenue alloc ] initWithSource: ADJAdRevenueSourceADX];
[adjustAdRevenue setRevenue: revenue currency: @"USD" ];
[adjustAdRevenue setAdRevenueUnit: @"ADX Rewarded Ad" ];
[Adjust trackAdRevenue: adjustAdRevenue];