Documentation

Support

LevelPlay Listener with AdInfo Integration (Android)

Integrate LevelPlay listeners and use AdInfo data in your Android app. Includes event details, code samples, and AdInfo fields.
Read time 2 minutesLast updated 12 hours ago

LevelPlay Listener with AdInfo Integration

Integrate the AdInfo data

Once you implement the LevelPlay Listeners, you’ll be able to use the data as part of your app’s data. If the LevelPlayAdInfo data is not available, the adInfo string params will return an empty string, and the numeric params will return 0 value.
public void onAdLoaded(@NonNull LevelPlayAdInfo adInfo) {
    String AdUnit = adInfo.getAdUnit();
    String AuctionId = adInfo.getAuctionId();
    String AdNetwork = adInfo.getAdNetwork();
    String Ab = adInfo.getAb();
    String Country = adInfo.getCountry();
    String InstanceId = adInfo.getInstanceId();
    String InstanceName = adInfo.getInstanceName();
    String SegmentName = adInfo.getSegmentName();
    Double Revenue = adInfo.getRevenue();
    String Precision = adInfo.getPrecision();
    String EncryptedCPM = adInfo.getEncryptedCPM();
    String CreativeId = adInfo.getCreativeId();
}

AdInfo fields

Here’s a list of the relevant data fields, including description and type that are being returned as part of the new AdInfo object:

Parameter Name

Description

Data Type

auctionIdUnique identifier for the auctionString
adUnitThe ad unit displayed (Rewarded Video/Interstitial/Banner)String
adNetworkThe ad network name that served the adString
instanceNameThe ad network instance name as defined on the platform. For bidding sources, the instance name will be ‘Bidding’String
instanceIdIdentifier per network, this includes the ad network’s instanceID/placement/zone/etc.String
countryCountry code ISO 3166-1 formatString
revenueThe revenue generated for the impression (USD). The revenue value is either estimated or exact, according to the precision (see precision field description)Double
precisionThe source value of the revenue field: BID – The revenue provided as part of the real-time auction (Exact bid is not supported by Meta & Google bidders) RATE – manual price the publisher assigned to an instance in the LevelPlay platform CPM – Calculation based on historical instance performance, performed by LevelPlay platformString
abIndication if A/B test was activated via LevelPlay platformString
segmentNameThe segment the user is related to as defined based on the segmentation methodString
encryptedCPMRelevant for ads provided by Meta Audience Network only, and will be reported to publishers approved by Meta Audience Network within the closed betaString
creativeIdThe creative ID of the ad campaign. The default is an empty string.String

Notes

  • The LevelPlay AdInfo represents the last ad that was loaded successfully. It is not included in Load Fail callbacks, as there’s no available ad.
  • For more details, see the official Knowledge Center article.