Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bid Type Detection (banner, video, audio, native) #2366

Open
SyntaxNode opened this issue Sep 1, 2022 · 2 comments
Open

Bid Type Detection (banner, video, audio, native) #2366

SyntaxNode opened this issue Sep 1, 2022 · 2 comments
Labels
needs docs Docs are required for this PR or Issue PBS-Java

Comments

@SyntaxNode
Copy link
Contributor

Background

OpenRTB 2.6 introduces a new bid response field "mtype" to explicitly define the media type / markup type of the bid (banner, video, audio, native). Prebid Server requires adapters to determine the type in their MakeBids code. I propose we move as much of this work as possible to the core logic such that adapters no longer need to extract this field.

Adapters will retain the ability to explicitly set the type, but this is now optional and fallback code is built into PBS-Core. Adapters will rely on the fallback code must provide a type hierarchy to inform PBS-Core which type to use if multiple are present.

Algorithm

  1. Allow the adapter to optionally provide a type. If the type is not null, use this without any further logic. Otherwise if it's null,
  2. Check if the bid response includes the OpenRTB 2.6 "mtype" field and use that if present, otherwise
  3. Check if the bid response includes the Prebid specific extension and use that if present, otherwise
  4. Match the impression from the request using the imp id and use a hierarchy provided by the adapter, otherwise
  5. Reject the bid if there is no matching imp.

Open Questions

  1. What happens if "mtype" is invalid? Ignore it and move on or reject the bid?
  2. What happens if the Prebid extension is invalid? Ignore it and move on or reject the bid?
  3. What happens if the hierarchy is not provided and fallback code needs to be used? Use a default hierarchy or reject the bid?

IX has implemented "mtype" in their adapter code and provided feedback on how they would prefer it works in the future.

@SyntaxNode
Copy link
Contributor Author

SyntaxNode commented Oct 26, 2022

Discussed (a while ago) in the Prebid Server Committee. Prebid Server requires adapters to provide an mtype field as part of our migration to OpenRTB 2.6, replacing Prebid proprietary fields. With this future in sight, there is no desire to build complex mtype resolution in Prebid Server Core code.

Instead, we will offer helper methods adapters can use to set the mtype field, if not present directly in their bid response.

Open Question Answers

What happens if "mtype" is invalid? Ignore it and move on or reject the bid?

Reject the bid if the adapter does not in some way provide an mtype field.

What happens if the Prebid extension is invalid? Ignore it and move on or reject the bid?

It is the adapter's responsibility to set the mtype field. If the field is missing the bid will be rejected.

What happens if the hierarchy is not provided and fallback code needs to be used? Use a default hierarchy or reject the bid?

Again, it is the adapter's responsibility to set the mtype field. If the field is missing the bid will be rejected.

@bretg
Copy link
Contributor

bretg commented Oct 6, 2023

PBS-Go has built a helper method for bid adapters to return the proper mtype. Two open items:

  • bid adapter documentation ( @SyntaxNode )
  • port this helper function to PBS-Java ( @bretg )

@bretg bretg moved this from Needs Requirements to Ready for Dev in Prebid Server Prioritization Oct 6, 2023
@bretg bretg added needs docs Docs are required for this PR or Issue PBS-Java labels Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs docs Docs are required for this PR or Issue PBS-Java
Projects
Status: Ready for Dev
Development

No branches or pull requests

2 participants