-
Notifications
You must be signed in to change notification settings - Fork 731
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
Conditional Impressions #2168
Comments
Discussed in committee. Initial feedback is to not use mediaQuery, and perhaps to use an object for sizes instead of array-of-arrays. Will update the description above next week. |
Feedback from the PBJS team was that converting size arrays to a size object is not a performance concern. Spec updated above. |
For bidder-level sizeConfig, the client may need to know which Also, from PBJS' point of view, if it's not going to use the global sizeConfig, server-side labels are not that useful either - they'd act as a pure yes/no filter that is entirely resolved before the request is made. If the intent is to harmonize the interfaces, it's worth noting that the current logic is "if any ad unit in a particular auction is using adUnit or bidder-level sizeConfig, ignore the global sizeConfig entirely". |
mediaType is in seatbid.bid.ext.prebid.type Adding @SyntaxNode and @SerhiiNahornyi to confirm this value is always present in both PBS-Go and PBS-Java. Based on the bid adapter instructions, I suspect it's always available?
Cool - thanks @dgirardi , updated the spec above to note this. |
I am referring to the client-side |
Remind me why the pbsBidAdapter can't just copy the relevant mediaType object from the original AdUnit? |
Take this scenario: pbjs.addAdUnits({
code: 'conditional',
mediaTypes: {
banner: {
sizeConfig: { // something irrelevant here, as bidder-level settings override this }
},
bids: [{
bidder: 'A',
sizeConfig: { minViewPort: [700, 0], relevantMediaTypes: ['banner'], sizes: [{'w':250, 'h':100}, {'w':400, 'h':300}] },
}, {
bidder: 'B',
sizeConfig: { minViewPort: [700, 0], relevantMediaTypes: ['banner'], sizes: [{'w':400, 'h':300}, {'w':600, 'h':400}] }
}]
}
}) And say the response contains an "extra" bid from I am sure it's possible to refactor client side logic so that we don't need to know that for everything in the response, but currently the codebase assumes that's always available. |
Looking quickly at the PBJS codebase, I believe the only thing that would need to be cut is banner size validation on the response - which does seem very optional to me. So it's probably OK for Prebid to not know precisely what was requested from extra bidders. |
Discussed in committee. We've decided to let this one go. Conditional existence of an adunit or bidders can (and maybe should) be done in a module. |
Prebid.js supports different ways of refining AdUnits (i.e. imps) based on parameters like size and custom labels
https://docs.prebid.org/dev-docs/conditional-ad-units.html
https://docs.prebid.org/dev-docs/modules/sizeMappingV2.html
Prebid Server should support these extensions to enable a broader shift to server-side bidding as well as supporting the mobile app scenario.
Feature: Labels
The 'labels' feature allows certain imp objects and certain bidders to be conditional based on the definition of a generic string in the request called a 'label'.
See the label examples in https://docs.prebid.org/dev-docs/conditional-ad-units.html for use cases.
Defining the Label Value
The proposal is to define the value of the label on ext.prebid.labels, which is an array of strings.
Labels can also be defined through the conditional responsive logic described in the next feature.
Conditional Logic
New attributes are supported as extensions that may include the object:
labelall
is also present in ext.prebid.labelslabelall
is also present in ext.prebid.labelsFeature: SizeConfig
Some publishers have complex rules for which imps, bidders, and mediatypes are relevant based on device viewport size.
Prebid.js supports two ways for publishers to define the responsive screen-size behavior:
There are three features here all based on the size of the user's screen:
Global sizeconfig
The proposed feature is to support ext.prebid.sizeconfig in a similar format as that used by Prebid.js:
PBS logic:
PBJS logic:
The pbsBidAdapter should not pass ext.prebid.sizeconfig because it would have to convert mediaQueries to this different format. Instead, it should resolve the PBJS mediaQuery locally and:
AdUnit-Level SizeConfig
This is really just sizeConfig on a per-AdUnit basis rather than globally. But Prebid.js implemented it with a different (simplified) syntax.
PBS logic:
PBJS logic:
Bidder-Level SizeConfig
Finally, at the bidder level, the responsive overrides can remove request mediaTypes and overwrite sizes. (Note: PBJS doesn't yet support the size override part, but there's an enhancement request in place, so we may as build it when we do this feature.)
PBS logic:
PBJS logic:
Resolving minViewPort
This is a simpler implementation than a mediaQuery -- it's basically just the min/max-width/height attributes.
Logic:
The text was updated successfully, but these errors were encountered: