How to pass predefined custom targeting values in ad request (Only for GAM)
Below are the steps to pass predefined custom targeting value in ad request for GAM (Supported by all ad formats)
Create your
AdRequestConfiguration
as per the below format
Adding predefined ad targeting parameters to AdRequest
Custom ad request can be created for all the ad types.
Here is an example of implementation with banner ad.
Call
loadAd()
method as per below format
Inside the
onBannerAdLoaded
callback method invokegetView()
method ofMediationnBannerAd
object to add an AdSter banner view to the given layout as shown below
Call
MediationBannerAd.destroy()
When activity/fragment is destroyed or detached.
PreviousRender Unified Ad (Only for GAM)NextHow to pass publisher provided identifiers in ad request (PPID) (Only for GAM)
Last updated
Was this helpful?