iOS
#
AdInfo Callback ExplanationDevelopers can obtain the information of the current ad by setting a callback listener and accessing the adInfo parameter.
Taking rewarded video as an example, the code is as follows:
#
Setting up a Global Impression Callback for App-level Display- To facilitate developers in performing display data statistics, the SDK provides a global impression callback API.
- Supported versions: Unity plugin version v1.0.4+, iOS v8.5.0+, Android v8.8.0.1+
- Android Only: Developers need to call the listener for each type in order to receive the GlobalImpressionListener callback. For example, to set the impression callback for rewarded video:
TradplusRewardVideo.Instance().OnRewardVideoImpression += OnImpression;
#
Field Explanation for Callback Information Returned by Each InterfaceKey | Explanation |
---|---|
adType | Added in V7.1.0 Ad type. native: Standard native ad native-banner: Native banner native-splash: Native splash native-draw: Native draw banner: Banner splash: Splash interstitial: Interstitial rewarded-video: Rewarded video offerwall: Offerwall |
segment_id | Added in V7.1.0 Traffic segment ID |
bucket_id | Added in V7.1.0 A/B testing group ID |
adunit_id | Ad placement ID created in the TradPlus backend. |
true_adunit_id | Added in V12.1.0 Shared ad slot-specific ad information. Used to record the ad slot where the ad was finally displayed. |
adsource_placement_id | Ad source ID |
adNetworkId(v7.8.0+) | Number assigned to the third-party ad network, used to distinguish different ad networks. Please refer to the table of third-party ad network IDs below. |
adNetworkName(v7.8.0+) | Name of the third-party ad network |
adSourceId (Added in v11.70) | Third-party ad placement ID。Before v11.70, use placementid |
country_code | Country code |
ecpm | eCPM in USD (⚠️The eCPM-related fields are of type float, as are the subsequent fields) |
ecpm_cny | eCPM in CNY |
ecpm_precision | Added in V6.5.0. Get the precision of eCPM. "publisher_defined": eCPM defined by the developer in the TradPlus backend; "estimated": eCPM estimated by TradPlus based on historical data when the developer enables the auto pricing feature for the ad source (cross-promotion eCPM also belongs to this type); "exact": Real-time bidding price. |
Deprecated in v7.8.0. Developers can directly obtain it through ecpm. | |
Deprecated in v7.8.0. Developers can directly obtain it through ecpm_cny. | |
ecpm_level | Added in V6.5.0. Get the order (priority) of the ad source in the mediation management page in the developer backend. The default value for bidding ad sources is 0. For non-bidding ad sources, the manual sorting starts from 1 and increases incrementally. |
is_adapter_template_render | Whether it is a template type |
native_ad_type | v6.9.0+. Native ad type. Default: 0 (unknown). The specific type is returned after the native ad is loaded. 0 - Unknown 1 - Self-rendered 2 - Template 3 - Video interstitial 4 - Draw native ad |
is_bid | Whether it is a bidding ad source |
is_c2s_bid | Added in V7.6.0. Whether it is a C2S Bidding ad source |
is_auto_load | Added in V7.6.0. Whether it is auto-loaded |
load_time | Added in V7.6.0. Loading duration in milliseconds |
reward_info | Reward information returned by third-party (rewarded video), including advanced rewards from TikTok and Kuaishou (if available) |
reward_name | Reward item configured in the TradPlus backend (rewarded video) |
reward_number | Reward quantity configured in the TradPlus backend (rewarded video) |
request_id | Request identifier. A new ID is generated each time the load function is called. It can be used to track the complete lifecycle of ad loading until display completion |
waterfall_index | The position of the current ad in the waterfall |
scene_id | Ad scene ID |
customAdInfo | v8.3.20+. Custom data set by developers before ad display. Developers can set it through the corresponding API of each ad loading class. The custom data will be returned in relevant callbacks after ad display |
isNative | v8.4.0+. Whether it is a native ad. From v8.4.0+, banners and splash ads support the mixed use of native ads. Developers can determine whether an ad is a native ad based on this field |
isBottom | v8.5.0+. Whether it is a backup ad |
placement_ad_type | v8.7.0+. Ad source ad type. From v8.4.0+, banners and splash ads support the mixed use of native ads. From v8.7.0+, interstitial ads support the mixed use of splash ads. Developers can obtain the mixed ad types through this field. 1 - Native 2 - Interstitial 3 - Splash 4 - Banner 5 - Rewarded Video 6 - Offerwall |
impPaidData | Impression-level revenue data returned by AdMob (v9.5.0+) Note: The following fields are included in the data: paid_valueMicros: value paid_currencycode: Currency code paid_precision: Precision |
impressionId | Added in v9.6.0 Unique identifier for each ad impression |
video_protoco | Added in v10.0.0 Video protocol Type 1:vast, 2:vamp |
banner_w | Added in v10.3.0 The width of Banner configured in the TradPlus platform. |
banner_h | Added in v10.3.0 The height of Banner configured in the TradPlus platform. |
#
Third-Party Ad Network ID TableNetworkId | SourceName |
---|---|
1 | Audience-network (Meta) |
2 | Admob |
3 | Mopub |
4 | AdColony |
5 | UnityAds |
6 | Tapjoy |
7 | Liftoff |
9 | AppLovin |
10 | IronSource |
15 | Chartboost |
16 | Tencent Ads |
17 | Pangle(cn) |
18 | Mintegral |
19 | Pangle |
20 | Kuaishou Ads |
21 | Sigmob |
23 | Inmobi |
24 | Fyber |
25 | YouDao |
27 | Cross Promotion |
28 | Start.io |
30 | Helium |
31 | Maio |
32 | Criteo |
33 | MyTarget |
34 | Ogury |
37 | Kidoz |
38 | Smaato |
40 | ADX |
43 | Baidu |
44 | Klevin |
45 | A4G |
47 | SuperAwesome |
48 | GoogleAdManager |
50 | Yandex |
53 | Verve |
55 | ZMaticoo |
56 | ReklamUp |
57 | Bigo |
58 | Beizi |
60 | ONEMOB |
64 | PremiumAds |
67 | GreedyGame |
69 | BeesAds |
70 | Amazon |
71 | Mango X |
72 | Sailoff |
73 | Tanx |
74 | TaurusX |
75 | KwaiAds |
76 | Columbus |