-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Type of issue
This is a feature request to help support responsive designs a lot better by only sending relevant bids, depending on the screen size.
Description
If I have a responsive design that has an ad slot that only accepts 300x250 on mobile, and only 728x90 on tablet/desktop, I'd love to be able to only request relevant 300x250 bids if their screen size is within a certain range.
As it stands now, it looks like all of my bidders seem to request bids even though they aren't even relevant. I fix this with a lot of if/else statements depending on the screen size, but I think this could be a lot easier.
Here's an example of what I think this would look like:
var adUnits = [{
code: 'ad-slot-1',
sizeMapping: [
{
minWidth : 1200,
sizes : [[970, 90], [728, 90]],
bids: [
{
bidder: 'pulsepoint',
params: {
cf: '728x90',
cp: 123456,
ct: 123456
}
},
{
bidder: 'pulsepoint',
params: {
cf: '970x90',
cp: 123456,
ct: 123456
}
},
{
bidder: 'sovrn',
params: {
tagid: '123456' // 970x90
}
},
{
bidder: 'sovrn',
params: {
tagid: '123456' // 728x90
}
},
{
bidder: 'districtmDMX',
params: {
id: 123456 // dynamic
}
}
]
},
{
minWidth : 768,
sizes : [728, 90],
bids: [
{
bidder: 'pulsepoint',
params: {
cf: '728x90',
cp: 123456,
ct: 123456
}
},
{
bidder: 'sovrn',
params: {
tagid: '123456' // 728x90
}
},
{
bidder: 'districtmDMX',
params: {
id: 123456 // dynamic
}
}
]
},
{
minWidth : 0,
sizes : [300, 250],
bids: [
{
bidder: 'pulsepoint',
params: {
cf: '300X250',
cp: 123456,
ct: 123456
}
},
{
bidder: 'sovrn',
params: {
tagid: '123456' // 300x250
}
},
{
bidder: 'districtmDMX',
params: {
id: 123456 // dynamic
}
}
]
}
]
...Expected results
Prebid detects the screensize/viewport and chooses which ad sizes and bids should be used. Prebid sends out only the bid requests that are relevant to each sizemapping.
Actual results
All bids go out, no matter what, because they're all inside 'bids'. Sometimes returning a winning bid for a 300x250 when we didn't even send that size to them, but because that networks placement is set to 300x250 only, it accepts the bid and returns it, which means it's allowing a 300x250 ad into a space that it doesn't belong in and screws up layouts.
Platform details
Using Prebid 0.19.