function openWrapCustom(){ if(typeof PWT.requestBids === 'function'){ PWT.requestBids( PWT.generateConfForGPT(googletag.pubads().getSlots()), function(adUnitsArray) { PWT.addKeyValuePairsToGPTSlots(adUnitsArray); PWT.ow_BidsReceived = true; initAdserver(false); } ); } var FAILSAFE_TIMEOUT = 1000; setTimeout(function() { initAdserver(true); }, FAILSAFE_TIMEOUT); } var PWT = {}; var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; var gptRan = false; PWT.jsLoaded = function () { loadGpt(); }; (function() { var purl = window.location.href; var url = '//ads.pubmatic.com/AdServer/js/pwt/158141/1400'; var profileVersionId = ''; if (purl.indexOf('pwtv=') > 0) { var regexp = /pwtv=(.*?)(&|$)/g; var matches = regexp.exec(purl); if (matches.length >= 2 && matches[1].length > 0) { profileVersionId = '/' + matches[1]; } } var wtads = document.createElement('script'); wtads.async = true; wtads.type = 'text/partytown'; wtads.src = url + profileVersionId + '/pwt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(wtads, node); })(); var loadGpt = function () { // Check the gptRan flag if (!gptRan) { gptRan = true; var gads = document.createElement('script'); var useSSL = 'https:' == document.location.protocol; gads.src = (useSSL ? 'https:' : 'http:') + '//securepubads.g.doubleclick.net/tag/js/gpt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(gads, node); } } // Failsafe to call gpt setTimeout(loadGpt, 500); function initAdserver(forced) { if((forced === true && window.initAdserverFlag !== true) || (PWT.a9_BidsReceived && PWT.ow_BidsReceived)){ window.initAdserverFlag = true; PWT.a9_BidsReceived = PWT.ow_BidsReceived = false; googletag.pubads().refresh(); } } !function(a9,a,p,s,t,A,g){if(a[a9])return;function q(c,r){a[a9]._Q.push([c,r])}a[a9]={init:function(){q("i",arguments)},fetchBids:function(){q("f",arguments)},setDisplayBids:function(){},_Q:[]};A=p.createElement(s);A.async=!0;A.src=t;A.type='text/partytown';g=p.getElementsByTagName(s)[0];g.parentNode.insertBefore(A,g)}("apstag",window,document,"script","//c.amazon-adsystem.com/aax2/apstag.js"); apstag.init({ pubID: 'a17c03c1-eb0c-4671-8a5d-3cb93c8ca58e', adServer: 'googletag' }); var interstitialSlot; window.googletag = window.googletag || { cmd: [] }; //window.addEventListener("load", function(){ apstag.fetchBids({ slots: [ { slotID: 'Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_ATF_300x250', sizes: [[300, 250]] }, { slotID: 'Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_BTF_1_300x250', sizes: [[300, 250]] }, { slotID: 'Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_BTF_2_300x250', sizes: [[300, 250]] }, { slotID: 'Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_Inarticle_300x250', sizes: [[300, 250]] }, { slotID: 'Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_ATF_970x90', sizes: [[728, 90]] } ],timeout: 1000 // Make Sure this timeout is less than or equal to OpenWrap TimeOut }, function(bids) { googletag.cmd.push(function(){ apstag.setDisplayBids(); PWT.a9_BidsReceived = true; initAdserver(false); }); }); //jQuery( window ).one('scroll',function() { googletag.cmd.push(function() { googletag.defineSlot('/11440465/Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_ATF_970x90', [[728, 90]], 'Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_ATF_970x90').addService(googletag.pubads()).setTargeting('Section', ['TV']); googletag.defineSlot('/11440465/Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_ATF_300x250', [[300,250]], 'Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_ATF_300x250').addService(googletag.pubads()).setTargeting('Section', ['TV']); googletag.defineSlot('/11440465/Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_BTF_1_300x250', [[300,250]], 'Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_BTF_1_300x250').addService(googletag.pubads()).setTargeting('Section', ['TV']); googletag.defineSlot('/11440465/Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_BTF_2_300x250', [[300,250]], 'Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_BTF_2_300x250').addService(googletag.pubads()).setTargeting('Section', ['TV']); googletag.defineSlot('/11440465/Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_Inarticle_300x250', [[300,250]], 'Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_Inarticle_300x250').addService(googletag.pubads()).setTargeting('Section', ['TV']); interstitialSlot = googletag.defineOutOfPageSlot('/11440465/Bollywoodlife_Web/Bollywoodlife_hindi_AS_OOP_1x1',googletag.enums.OutOfPageFormat.INTERSTITIAL).addService(googletag.pubads()).setTargeting('Category', ['TV','ZEE_MEDIA']); googletag.pubads().enableLazyLoad({ fetchMarginPercent: 50, renderMarginPercent: 50, mobileScaling: 2.0 }); googletag.pubads().disableInitialLoad(); googletag.pubads().collapseEmptyDivs(); googletag.enableServices(); openWrapCustom(); }); googletag.cmd.push(function() { googletag.display('Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_ATF_970x90'); }); googletag.cmd.push(function() { googletag.display('Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_ATF_300x250'); }); googletag.cmd.push(function() { googletag.display('Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_BTF_1_300x250'); }); googletag.cmd.push(function() { googletag.display('Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_BTF_2_300x250'); }); googletag.cmd.push(function() { googletag.display('Bollywoodlife_hindi_Web/Bollywoodlife_hindi_AS_Inarticle_300x250'); }); googletag.cmd.push(function() { googletag.display(interstitialSlot); }); //});