Viewability (OM SDK) Extension
Viewability measurement is provided using the IAB Open Measurement SDK as an optional extension of the Nimbus SDK. Publishers can unlock additional advertising revenue by allowing advertisers to track the performance of their campaigns or by partnering with a viewability provider such as Moat to optimize the performance of individual ad units. By including the OM SDK extension, viewability measurement will be automatically enabled for all Nimbus ads with the option to disable measurement when constructing a NimbusRequest or by using the Nimbus Dashboard.
Setup
Add the OM SDK library group to the Nimbus maven repository definition in settings.gradle.
maven {
url = uri("https://adsbynimbus-public.s3.amazonaws.com/android/sdks")
credentials {
username = "*"
}
content {
includeGroup("com.adsbynimbus.android")
includeGroup("com.adsbynimbus.openrtb")
// Add the following group to make the additional dependencies available to Gradle
includeGroup("com.iab.omid.library.adsbynimbus")
}
}
Add the OM SDK extension in your build.gradle.
dependencies {
implementation("com.adsbynimbus.android:extension-viewability:1.11.6")
}
Enabling Viewability for Demand
Viewability is not enabled by default. To turn it on set the thirdPartyViewability flag on the ViewabilityProvider to true.
ViewabilityProvider.thirdPartyViewability = true
Adding a Viewability provider
Publishers can view their own viewability metrics by adding a Viewability provider during initialization of the Nimbus SDK.
Moat
Moat can be used to collect viewability metrics by initializing the MoatVerificationProvider class with the vendor keys provided by Moat and defining the mapping for Moat Slicer and Level parameters by implementing the MoatMapping interface. Please work with your Moat representative to determine the values for each slicer and level that best suits your tracking needs. Any null values in the mapping will not be used and can be omitted when defining the MoatMapping.
ViewabilityProvider.verififcationProviders.add(
MoatVerificationProvider(
staticVendorKey = "moatwebviewvendorkey",
videoVendorKey = "moatvideovendorkey",
nativeVendorKey = "moatnativevendorkey",
mapping = { position, nimbusAd ->
MoatMapping(
slicer1 = position,
slicer2 = nimbusAd.placementId(),
level1 = nimbusAd.network(),
// The following 3 values will not be used because they are null and can be omitted
level2 = null,
level3 = null,
level4 = null,
)
}
)
)
Disabling viewability using the Nimbus dashboard
How it works
The OM SDK extension will automatically include information in the request to Nimbus identifying the OM SDK integration and informing advertisers that the OM SDK is present for each ad type unless disabled on the request object or in the Nimbus dashboard. After receiving a winning bid, initialized Viewability providers will inject an additional tracking tag in the returned creative and the additional measurement APIs will be enabled for the lifecycle of the Nimbus Ad.