prebid / openrtb

Go (Golang) OpenRTB 2.x, 3.0 / AdCOM 1.0 / Native 1.2 types/enums
Apache License 2.0
41 stars 21 forks source link

Attributes (banner.TopFrame, regs.Coppa, video.MinBitRate) with int8 and omitempty #13

Open yinon3 opened 4 months ago

yinon3 commented 4 months ago

There are several RTB Objects that identified as important and missing from our the bid request. I am just writing what I saw when trying to implement it, maybe there are more. imp.Banner.TopFrame 0 mean no, 1 mean yes as state in the comment

regs.Coppa 0 mean disable, 1 mean enable

video.MinBitRate it's a range and can be 0

when it's set to 0 we lose the ability to notify the buyers.

Let me know your thoughts.

SyntaxNode commented 4 months ago

This was a much more widespread issue we intended to address in release v20.0.0, where we updated the rules in the readme for "pointers/omitempty" to the following:

Use A Pointer: zero value ("", 0) has no meaning, is defined in the spec as the default value, or represents time / duration

Use A Value: zero value ("", 0) or value absence (null) has special meaning

We went through the openrtb2 package, but perhaps we missed imp.Banner.TopFrame and regs.Coppa in which the zero value has meaning. I'm good with considering changes to those in the next major release (since it's a breaking change). I'll review those with the committee.

For MinBitRate, why would passing a value of "0" have meaning? Would a buyer assume a value of 0 if there is none provided in the request?

yinon3 commented 4 months ago

@SyntaxNode c many thanks! 0 is a valid value, the minBitRate is a range starting with 0. it can indicate a really bad bandwidth. wdyt?

hhhjort commented 4 months ago

In what way is it actionable to know minBitRate is zero rather than unset? What would the decisioning logic look like that would branch between 0 and unset? Wouldn't a low maxBitRate be a better signal to use for a low bandwidth connection? (Don't bother submitting an ad the requires more bandwidth than X, it won't be displayable if you do.)

yinon3 commented 4 months ago

The question is whatever we need to have actionable item from this value or is it a legal value. If 0 is a legal value I think we should use it and the buyer who get it can decide what to do with that. wdyt?

hhhjort commented 4 months ago

I am still having trouble understanding how a 0 is different from no value. Since it is impossible to have a negative bit rate, a bit rate of 0 is the same as not having a minimum. What I would like to see is some standard the shows publishers agree that 0 means something other than that they don't want to set a minimum bit rate. Otherwise the bidder will still be stuck wondering what this particular publisher means by setting an explicit 0 or not, and being unable to act on this signal given no general agreement as to what this distinction means, if anything.

If I put myself into the publisher's shoes, trying to decide if I should send a 0 or omit the field, all I can think is that it would come down to the template I am using to configure my supply. If the template requires a number, I fill in 0. If it does not, I leave it unset. This is why I would like to see a standard that I might expect publishers to follow, or some solid reasoning that, once I see it, it makes sense for the publisher to put some effort into following rather than just defaulting to what his content management system requires of them.

SyntaxNode commented 3 months ago

We'll take this on now that the 2.6-202402 update is released.