文档

支持

LevelPlay SDK - React Native

LevelPlay Listener with AdInfo Integration (React Native)

Integrate LevelPlay listeners and use AdInfo data in your React Native app. Includes event details, code samples, and AdInfo fields.
阅读时间2 分钟最后更新于 13 天前

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.

LevelPlayAdInfo type

Listeners receive a
LevelPlayAdInfo
object. Import the type from the LevelPlay mediation package:
import type { LevelPlayAdInfo } from 'unity-levelplay-mediation'

AdInfo fields

The following fields are returned on the
LevelPlayAdInfo
object:

Field

Description

Data Type

adIdThe unique identifier of the ad object.string
adUnitIdThe unique identifier of the ad unit.string
adUnitNameThe name of the ad unit.string
adSizeThe size of the ad. This can be null if the ad size is not applicable or not provided.LevelPlayAdSize | null
adFormatThe format of the ad (e.g., BANNER, INTERSTITIAL, REWARDED, NATIVE_AD).string
placementNameThe name of the placement where the ad was shown.string
auctionIdUnique identifier for the auction.string
countryCountry code ISO 3166-1 format.string
abIndication if A/B test was activated via LevelPlay platform.string
segmentNameThe segment the user is related to as defined based on the segmentation method.string
adNetworkThe ad network name that served the ad.string
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
revenueThe revenue generated for the impression (USD). The revenue value is either estimated or exact, according to the precision (see precision field description).number
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 platform.string
encryptedCPMRelevant for ads provided by Meta Audience Network only, and will be reported to publishers approved by Meta Audience Network within the closed beta.string
conversionValueThe conversion value attributed to this impression, used for SKAdNetwork.number | null
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.

LevelPlay Listener with AdInfo Integration (React Native) • Unity Grow • Unity Docs