(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-72484814-1', 'auto'); Insticator.helper = (function () { return { isMobileDevice: (function(){return/(android|bb\d |meego). mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))?!0:!1})() }; }()); var PREBID_TIMEOUT = 4000; Insticator.ad.ready = false; var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; function initAdserver() { if (pbjs.initAdserverSet) return; (function() { var gads = document.createElement('script'); gads.async = true; gads.type = 'text/javascript'; var useSSL = 'https:' == document.location.protocol; gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(gads, node); })(); googletag.cmd.push(function() { pbjs.que.push(function() { pbjs.setTargetingForGPTAsync(); }); }); Insticator.ad.ready = true; Insticator.ad.loadAllAds(); pbjs.initAdserverSet = true; }; setTimeout(initAdserver, PREBID_TIMEOUT); var pbjs = pbjs || {}; pbjs.que = pbjs.que || []; (function() { var pbjsEle = document.createElement("script"); pbjsEle.type = "text/javascript"; pbjsEle.async = true; pbjsEle.src = "https://embed.insticator.com/vassets/javascripts/advertisement/insticator-ad-hb-v4.js"; var pbjsTargetEl = document.getElementsByTagName("head")[0]; pbjsTargetEl.insertBefore(pbjsEle, pbjsTargetEl.firstChild); })(); pbjs.que.push(function() { pbjs.enableAnalytics({ provider: 'ga', options: { global: 'ga', enableDistribution: false, } }); }); if(!Insticator.helper.isMobileDevice) { var adUnits = []; var adUnit = { code: 'div-insticator-ad-1', sizes: [300, 250], }, bids = []; var bid = { bidder: 'openx', params: { jstag_url: 'http://ox-d.insticator.servedbyopenx.com/w/1.0/jstag?nc=27794161-RON', unit: '538152069' } } bids.push(bid); var bid = { bidder: 'sovrn', params: { tagid: '325041' } } bids.push(bid); var bid = { bidder: 'pubmatic', params: { publisherId: '95054', adSlot: '/27794161/thehockeynews.com_Web_300x250_1@300x250' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754288', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754306', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754289', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754291', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754294', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754296', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754298', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754300', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754301', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754303', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'appnexus', params: { placementId: '6516357' } } bids.push(bid); adUnit.bids = bids; adUnits.push(adUnit); var adUnit = { code: 'div-insticator-ad-2', sizes: [300, 250], }, bids = []; var bid = { bidder: 'openx', params: { jstag_url: 'http://ox-d.insticator.servedbyopenx.com/w/1.0/jstag?nc=27794161-RON', unit: '538152069' } } bids.push(bid); var bid = { bidder: 'sovrn', params: { tagid: '325352' } } bids.push(bid); var bid = { bidder: 'pubmatic', params: { publisherId: '95054', adSlot: '/27794161/thehockeynews.com_Web_300x250_2@300x250' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754287', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754305', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754290', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754292', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754293', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754295', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754297', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754299', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754302', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3754304', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'appnexus', params: { placementId: '6516358' } } bids.push(bid); adUnit.bids = bids; adUnits.push(adUnit); } else { var adUnits = []; var adUnit = { code: 'div-insticator-ad-1', sizes: [300, 250], }, bids = []; var bid = { bidder: 'openx', params: { jstag_url: 'http://ox-d.insticator.servedbyopenx.com/w/1.0/jstag?nc=27794161-RON', unit: 'openXAdUnitSizeMap["300x250"]' } } bids.push(bid); var bid = { bidder: 'sovrn', params: { tagid: '325043' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758160', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758177', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758161', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758163', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758166', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758167', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758169', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758171', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758174', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758175', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'appnexus', params: { placementId: '6516359' } } bids.push(bid); adUnit.bids = bids; adUnits.push(adUnit); var adUnit = { code: 'div-insticator-ad-2', sizes: [300, 250], }, bids = []; var bid = { bidder: 'openx', params: { jstag_url: 'http://ox-d.insticator.servedbyopenx.com/w/1.0/jstag?nc=27794161-RON', unit: 'openXAdUnitSizeMap["300x250"]' } } bids.push(bid); var bid = { bidder: 'sovrn', params: { tagid: '325044' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758159', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758178', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758162', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758164', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758165', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758168', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758170', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758172', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758173', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'aol', params: { placement: '3758176', secure: false, network: '10064.1' } } bids.push(bid); var bid = { bidder: 'appnexus', params: { placementId: '6516363' } } bids.push(bid); adUnit.bids = bids; adUnits.push(adUnit); } pbjs.que.push(function() { pbjs.addAdUnits(adUnits); pbjs.requestBids({ bidsBackHandler: function(bidResponses) { } }) }); pbjs.bidderSettings = { 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) { return bidResponse.pbMg; } }, { key: 'hb_size', val: function(bidResponse) { return bidResponse.size; } }] }, aol: { alwaysUseBid : false, adserverTargeting: [{ key: 'aolbid', val: function(bidResponse) { var cpm = bidResponse.cpm; return cpm < 20 ? Math.floor(cpm*100/5)*5 : 2000; } }, { key: 'aol_adid', val: function(bidResponse) { return bidResponse.adId; } }] }, openx: { alwaysUseBid : true, adserverTargeting: [{ key: 'ox300x250', val: function(bidResponse) { var cpm = bidResponse.cpm; if (cpm < 2.00) { return Math.floor(cpm*100/5)*5; } else if (cpm < 5.00) { return Math.floor(cpm*100/10)*10; } else if (cpm < 20.00) { return Math.floor(cpm*100/50)*50; } else { return 2000; } } }] }, pubmatic: { alwaysUseBid : true, adserverTargeting: [{ key: 'bidstatus', val: 1 },{ key: 'bid', val: function(bidResponse) { var cpm = bidResponse.cpm; return cpm < 20 ? cpm.toFixed(2) : 20.00; } }, { key: 'pubmatic_adid', val: function(bidResponse) { return bidResponse.adId; } }] }, sovrn: { alwaysUseBid : true, adserverTargeting: [{ key: 'sovrnbid', val: function(bidResponse) { var cpm = bidResponse.cpm; return cpm < 20 ? Math.floor(cpm*100/5)*5 : 2000; } }, { key: 'sovrn_adid', val: function(bidResponse) { return bidResponse.adId; } }] }, appnexus: { alwaysUseBid : true, adserverTargeting: [{ key: 'appnexusbid', val: function(bidResponse) { var cpm = bidResponse.cpm; return cpm < 20 ? Math.floor(cpm*100/5)*5 : 2000; } }, { key: 'appnexus_adid', val: function(bidResponse) { return bidResponse.adId; } }] } }; if(!Insticator.helper.isMobileDevice) { var adUnitSizeListJsonString = '{'; adUnitSizeListJsonString += '"div-insticator-ad-1" : { "width" : 300, "height" : 250}, '; adUnitSizeListJsonString += '"div-insticator-ad-2" : { "width" : 300, "height" : 250}, '; adUnitSizeListJsonString = adUnitSizeListJsonString.slice(0, -2); adUnitSizeListJsonString +='}'; } else { var adUnitSizeListJsonString = '{'; adUnitSizeListJsonString += '"div-insticator-ad-1" : { "width" : 300, "height" : 250}, '; adUnitSizeListJsonString += '"div-insticator-ad-2" : { "width" : 300, "height" : 250}, '; adUnitSizeListJsonString = adUnitSizeListJsonString.slice(0, -2); adUnitSizeListJsonString +='}'; } Insticator.adslots = []; googletag.cmd.push(function () { if (!Insticator.helper.isMobileDevice) { Insticator.adslots.push(googletag.defineSlot('/27794161/thehockeynews.com_Web_300x250_1', [300, 250], 'div-insticator-ad-1').addService(googletag.pubads()).setTargeting("refurl", window.location.host)); Insticator.adslots.push(googletag.defineSlot('/27794161/thehockeynews.com_Web_300x250_2', [300, 250], 'div-insticator-ad-2').addService(googletag.pubads()).setTargeting("refurl", window.location.host)); } else { Insticator.adslots.push(googletag.defineSlot('/27794161/thehockeynews.com_Mobile_300x250_1', [300, 250], 'div-insticator-ad-1').addService(googletag.pubads()).setTargeting("refurl", window.location.host)); Insticator.adslots.push(googletag.defineSlot('/27794161/thehockeynews.com_Mobile_300x250_2', [300, 250], 'div-insticator-ad-2').addService(googletag.pubads()).setTargeting("refurl", window.location.host)); } googletag.pubads().enableSingleRequest(); googletag.enableServices(); }); function refreshBids() { pbjs.que.push(function() { pbjs.requestBids({ timeout: PREBID_TIMEOUT, bidsBackHandler: function() { pbjs.setTargetingForGPTAsync(); googletag.pubads().refresh(Insticator.adslots); } }); }); } (function() { "use strict"; var refreshAd = function() { refreshBids(); } var queue = Insticator.ad.q; Insticator.ad.loadAd = function(containerId) { if(Insticator.ad.ready) { console.log("displayAd: " + containerId); googletag.cmd.push(function() { googletag.display(containerId); }); var adUnitsSize = JSON.parse(adUnitSizeListJsonString); if(adUnitsSize.hasOwnProperty(containerId)) { var adSize = adUnitsSize[containerId]; var style = "width:" + adSize["width"] + "px;height:" + adSize["height"] + "px;"; document.getElementById(containerId).setAttribute("style", style); } } else { console.log("add to queue: " + containerId); queue.push(containerId); } } Insticator.ad.action = function(e) { switch (e.data.action) { case "refreshAd": refreshAd(); break; } } Insticator.ad.loadAllAds = function() { console.log("loadAllAds"); queue.forEach(function(containerId) { console.log("displayAd: " + containerId); googletag.cmd.push(function() { googletag.display(containerId); }); var adUnitsSize = JSON.parse(adUnitSizeListJsonString); if(adUnitsSize.hasOwnProperty(containerId)) { var adSize = adUnitsSize[containerId]; var style = "width:" + adSize["width"] + "px;height:" + adSize["height"] + "px;"; document.getElementById(containerId).setAttribute("style", style); } }); } }()); window.addEventListener("message", Insticator.ad.action, false); (function() { var simplifiJsElement = document.createElement("script"); simplifiJsElement.type = "text/javascript"; simplifiJsElement.async = true; simplifiJsElement.src = "https://i.simpli.fi/dpx.js?cid=42167&m=1&sifi_tuid=20769"; var simplifiJsTargetElement = document.getElementsByTagName("head")[0]; simplifiJsTargetElement.insertBefore(simplifiJsElement, simplifiJsTargetElement.firstChild); })();