How to map the size from dimensions to sizes[] for prebid.js
580 opened this issue · 0 comments
580 commented
I am trying to setup a demo page with the sample from prebid.org. Here's the code snippet I am using:
arcAds.registerAd({
id: 'div-1',
slotName: 'header-bid-tag-0',
adType: 'leaderboard',
display: 'all',
dimensions: '[[970, 250], [970, 90], [728, 90]]',
sizemap: {
breakpoints: '[ [1280, 0] ]',
// refresh: 'leaderboard'
},
bidding: {
prebid: {
enabled: true,
bids: [{
bidder: 'appnexus',
labels: ['desktop'],
params: {
placementId: '13144370'
}
}]
}
}
})
Expected Behavior
Receive the bid from the auction request.
Actual Behavior
The auction failed with a {"error":"parse"}
message.
Steps to Reproduce the Behavior
Looking into the bid request, you'll see the sizes[] from the payload is empty:
{
"tags": [{
"sizes": [],
"ad_types": ["banner"],
"uuid": "275015f90ea6f6",
"id": 13144370,
"allow_smaller_sizes": false,
"use_pmt_rule": false,
"prebid": true,
"disable_psa": true
}],
"sdk": {
"source": "pbjs",
"version": "1.15.0"
}
}
Additional Comments
Is there anything I've missed from the code? Or set the sizemap
incorrectly?
Thank you so much for sharing the project. Any help would be appreciated.