geo_code = 'US'; window.googletag = window.googletag || { cmd: [] }; var srcgpt = 'https://www.googletagservices.com/tag/js/gpt.js'; var scriptgpt = document.createElement("script"); scriptgpt.src = srcgpt; document.head.appendChild(scriptgpt); var srcprbd = 'https://cdn.sporx.com/_js/prbd_9.7.0.js'; var scriptprbd = document.createElement("script"); scriptprbd.src = srcprbd; document.head.appendChild(scriptprbd); var vidout_interstitial = false; var show_dfp_prestitial = true; var dfp_willload = true; var kategori_page = "anasayfa"; function dfp_getCookie(cname) { //return ""; var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i-1){ show_dfp_prestitial = false; console.log("Referrer Google"); } } var slot_name; var js_pre_ac = false; var orderId = 0; var ints_premium = false; googletag.cmd.push(function() { pbjs.que.push(function () { var adUnits = [{ code: "dfp_320x50_header", mediaTypes: {banner: { sizes: [[320, 100], [320, 50]] } }, bids: [ { bidder: "rtbhouse", params: { region: 'prebid-eu', publisherId: 't5TElWmclKkt5iDhGHuP' } }, { bidder: "turktelekom", params: { host: 'cpm.programattik.com', zoneId: 541 } }, { bidder: "yandex", params: { pageId: 4109274, impId: 2, cur: 'TRY' } }, { bidder: "pixad", params: { networkId: 6300536510, host: 'maksimum.rtb.pixad.com.tr' } } ] }, { code: 'dfp_300x250', mediaTypes: { banner: { sizes: [[300, 250], [336, 280]] } }, bids: [ { bidder: "rtbhouse", params: { region: 'prebid-eu', publisherId: 't5TElWmclKkt5iDhGHuP' } }, { bidder: "turktelekom", params: { host: 'cpm.programattik.com', zoneId: 542 } }, { bidder: "yandex", params: { pageId: 4109274, impId: 2, cur: 'TRY' } }, { bidder: "pixad", params: { networkId: 6300536510, host: 'maksimum.rtb.pixad.com.tr' } } ] },{ code: 'dfp_320x50_sticky', mediaTypes: { banner: { sizes: [[320, 100], [320, 50]] } }, bids: [ { bidder: "rtbhouse", params: { region: 'prebid-eu', publisherId: 't5TElWmclKkt5iDhGHuP' } }, { bidder: "turktelekom", params: { host: 'cpm.programattik.com', zoneId: 541 } }, { bidder: "yandex", params: { pageId: 4109274, impId: 2, cur: 'TRY' } }, { bidder: "pixad", params: { networkId: 6300536510, host: 'maksimum.rtb.pixad.com.tr' } } ] }]; pbjs.setConfig({ 'criteo': { fastBidVersion: 'latest', }, debug: false, cache: { url: false }, }); pbjs.addAdUnits(adUnits); }); var mapping300x250 = googletag.sizeMapping() .addSize([336, 480], ['fluid', [336, 280], [300, 250], [320, 480]]) .addSize([0, 0], [[300, 250], 'fluid']) .build(); googletag.defineSlot('/22809762/Mobil_Sporx.com_Web_320x50_Header_Diger', [[320, 100], [320, 120], 'fluid'], 'dfp_320x50_header').setTargeting('no_fl', ['1']).addService(googletag.pubads()); var dfp_slot_320x50_sticky = googletag.defineSlot('/22809762/Mobil_Sporx.com_Web_320x50_Sticky', [[320, 100], [320, 50], 'fluid'], 'dfp_320x50_sticky').addService(googletag.pubads()); googletag.pubads().setTargeting("catId", "21"); googletag.pubads().addEventListener('slotRenderEnded', function(event) { console.log(event); slot_name = event.slot.getAdUnitPath(); orderId = event.campaignId; console.log("Slot Name => "+slot_name); if(event.isEmpty){ console.log("Banner gelmedi: "+slot_name); if(slot_name == "/22809762/Mobil_Sporx.com_Web_320x50_Sticky"){ console.log("admatic sticky call"); $("#dfp_320x50_sticky_dis").css("display","none"); } } else{ console.log("Banner geldi: "+slot_name); if(slot_name == "/22809762/Mobil_Sporx.com_Web_320x50_Sticky" && orderId && orderId!="3009030600"){ console.log("sticky ac"); console.log("sticky width:",event.size[0]); console.log("sticky height:",event.size[1]); if(event.size[1]==1)setTimeout(function () { var sticky_height = document.getElementById('dfp_320x50_sticky').clientHeight; if(sticky_height<100)sticky_height = 100; $("#dfp_320x50_sticky_dis").css("height",sticky_height+"px"); }, 1000); $("#dfp_320x50_sticky_dis").css("display","block"); $("#dfp_320x50_sticky_dis").css("height",event.size[1]+"px"); $("#sticky_closediv").css("display","block"); setTimeout(function(){ $(".back-to").css("display","none"); $("#cookie_text").css("bottom",event.size[1]+"px"); },500); } if(slot_name == "/22809762/Mobil_Sporx.com_Web_Interstitial_Premium"){ ints_premium = true; } } }); googletag.pubads().setTargeting("kategori", "futbol"); googletag.pubads().enableSingleRequest(); googletag.pubads().collapseEmptyDivs(true); googletag.pubads().disableInitialLoad(); pbjs.requestBids({ timeout: PREBID_TIMEOUT, bidsBackHandler: function(bidResponses) { initAdserver(); } }); setTimeout(initAdserver, FAILSAFE_TIMEOUT); googletag.enableServices(); });