DT FairBid enables you to access detailed information for each impression through the impressions callback APIs. The information includes, for example, which demand source served the ad, the expected or exact revenue associated with it. In addition, it contains granular details to allow you to analyze and, ultimately, optimize both your ad monetization and user acquisition strategies.
To enrich and elaborate the insights you can get, this information can be called by two different APIs that refers to different stages at the impression lifetime:
- Once the ad is being shown (onShow) - starting from DT FairBid 2.3.0
- Before the ad is being shown, once there is a Fill – an ad available to display (onAvailable) - starting from DT FairBid 3.11.0
Glossary Table
Property Name | Type | Description | Examples |
---|---|---|---|
advertiserDomain |
String (nullable) | When available, this is an identifier for a set of campaigns for the same advertiser. | homedepot.com |
campaignId |
String (nullable) | When available, this is an identifier for a specific campaign of a certain advertiser. |
1860_79463ca93f1dbc4446 a5a8db8520f32 |
countryCode |
String (nullable) | Country location of the ad impression (in ISO country code) |
US |
creativeId |
String (nullable) | When available, this is an identifier for a specific creative of a certain campaign. This is particularly useful information when a certain creative is found to cause user experience issues. | 169493819 |
currency |
String | Currency of the payout. | USD |
demandSource |
String (nullable) | Demand Source name is the name of the buy-side / demand-side entity that purchased the impression. When mediated networks win an impression, you’ll see the mediated network’s name. When a DSP buying through the programmatic marketplace wins the impression, you’ll see the DSP’s name. | Examples: Liftoff RTB Facebook bidder *Liftoff Monetize |
impressionDepth |
Integer | The amount of impressions in the current session for the given Placement Type. | 1 |
impressionId |
String (nullable) | A unique identifier for a specific impression. | 5699232551401720289 |
requestId |
String | (Added since 3.43.0) The ad request identifier for a specific impression. | 5699232551401720289 |
jsonString |
String | A JSON representation of the data serialized to a String. | |
netPayout |
String (nullable) | Net payout for an impression. The value accuracy is returned in the priceAccuracy field. The value is provided in units returned in the currency field. | 0.0155 |
networkInstanceId |
String (nullable) | The mediated ad network’s original Placement/Zone/Location/Ad Unit ID that you created in their dashboard. For ads shown by the DT Exchange, the networkInstanceId is the Placement ID you created in the DT Console. | c38b236a7b613dc2 |
placementType |
enum | The Placement Type for the impression, corresponding to your choice in the DT Console. Types available: BANNER INTERSTITIAL REWARDED |
REWARDED |
priceAccuracy |
enum | Accuracy of the netPayout value. May return one of the following: PROGRAMMATIC - When netPayout is the exact and committed value of the impression, available when impressions are won by programmatic buyers. PREDICTED - When DT’s estimation of the impression value is based on historical data from non-programmatic mediated network’s reporting APIs UNDISCLOSED - When the demand source does not agree to disclose the payout of every impression - in such cases the netPayout is ‘0’. |
PROGRAMMATIC |
renderingSDK |
String (nullable) | Name of the SDK in charge of rendering the ad. | Digital Turbine |
renderingSDKVersion |
String (nullable) | The version of the SDK rendering the ad.
NoteWhen AdMob renders an impression, the |
2.4.0 |
variantId |
String | (Added since 3.11.0) Waterfall variant Identifier. When running a multi-test experiment, this ID will help you identify which variant was delivered to the device. | 123456 |
Impression Data Upon Showing the Ad
All ad formats (Interstitial, Rewarded and Banner) provide you access to the ImpressionData object through their callback APIs:
Interstitial.setInterstitialListener(object : InterstitialListener {
override fun onShow(placementId: String, impressionData: ImpressionData) {
val netPayout = impressionData.netPayout
val currency = impressionData.currency
val priceAccuracy = impressionData.priceAccuracy
val impressionDepth = impressionData.impressionDepth
val message = "Placement $placementId has been shown with a " +
"net payout of $netPayout $currency " +
"with accuracy: $priceAccuracy " +
"and impression depth: $impressionDepth"
Log.d(TAG, message)
}
})
val placementId = "12345"
if (Interstitial.isAvailable(placementId)) {
Interstitial.show(placementId, context)
}
Expected log output:
Placement 12345 has been shown with a
net payout of 4.000000 USD
with accuracy: PREDICTED and
impression depth: 1
Java
Interstitial.setInterstitialListener(new InterstitialListener() {
@Override
public void onShow(@NonNull String placementId, @NonNull ImpressionData impressionData) {
double netPayout = impressionData.getNetPayout();
String currency = impressionData.getCurrency();
ImpressionData.PriceAccuracy priceAccuracy = impressionData.getPriceAccuracy();
int impressionDepth = impressionData.getImpressionDepth();
String message = String.format("Placement %s has been shown with a net payout of %f %s " +
"with accuracy: %s and impression depth: %d",
placementId, netPayout, currency, priceAccuracy, impressionDepth);
Log.d(TAG, message);
}
});
String placementId = "12345";
if (Interstitial.isAvailable(placementId)) {
Interstitial.show(placementId, context);
}
Expected log output:
Placement 12345 has been shown with a
net payout of 4.000000 USD
with accuracy: PREDICTED and
impression depth: 1
Interstitial
Swift
optional func interstitialDidShow(
_ placementId: String,
impressionData: FYBImpressionData
)
optional func interstitialDidFail(
toShow placementId: String,
withError error: Error,
impressionData: FYBImpressionData
)
Objective-C
- (void)interstitialDidShow:
(nonnull NSString *)placementId
impressionData:(nonnull FYBImpressionData *)impressionData;
- (void)interstitialDidFailToShow:
(nonnull NSString *)placementId
withError:(nonnull NSError *)error
impressionData:(nonnull FYBImpressionData *)impressionData;
Rewarded
Swift
optional func rewardedDidShow(
_ placementId: String,
impressionData: FYBImpressionData
)
optional func rewardedDidFail(
toShow placementId: String,
withError error: Error,
impressionData: FYBImpressionData
)
Objective-C
- (void)rewardedDidShow:
(nonnull NSString *)placementId
impressionData:(nonnull FYBImpressionData *)impressionData;
- (void)rewardedDidFailToShow:
(nonnull NSString *)placementId
withError:(nonnull NSError *)error
impressionData:(nonnull FYBImpressionData *)impressionData;
Banner
Swift
optional func bannerDidShow(
_ banner: FYBBannerAdView,
impressionData: FYBImpressionData
)
Objective-C
- (void)bannerDidShow:
(FYBBannerAdView *)banner
impressionData:(nonnull FYBImpressionData *)impressionData;
The example below showcases how you can access these data on an Interstitial integration. The integration for Rewarded and Banners is similar.
Swift
func interstitialDidShow(
_ placementId: String,
impressionData: FYBImpressionData
) {
let currency = impressionData.currency ?? "(nil)"
let payout = impressionData.netPayout?.doubleValue ?? 0
let accuracy = impressionData.priceAccuracy
let impressionDepth = impressionData.impressionDepth
print("Placement \(placementId) has been shown with a " +
"net payout of \(payout) \(currency) " +
"with accuracy: \(accuracy) " +
"and impression depth: \(impressionDepth)")
}
Objective-C
- (void)interstitialDidShow:
(NSString *)placementId
impressionData:(FYBImpressionData *)impressionData {
NSLog(@"Placement %@ has been shown with a net payout of %@ %@ "
"with accuracy: %d and impression depth: %i",
placementId, impressionData.netPayout,
impressionData.currency,
impressionData.priceAccuracy,
impressionData.impressionDepth);
}
Expected log output:
Placement 12345 has been shown with a
net payout of 4.000000 USD
with accuracy: PREDICTED and
impression depth: 1
All ad formats (Interstitial, Rewarded, and Banner) provide access to the ImpressionData object through their callback APIs:
C#
void OnShow(string placementId, ImpressionData impressionData);
void OnShowFailure(string placementId, ImpressionData impressionData);
Example:
C#
Interstitial.SetInterstitialListener(new MyInterstitialListener());
class MyInterstitialListener : InterstitialListener {
public void OnShow(string placementId, ImpressionData impressionData) {
string netPayout = impressionData.netPayout;
string currency = impressionData.currency;
int impressionDepth = impressionData.impressionDepth;
ImpressionData.PriceAccuracy priceAccuracy = impressionData.priceAccuracy;
Debug.Log($"Placement {placementId} has been shown with a " +
$"net payout of {netPayout} {currency} " +
$"with accuracy: {priceAccuracy} " +
$"and impression depth: {impressionDepth}");
}
}
string placementId = "12345";
if (Interstitial.IsAvailable(placementId)) {
Interstitial.Show(placementId);
}
Expected log output:
Placement 12345 has been shown with a
net payout of 4.000000 USD
with accuracy: PREDICTED and
impression depth: 1
Impression Data Before Showing the Ad
Starting on SDK 3.11.0, for Interstitials and Rewarded ads, you can also access the same information before showing the ad.
This information will be available as soon as you have a fill for that placement. If the placement for which you are requesting the impression data does not have a fill, the API will return nil.
Important
Calling this API at different moments maybe result in different values for the impression depth field, since, impression depth is counted for the ad type, regardless of placement. More information below.
Interstitial
override fun onAvailable(placementId: String) {
val impressionData = Interstitial.getImpressionData(placementId)
}
Java
@Override
public void onAvailable(String placementId) {
ImpressionData impressionData = Interstitial.getImpressionData(placementId);
}
func interstitialIsAvailable(_ placementId: String) {
let impressionData = FYBInterstitial.impressionData(placementId)
}
Objective-C
- (void)interstitialIsAvailable:(NSString *)placementId {
FYBImpressionData *impressionData = [FYBInterstitial impressionData:placementId];
}
public void OnAvailable(string placementId) {
ImpressionData impressionData = Interstitial.GetImpressionData(placementId);
}
Rewarded
override fun onAvailable(placementId: String) {
val impressionData = Rewarded.getImpressionData(placementId)
}
Java
@Override
public void onAvailable(String placementId) {
ImpressionData impressionData = Rewarded.getImpressionData(placementId);
}
func interstitialIsAvailable(_ placementId: String) {
let impressionData = FYBInterstitial.impressionData(placementId)
}
Objective-C
- (void)rewardedIsAvailable:(NSString *)placementId {
FYBImpressionData *impressionData = [FYBRewarded impressionData:placementId];
}
public void OnAvailable(string placementId) {
ImpressionData impressionData = Rewarded.GetImpressionData(placementId);
}
Impression Depth
Impression depth represents the amount of impressions in a given session per ad format (Rewarded, Interstitial and Banner).
Impression depth can be directly accessed from each ad format class (access all code snippets here). Alternatively, it can be accessed through the ImpressionLevelData object as shown in the snippets above.
The impression depth for each ad format will keep increasing throughout the session as more ads get displayed.
It is reset only when:
- The session ends (app is killed)
- SDK considers the session has “timed out”
Session Timeout
Session timeout or “session background timeout” represents the amount of time the user needs to spend with the app in the background before we consider them to be back to user engagement levels similar to a fresh new session. At this point, for all ad formats, the impression depth is reset to 0.
The Session timeout value is 30 minutes by default.
Snippets
The example below illustrates how you can access the impressionDepth value for all ad formats (Rewarded, Interstitial and Banner),
val impressionDepth = Interstitial.getImpressionDepth()
val impressionDepth = Banner.getImpressionDepth()
val impressionDepth = Rewarded.getImpressionDepth()
Java
int impressionDepth = Interstitial.getImpressionDepth();
int impressionDepth = Banner.getImpressionDepth();
int impressionDepth = Rewarded.getImpressionDepth();
let impressionDepth = FYBBanner.impressionDepth
let impressionDepth = FYBInterstitial.impressionDepth
let impressionDepth = FYBRewarded.impressionDepth
Objective-C
NSUInteger impressionDepth = FYBRewarded.impressionDepth;
NSUInteger impressionDepth = FYBInterstitial.impressionDepth;
NSUInteger impressionDepth = FYBBanner.impressionDepth;
int impressionDepth = Banner.GetImpressionDepth();
int impressionDepth = Interstitial.GetImpressionDepth();
int impressionDepth = Rewarded.GetImpressionDepth();