Skip to main content

Callback Information

Callback Information Description#

AdInfo information callback instructions#

The developer can obtain the information of the current advertisement through the parameter adInfo by setting the callback listener.

Taking the incentive video type as an example, the code is as follows:

- (void)viewDidLoad
{
[super viewDidLoad];
self.rewardedVideoAd = [[TradPlusAdRewarded alloc] init];
//set delegate
self.rewardedVideoAd.delegate = self;
}
#pragma mark - TradPlusADRewardedDelegate
- (void)tpRewardedAdImpression:(NSDictionary *)adInfo
{
//The following information can be obtained through the AdInfo object
}

Set custom parameters#

Developers can set customAdInfo of each ad loading class to define data before displaying the ad. The SDK will return in the relevant callback after display.

//Take incentive video as an example:
//set before show
self.rewardedVideoAd.customAdInfo = @{@"act":@"Show",@"time":@(time)};
[self.rewardedVideoAd showAdWithSceneId:@"scene_id"];

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
{
//Developers can use this callback to get the display callbacks of all ad slots
}

Description of the callback information field returned by each interface#

KeyDescription
adType(Added in V7.1.0)native
native-banner
native-splash
native-draw
banner
splash
interstitial
rewarded-video
offerwall
segment_idAdded in V7.1.0. Segment ID
bucket_idAdded in V7.1.0. A/B Test Group ID
adunit_idAd unit ID created by TradPlus Platform
adsource_placement_idAd source ID
channel_id
adNetworkId(Added in v7.8.0)
The number corresponding to the three-party advertising network is used to distinguish different advertising networks. Please refer to the 3rd party ad network ID table below
channel_name
adNetworkName(Added in v7.8.0)
Three-party ad network name
country_codecountry code
ecpmecpm USD (⚠️ecpm is related to float type, the same below)
ecpm_cnyecpm CNY
ecpm_precisionAdded in V6.5.0. Get eCPM accuracy.
"publisher_defined": the eCPM defined by the developer for the ad source in the background of TradPlus;
"estimated": the eCPM estimated by TradPlus based on historical data after the developer enables the automatic price function of the ad source in the background ( eCPM for cross-promotion also belongs to this type);
"exact": bidding real-time price, when exact is returned, the developer needs to obtain the real-time bidding price by obtaining ecpm_exact and ecpm_cny
ecpm_exactAdded in V6.5.0. The real-time price of Bidding (USD). When ecpm_precision returns exact, Please use ecpm_exact and ecpm_exact_cny as the advertising price, it will be more accurate than using ecpm and ecpm_cny.
v7.8.0 obsolete. Developers can obtain it directly through ecpm.
ecpm_exact_cnyAdded in V6.6.0. Real-time price of Bidding (CNY). When ecpm_precision returns exact, Please use ecpm_exact and ecpm_exact_cny as the advertising price, it will be more accurate than using ecpm and ecpm_cny
v7.8.0 obsolete. Developers can obtain it directly through ecpm_cny.
ecpm_levelAdded in V6.5.0. Obtain the order (priority) of ad sources on the developer background intermediary management page.
Bidding ad source is 0 by default.
For non-bidding ad sources, the manual sorting area starts from 1 and increments.
is_adapter_template_renderIs it a template type
native_ad_typeAdded in v6.9.0. Native ad type. The default is 0 (unknown), and the specific type is returned when the native ad is loaded.
0 - unknown
1 - self-rendering
2 - template
3 - video clip
4 - draw stream
is_bidWhether it is the advertising source of Bidding
is_c2s_bidAdded in V7.6.0. Whether it is the advertising source of C2SBidding
is_auto_loadAdded in V7.6.0. Whether it is automatically loaded
load_timeAdded in V7.6.0. load time (ms)
reward_infoReward information data (Reward video) returned by the three parties, including advanced rewards for Pangolin and Kuaishou (if any)
reward_nameReward items configured in TradPlus Platform. (Reward video)
reward_numberThe number of rewards configured in the TradPlus Platform. (Reward Video)
request_idrequest ID, an id will be generated at the beginning of each call to load, and the complete life cycle of ad loading can be tracked when the final display is completed
waterfall_indexThe position of the current ad in the waterfall
scene_idAd Scene ID
customAdInfoAdded in v8.3.20. The developer sets the custom data before the ad is displayed. Developers can configure settings through the corresponding APIs of each ad loading class. Custom data will be returned in the relevant callback after the ad is displayed
isNativeAdded in v8.4.0. Whether it is a native ad. v8.4.0+ Banners and splash ads support the mixed use of native ads. Developers can use this field to determine whether an ad is a native ad.
isBottomAdded in v8.5.0. Is it a backup ad
placement_ad_typeAdded in v8.7.0. Ad source ad type.
v8.4.0+ The mixed use of native ads is supported for banners and open-screen ads, and the mixed use of open-screen ads for v8.7.0+ interstitial ads. Developers can use this field to obtain mixed ad types.
1 Native
2 Interstitial
3 Splash
4 Banner
5 RewardVideo
6 Offerwall
impPaidDataImpression-level revenue data returned by Admob(Added in v9.5.0)
Note: The following fields are included in the data
paid_valueMicros: ECPM
paid_currencycode: Currency
paid_precision: Precision
Needs to be enabled in admob backend-Settings-Account-Advertising revenue at the impression opportunity level
impressionIdAdded in v9.6.0 Uniquely identify.A unique identifier that identifies each ad impression
video_protocolAdded in v10.0.0 Video protocol Type 1:vast, 2:vamp
banner_wAdded in v10.3.0 The width of Banner configured in the TradPlus platform.
banner_hAdded in v10.3.0 The height of Banner configured in the TradPlus platform.

Three-party advertising network ID table#

NetworkIdSourceName
1Audience-network (Meta)
2Admob
3Mopub
4AdColony
5UnityAds
6Tapjoy
7Liftoff
9AppLovin
10IronSource
15Chartboost
16Tencent Ads
17Pangle(cn)
18Mintegral
19Pangle
20Kuaishou Ads
21Sigmob
23Inmobi
24Fyber
25YouDao
27Cross Promotion
28Start.io
30Helium
31Maio
32Criteo
33MyTarget
34Ogury
37Kidoz
38Smaato
40ADX
43Baidu
44Klevin
45A4G
47SuperAwesome
48GoogleAdManager
50Yandex
53Verve
56ReklamUp
57Bigo
58Beizi
60ONEMOB
64PremiumAds
67GreedyGame
69BeesAds
70Amazon
71Mango X
73TanX