Skip to content

Commit

Permalink
Interactive Offers Bid Adapter: added data to the final response object
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User committed Apr 23, 2021
1 parent ced2ced commit fdac148
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modules/interactiveOffersBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ function parseRequestPrebidjsToOpenRTB(prebidRequest) {
let secure = (window.location.protocol == 'https:' ? 1 : 0);
let openRTBRequest = JSON.parse(JSON.stringify(DEFAULT['OpenRTBBidRequest']));
openRTBRequest.id = prebidRequest.auctionId;
openRTBRequest.ext = {
auctionstart: Date.now()
};

openRTBRequest.site = JSON.parse(JSON.stringify(DEFAULT['OpenRTBBidRequestSite']));
openRTBRequest.site.id = domain;
Expand Down Expand Up @@ -139,6 +142,16 @@ function parseResponseOpenRTBToPrebidjs(openRTBResponse) {
prebid.ad = bid.adm;
prebid.creativeId = bid.crid;
prebid.cpm = bid.price;
prebid.width = bid.w;
prebid.height = bid.h;
prebid.mediaType = 'banner';
prebid.meta = {
advertiserDomains: bid.adomain,
advertiserId: bid.adid,
mediaType: 'banner',
primaryCatId: bid.cat[0] || '',
secondaryCatIds: bid.cat
}
prebidResponse.push(prebid);
});
});
Expand Down

0 comments on commit fdac148

Please sign in to comment.