Skip to content

Commit

Permalink
Prebid Server returns exp rather than ttl (#5715)
Browse files Browse the repository at this point in the history
Updating how pbsBidAdapter sets the "TTL" for bids. 

TTL in PBJS terms is how long the bid can stay in cache. However, the OpenRTB standard location for this value is `exp`.
  • Loading branch information
bretg authored Sep 11, 2020
1 parent 1e9be73 commit 896cc0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/prebidServerBidAdapter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -825,9 +825,9 @@ const OPEN_RTB_PROTOCOL = {
bidObject.meta = bidObject.meta || {};
if (bid.adomain) { bidObject.meta.advertiserDomains = bid.adomain; }

// TODO: Remove when prebid-server returns ttl and netRevenue
const configTtl = _s2sConfig.defaultTtl || DEFAULT_S2S_TTL;
bidObject.ttl = (bid.ttl) ? bid.ttl : configTtl;
// the OpenRTB location for "TTL" as understood by Prebid.js is "exp" (expiration).
bidObject.ttl = (bid.exp) ? bid.exp : configTtl;
bidObject.netRevenue = (bid.netRevenue) ? bid.netRevenue : DEFAULT_S2S_NETREVENUE;

bids.push({ adUnit: bid.impid, bid: bidObject });
Expand Down

0 comments on commit 896cc0f

Please sign in to comment.