Skip to content

Commit

Permalink
Support schain in ZEDO adapter (prebid#4441)
Browse files Browse the repository at this point in the history
* changes to pass schain
  • Loading branch information
skazedo authored and tadam75 committed Jan 9, 2020
1 parent 93bd5dc commit c51be72
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions modules/zedoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ export const spec = {
}
data['placements'].push(placement);
});
// adding schain object
if (bidRequests[0].schain) {
data['supplyChain'] = getSupplyChain(bidRequests[0].schain);
}
return {
method: 'GET',
url: SECURE_URL,
Expand Down Expand Up @@ -154,12 +158,20 @@ export const spec = {
} catch (e) {
utils.logError(e);
}
},
}

};

function getSupplyChain (supplyChain) {
return {
complete: supplyChain.complete,
nodes: supplyChain.nodes
}
};

function getCreative(ad) {
return ad && ad.creatives && ad.creatives.length && find(ad.creatives, creative => creative.adId);
}
};
/**
* Unpack the Server's Bid into a Prebid-compatible one.
* @param serverBid
Expand Down

0 comments on commit c51be72

Please sign in to comment.