Skip to content

Commit

Permalink
Malltv bid adapter: added gdpr applies and gdpr consent to bid reques…
Browse files Browse the repository at this point in the history
…t parameters (#8000)

* Update malltvBidAdapter.md

Changing maintainer of bid adapter

* Added gdprApplies and gpdrConsent to bid request parameters

Added gdprApplies and gpdrConsent to bid request parameters

* Check for gdprConsent object

* Updated gdpr
  • Loading branch information
ZikaMyhedin authored Feb 2, 2022
1 parent 130f726 commit 823021a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/malltvBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ export const spec = {
let contents = [];
let data = {};
let auctionId = bidderRequest ? bidderRequest.auctionId : '';

let gdrpApplies = true;
let gdprConsent = '';
let placements = validBidRequests.map(bidRequest => {
if (!propertyId) { propertyId = bidRequest.params.propertyId; }
if (!pageViewGuid && bidRequest.params) { pageViewGuid = bidRequest.params.pageViewGuid || ''; }
if (!bidderRequestId) { bidderRequestId = bidRequest.bidderRequestId; }
if (!url && bidderRequest) { url = bidderRequest.refererInfo.referer; }
if (!contents.length && bidRequest.params.contents && bidRequest.params.contents.length) { contents = bidRequest.params.contents; }
if (Object.keys(data).length === 0 && bidRequest.params.data && Object.keys(bidRequest.params.data).length !== 0) { data = bidRequest.params.data; }

if (bidderRequest && bidRequest.gdprConsent) { gdrpApplies = bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies ? bidderRequest.gdprConsent.gdprApplies : true; }
if (bidderRequest && bidRequest.gdprConsent) { gdprConsent = bidderRequest.gdprConsent && bidderRequest.gdprConsent.consentString ? bidderRequest.gdprConsent.consentString : ''; }
let adUnitId = bidRequest.adUnitCode;
let placementId = bidRequest.params.placementId;
let sizes = generateSizeParam(bidRequest.sizes);
Expand All @@ -75,7 +77,9 @@ export const spec = {
requestid: bidderRequestId,
placements: placements,
contents: contents,
data: data
data: data,
gdpr_applies: gdrpApplies,
gdpr_consent: gdprConsent,
}

return [{
Expand Down

0 comments on commit 823021a

Please sign in to comment.