prebid / prebid-mobile-android

Prebid Mobile SDK for Android applications
Apache License 2.0
58 stars 84 forks source link

Multiple Host within single initialization #777

Open andriiginting opened 5 months ago

andriiginting commented 5 months ago

Currently, the documentation and code examples suggest that only one Host can be specified during initialization. I would like to understand if there's a supported way to configure Prebid to work with multiple Hosts like Rubicon and Custom or other combinations as well.

If this functionality is not currently supported, I would appreciate any insights into potential workarounds or alternative approaches to achieve similar results.

YuriyVelichkoPI commented 5 months ago

Hi @andriiginting ! This functionality is not supported by SDK. Technically, you can set a custom host just before each fetchDemand. But there are no guarantees that this host won't be mistakenly used in some other request. The requests management will be responsibility of app's code.

Some time ago, we had a similar request, so it might be helpful to push this feature: https://github.com/prebid/prebid-mobile-ios/issues/386

YuriyVelichkoPI commented 5 months ago

In addition, please clarify—do you mean the ability to send bid requests for different ad units to different servers:

AdUnit1 --> Host 1

AdUnit2 --> Host 2

or to send the same bid requests to different hosts for the same ad unit in parallel?

AdUnit 1 |--> Host 1 |--> Host 2

In the second case and integration via Rendering API, SDK should be able to choose the winning bid among two servers. Or provide API to make this choice by the publisher.

andriiginting commented 5 months ago

I think we do not differentiate ad units per host. So, we want to achieve the second case with a single aAdUnit to a different host.

Would you mind to share how to achieve that?

YuriyVelichkoPI commented 5 months ago

I think we do not differentiate ad units per host. So, we wan to achieve the second case with a single aAdUnit to a different host.

Would you mind to share how to achieve that?

Got it. We definitely need to modify the SDK to achieve it.

I need some more details to start working on the implementation proposal.

I. Which kind of integration are you interested in the first place?

II. Do your hosts provide identical account IDs and stored config IDs?

The point here is that most probably, not only the host will be different, but also the bunch of configurations. It would be great if you could share the lists of different configuration properties for your hosts. I don't need the values but just a property names that you should use for each of your hosts.

It will help to design the generic implementation.

III. Which ad formats are you interested in the most?

The main point here is the necessity of multiformat requests and the combination of needed formats

Also important is the integration kind - banner or interstitial.

=======

Thanks in advance for the clarification. Maybe I'll need more details while drafting the spec :)

For now I think that on the high level, we will have to utilize the concept introduced for multiformat ad units in Original API. We can handle several instances of PrebidRequest object and then merge the response. The complexity of merging will depend on answers to the above questions.

andriiginting commented 4 months ago

Which kind of integration are you interested in the first place? We use Original API (GAM Line Items with PUC creative rendered in GMA SDK)

Do your hosts provide identical account IDs and stored config IDs? No. we will use different IDs for each host

Which ad formats are you interested in the most? As of now, we support all those formats (banner, video, native)

Do let me know if you need anything else @YuriyVelichkoPI