Skip to content

Commit

Permalink
cedato adapter added additional req info (prebid#4508)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkh13 authored and afewcc committed Dec 10, 2019
1 parent 5add80c commit db29276
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions modules/cedatoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,27 @@ export const spec = {
const user = { id: getUserID() }
const currency = CURRENCY;
const tmax = bidderRequest.timeout;
const auctionId = bidderRequest.auctionId;
const auctionStart = bidderRequest.auctionStart;
const bidderRequestId = bidderRequest.bidderRequestId;

const imp = bidRequests.map(req => {
const banner = getMediaType(req, 'banner');
const video = getMediaType(req, 'video');
const bidfloor = params.bidfloor;
const bidId = req.bidId;
const adUnitCode = req.adUnitCode;
const bidRequestsCount = req.bidRequestsCount;
const transactionId = req.transactionId;

return {
bidId,
banner,
video,
adUnitCode,
bidfloor,
bidRequestsCount,
transactionId
};
});

Expand All @@ -61,13 +68,19 @@ export const spec = {
imp,
currency,
tmax,
auctionId,
auctionStart,
bidderRequestId
};

if (bidderRequest && bidderRequest.gdprConsent) {
payload.gdpr_consent = {
consent_string: bidderRequest.gdprConsent.consentString,
consent_required: bidderRequest.gdprConsent.gdprApplies
};
if (bidderRequest) {
payload.referer_info = bidderRequest.refererInfo;
if (bidderRequest.gdprConsent) {
payload.gdpr_consent = {
consent_string: bidderRequest.gdprConsent.consentString,
consent_required: bidderRequest.gdprConsent.gdprApplies
};
}
}

return {
Expand Down

0 comments on commit db29276

Please sign in to comment.