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)
1
4
AdSterAdLoader.Companion.builder().withAdsListener(new MediationAdListener() {
@Override
public void onBannerAdLoaded(@NonNull MediationBannerAd ad) {
super.onBannerAdLoaded(ad);
// Show banner ad here
}
@Override
public void onFailure(@NonNull AdError adError) {
// Handle failure here
}
}).withAdsEventsListener(new AdEventsListener() {
@Override
public void onAdClicked() {
//Handle ad click here
}
@Override
public void onAdImpression() {
//Handle ad impression here
}
@Override
public void onAdRevenuePaid(double revenue, @NotNull String adUnitId, @NotNull String network) {
// Callback which provides revenue and the network which provided it
}
}).build().loadAd(configuration.build());5
container.removeAllViews();
container.addView(ad.getView());PreviousHow to pass publisher provided identifiers in ad request (PPID) (Only for GAM)NextxGrowth AD UNITS
Last updated