Skip to content

Commit

Permalink
Merge pull request #13 from Marfeel/SSP-11947/AdaptConversantAdapterF…
Browse files Browse the repository at this point in the history
…orMultisize

SSP-11947 / Adapt Conversant Media multisize
  • Loading branch information
adriafolchmrf authored Jun 28, 2018
2 parents 5567df2 + 5d7aa21 commit d840cc1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions modules/conversantBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export const spec = {
displaymanagerver: VERSION
};

const imps = [];

copyOptProperty(bid.params, 'tag_id', imp, 'tagid');

if (isVideoRequest(bid)) {
Expand All @@ -92,19 +94,23 @@ export const spec = {

copyOptProperty(bid.params, 'position', banner, 'pos');

imp.banner = banner;
banner.format.forEach(size => {
let clonedImp = Object.assign({}, imp);
clonedImp.banner = {format: [size]};
imps.push(clonedImp);
});
}

if (bid.crumbs && bid.crumbs.pubcid) {
pubcid = bid.crumbs.pubcid;
}

return imp;
return imps;
});

const payload = {
id: requestId,
imp: conversantImps,
imp: conversantImps[0],
site: {
id: siteId,
mobile: document.querySelector('meta[name="viewport"][content*="width=device-width"]') !== null ? 1 : 0,
Expand Down

0 comments on commit d840cc1

Please sign in to comment.