prebid / prebid-mobile-android

Prebid Mobile SDK for Android applications
Apache License 2.0
57 stars 83 forks source link

Loading bid for mixed banner/native adUnitId #269

Closed ArcaDone closed 4 months ago

ArcaDone commented 3 years ago

Hello,

My team is working on integrating Prebid on an iOS and Android app, using Google Ad Manager as the ad server. We have encountered an issue where we are not sure how to proceed. I will refer to the Android SDK but this also applies to iOS.

The advertising team has provided us with several adUnitIds and some of them support both native and banner ads. Using Prebid we would have to load an offer using one of these "combined" adUnitIds (native and banner) with the expectation that after successfully calling public void fetchDemand (@NonNull final OnCompleteListener2 listener) and using the unmodifiableMap to add our customTargeting let's go request an ad from Google. Google will return a single ad, which could be a banner or native ad, depending on the bid winner. The problem we encountered is that Prebid only exposes BannerAdUnit and NativeAdUnit, there seems to be no object combining them both.

Ideally we should be able to bid for both a banner and a native at the same time, with only the highest bid to be returned (not two different offers returned).

Can you tell us the right way to solve this problem? Thanks in advance!

mittal-ank commented 3 years ago

Hello @ArcaDone

You won't be able to do this currently as Prebid SDK and server identify banner and native as two different ad types. The best option for you is to select one of the two. My recommendation is to select Banner as the yield and fill rates will be higher than native.

We are evaluating whether to expose APIs on the SDK that lets you manually attach key values to the Google Ad Object. Once that is supported, then you will be able to make two parallel calls - 1 for banner and the other one for native to the Prebid SDK. After that you will be able to select the higher bid value of the two and pass it onto the Google SDK.

YuriyVelichkoPI commented 1 year ago

@ArcaDone is this request still relevant for you?

Recently we added support for multiformat banner & video requests. So maybe it makes sense to consider the native format as well.