Utah News, Sports, Weather and Classifieds

. Example: 300×600
* @param { Function(bid, bidid) } onRender
* @param { number= } maxTries Amount of times to check if RTB data is ready. Defaults to 5
* @param { number= } maxWait Amount of milliseconds to wait between attempts to get RTB data. Defaults to 100
*/
KSL.news.dfp.renderAdsWithRTB = function (pos, size, onRender, maxTries, maxWait) {
var adKey = KSL.news.dfp.pubMatic.zone + ‘_’ + pos + ‘@’ + size;

maxTries = maxTries || 5;
maxWait = maxWait || 100;

/*
if (maxTries > 0) {
if (window.progKeyValueMap && window.progKeyValueMap[adKey]) {
delete window.progKeyValueMap[adKey];
}

PubMaticGrouped.showAd({ pubId: KSL.news.dfp.pubMatic.id, a: 1 }, [adKey]);
}
*/

function checkBidValues() {
var progKeyValueMap = window.progKeyValueMap || {};

if (typeof progKeyValueMap[adKey] === ‘string’) {
var bid = progKeyValueMap[adKey].split(‘;’);
// bid should look like [“bidstatus”, “1”, “bid”, “1.5000”, “bidid”, “news_right@300×250”, “wdeal”, “”]
if (bid.length > 5) {
onRender(bid[3], bid[5]);
} else {
onRender(null, null);
}
} else if (–maxTries) {
setTimeout(checkBidValues,…

Read the full article at foxnews.com…

Leave a Reply

Your email address will not be published. Required fields are marked *