Skip to content

Commit

Permalink
Interactive Offers Bid Adapter: add data to response object (#6680)
Browse files Browse the repository at this point in the history
Co-authored-by: EC2 Default User <ec2-user@ip-172-31-93-198.ec2.internal>
  • Loading branch information
2 people authored and idettman committed May 21, 2021
1 parent 0e816f9 commit bf37b44
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion modules/interactiveOffersBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```
Module Name: interactiveOffers Bidder Adapter
Module Type: Bidder Adapter
Maintainer: faria@interactiveoffers.com
Maintainer: dev@interactiveoffers.com
```

# Description
Expand Down
1 change: 1 addition & 0 deletions test/spec/modules/interactiveOffersBidAdapter_spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bf37b44

Please sign in to comment.