Skip to content

Commit 8d58217

Browse files
bretgBrightMountainMedia
authored and
BrightMountainMedia
committed
Prebid Server returns exp rather than ttl (prebid#5715)
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`.
1 parent 88a3a64 commit 8d58217

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/prebidServerBidAdapter/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -825,9 +825,9 @@ const OPEN_RTB_PROTOCOL = {
825825
bidObject.meta = bidObject.meta || {};
826826
if (bid.adomain) { bidObject.meta.advertiserDomains = bid.adomain; }
827827

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

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

0 commit comments

Comments
 (0)