Created
December 21, 2016 15:39
-
-
Save nickjacob/4e14f5f7b551704d8343c931ffee0408 to your computer and use it in GitHub Desktop.
gearheads prebid price granularity code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// around line 341 on homepage template | |
var bidderSettings = { | |
brealtime: { | |
bidCpmAdjustment : function(bidCpm){ | |
// adjust the bid in real time before the auction takes place | |
return bidCpm * .80; | |
} | |
}, | |
rubicon: { | |
bidCpmAdjustment : function(bidCpm){ | |
return bidCpm * .85; | |
} | |
}, | |
standard: { | |
adserverTargeting: [ | |
{ | |
key: "hb_bidder", | |
val: function(bidResponse) { | |
return bidResponse.bidderCode; | |
} | |
}, { | |
key: "hb_adid", | |
val: function(bidResponse) { | |
return bidResponse.adId; | |
} | |
}, { | |
key: "hb_pb", | |
val: function(bidResponse) { | |
// NOTE: this is the only line that changes | |
if (bidResponse.cpm < 20.00) { | |
return bidResponse.pbHg; // 1-cent increments | |
} | |
return '20.00'; // anything > 20 becomes $20 | |
} | |
} | |
] | |
}, | |
key: "hb_pb" | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment