Skip to main content

ROI Calculate

Step 1.Prerequisite#

  • Access the SDK according to the integration instructions;
  • Initialize the SDK and integrate a certain type of advertisement.

Step 2. ROI calculate#

You can obtain advertising revenue through the callback of TradPlus SDK and report it to the third-party data platform. In this way, the purchase volume and cash realization are connected, and the ROI is calculated.

Obtained through the attribute adInfo of the advertisement object in the monitoring callback

MethodDescription
adInfo[@"country_code"]Country Code
adInfo[@"channel_name"]Three-party advertising platform name
adInfo[@"adsource_placement_id"]Three-party advertising slot ID
adInfo[@"load_time"]Load time
adInfo[@"ecpm"]Get Ecpm
adInfo[@"adunit_id"]Adunit ID

Step 3.Set the global display callback of the application dimension#

v8.5.0+ In order to facilitate developers to display data statistics, the SDK provides a global display callback API

#import <TradPlusAds/TradPlus.h>
[TradPlus sharedInstance].impressionDelegate = self;
#pragma mark - TradPlusAdImpressionDelegate
- (void)tradPlusAdImpression:(NSDictionary *)adInfo
{
//Access the ecpm via adInfo[@"ecpm"]
CGFloat revenue = [adInfo[@"ecpm"] floatValue]/1000.0;
}];
}

adInfo(NSDictionary) For related fields, please refer to: Callback Information Description