[]
{ return logEvent(analytics, key, val) }, fetchAndActivate: fetchAndActivate, getValue: (key) => { return getValue(key) } } ]]> x != “”); }; window.GAMLibrary = {}; window.GAMLibrary = { gamImmersive: ‘/36504930/KLY/DESKTOP/FIMELA.COM/IMMERSIVE’, gamTopFrame: ‘/36504930/KLY/DESKTOP/FIMELA.COM/TOP_FRAME’, gamBottomFrame: ‘/36504930/KLY/DESKTOP/FIMELA.COM/BOTTOM_FRAME’, gamSkinad: ‘/36504930/KLY/DESKTOP/FIMELA.COM/SKINAD’, gamBillboard: ‘/36504930/KLY/DESKTOP/FIMELA.COM/MASTHEAD’, gamShowcase: ‘/36504930/KLY/DESKTOP/FIMELA.COM/SHOWCASE’, gamHalfpage1: ‘/36504930/KLY/DESKTOP/FIMELA.COM/HALFPAGE_1’, gamHalfpage2: ‘/36504930/KLY/DESKTOP/FIMELA.COM/HALFPAGE_2’, gamLeaderboard: ‘/36504930/KLY/DESKTOP/FIMELA.COM/LEADERBOARD’, gamBalloon: ‘/36504930/KLY/DESKTOP/FIMELA.COM/BALLOON’, gamOrganicFeedCRM1: ‘/36504930/KLY/DESKTOP/FIMELA.COM/ORGANIC_FEED_CRM_1’, gamOrganicFeedCRM2: ‘/36504930/KLY/DESKTOP/FIMELA.COM/ORGANIC_FEED_CRM_2’, gamOrganicFeedCRM3: ‘/36504930/KLY/DESKTOP/FIMELA.COM/ORGANIC_FEED_CRM_3’, tags: ”, documentMeta: function(metaName) { var metaResult = ”; var metas = document.getElementsByTagName(‘meta’); if (metas) { for (var x = 0, y = metas.length; x 0) { if (matchString = new RegExp(“\b(” + subKeywordList.join(“|”) + “)\b”, “ig”).exec(siteContentText)) { bsKeyword.push(bsKey); } } } if (bsKeyword.length > 0) { googletag.pubads().setTargeting(“bsKeyword”, bsKeyword); /*Temporary preserve the previous brand safety targeting*/ googletag.pubads().setTargeting(“isMatcont”, isMatcont); googletag.pubads().setTargeting(“brandsafety”, isViolateBrandSafety); } }, onMessageReceivedGPTUpdateCreativeStyle: function() { this.onMessageReceivedGetStyle = function(e) { /** filter only correct origin and setStyle command */ if (!(e.origin.match(/safeframe.googlesyndication.com/ig)) || typeof e.data !== ‘object’ || typeof e.data.id !== ‘string’ || e.data.cmd !== ‘setStyle’ || typeof e.data.params !== ‘object’ ) { return; } /* remove # character from id, we don’t use jquery*/ var elementId = e.data.id.replace(/#/, “”); var wrapperEl = document.getElementById(elementId); if (wrapperEl === null) { return; } var elements = [wrapperEl]; /*target on KLY authorized element child ( div and iframe ) */ if (typeof e.data.query === ‘string’ && e.data.query) { let el = null; if (el = e.data.query.match(/(div|iframe)/ig)) { elements = wrapperEl.querySelectorAll(el.join(“, “)); } } /** target on KLY authorized attribute ( display, heigth, width ) */ elements.forEach(function(element) { Object.keys(e.data.params).forEach(function(param) { let allowedAttr = [‘display’, ‘height’, ‘width’]; allowedAttr.indexOf(param) > -1 ? (element.style[param] = e.data.params[param]) : ”; }); }); } if (window.addEventListener) { window.addEventListener(‘message’, this.onMessageReceivedGetStyle, false); } else { if (window.attachEvent) { window.attachEvent(‘onmessage’, this.onMessageReceivedGetStyle); } else { window.onmessage = this.onMessageReceivedGetStyle; } } } } /** LOAD PREBID – START */ /** START – PREBID FUNCTION LIST */ function spotxOutstreamFunc(bid) { function mobileAndTabletcheck() { var check = false; (function(a) { if ( /(android|bbd+|meego).+mobile|avantgo|bada/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|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|xda|xiino|android|ipad|playbook|silk/i.test( a ) || /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( a.substr(0, 4) ) ) check = true; })(navigator.userAgent || navigator.vendor || window.opera); return check; } var bMobile = mobileAndTabletcheck(); if (bMobile) { var playerWidth = 300; var playerHeight = 169; } else { var playerWidth = 640; var playerHeight = 360; } const videoDiv = bid.adUnitCode; let script = window.document.createElement(“script”); script.type = “text/javascript”; script.src = “//cdn.spotxcdn.com/website/integration_test/media/asia/EASI.js”; script.setAttribute(“data-spotx_channel_id”, “” + bid.channel_id); script.setAttribute(“data-spotx_vast_url”, “” + bid.vastUrl); script.setAttribute(“data-spotx_content_width”, playerWidth); script.setAttribute(“data-spotx_content_height”, playerHeight); script.setAttribute(“data-spotx_content_page_url”, bid.renderer.config.content_page_url); script.setAttribute(“data-spotx_ad_unit”, “incontent”); script.setAttribute(“data-spotx_autoplay”, “1”); script.setAttribute(“data-spotx_continue_out_of_view”, “1”); script.setAttribute(“data-spotx_content_container_id”, videoDiv); var vid_contain = window.document.getElementById(videoDiv); vid_contain.style.cssText = “display: none; margin-bottom: 20px”; vid_contain.appendChild(script); } /** END – PREBID FUNCTION LIST */ /** START – PREBID INITIATE CLASS */ class PrebidInstantiate { constructor(timeout, fstimeout, hbtimeout, adunitDisplay, adunitVideo, price) { this.PREBID_TIMEOUT = timeout; this.FAILSAFE_TIMEOUT = fstimeout; this.HB_TIMEOUT = hbtimeout; this.ADUNITDISPLAY = adunitDisplay; this.ADUNITVIDEO = adunitVideo; this.PRICE = price; this.pushBid(); this.failsafePrebid(); } failsafePrebid() { let that = this; setTimeout(function() { that.initAdserver(); }, this.FAILSAFE_TIMEOUT); } pushBid() { pbjs.que.push(() => { pbjs.addAdUnits(this.ADUNITDISPLAY); pbjs.addAdUnits(this.ADUNITVIDEO); pbjs.setConfig({ priceGranularity: this.PRICE, enableSendAllBids: true, cache: { url: ‘https://prebid.adnxs.com/pbc/v1/cache’ }, // bidderTimeout: 2000, }); pbjs.requestBids({ bidsBackHandler: this.initAdserver, timeout: this.PREBID_TIMEOUT, }); }); } initAdserver() { if (pbjs.initAdserverSet) return; pbjs.initAdserverSet = true; // Get all of the adUnit codes for the display adUnits var displayAdUnitCodes = []; adUnitsDisplay.forEach(function(adUnit) { displayAdUnitCodes.push(adUnit.code); //console.log(adUnit.code); }); googletag.cmd.push(function() { pbjs.que.push(function() { pbjs.setTargetingForGPTAsync(displayAdUnitCodes); googletag.pubads().refresh([window.GAMLibrary.showcase]); googletag.pubads().refresh([window.GAMLibrary.halfpage1]); googletag.pubads().refresh([window.GAMLibrary.leaderboard]); }); }); } } /** START – PREBID INITIATE CLASS */ /** START – PREBID INIT, CONFIGURATION & GOOGLE INIT */ const priceGranularityConfig = { buckets: [{ precision: 2, min: 0.02, max: 2.99, increment: 0.01 }, { precision: 2, min: 3, max: 10, increment: 0.1 }, ], }; var gptadslots = []; var googletag = googletag || {}; var pbjs = pbjs || {}; var adUnitsDisplay = [{ code: “div-gpt-ad-fimela-sc-1”, mediaTypes: { banner: { sizes: [ [300, 250], [250, 250], [200, 200], ], }, }, bids: [{ bidder: “innity”, params: { zone: 97854, pub: 539 } }, { bidder: “teads”, params: { pageId: 151756, placementId: 167827 } }, { bidder: “rubicon”, params: { accountId: 12534, siteId: 377678, zoneId: 2083798 } }, { bidder: ‘pubmatic’, params: { publisherId: ‘156536’, adSlot: ‘Prebid-Fimela-Mobile-300x250_1’ } }, { bidder: ‘unruly’, params: { siteId: 243584 } }, { bidder: ‘medianet’, params: { cid: ‘8CUWX4UX4’, crid: ‘576550861’ } }, { bidder: ‘smartadserver’, params: { domain: ‘https://prg-apac.smartadserver.com’, networkId: 4221, siteId: 498332, pageId: 1556524, formatId: 111310 } }, { bidder: “openx”, params: { delDomain: “emtek-d.openx.net”, unit: “556894074” } }, { bidder: ‘ix’, params: { siteId: ‘802778’ } }, { bidder: “oftmedia”, params: { placementId: “27497155” } }, { bidder: “yahoossp”, params: { dcn: ‘8a969d80018383b1b722c650cea4023c’, pos: ‘8a9695bc018383b1c995c6510d7a024c’ } }, { bidder: “taboola”, params: { tagId: ‘showcase_readpage_1’, publisherId: ‘1501404’, } }, { bidder: “triplelift”, params: { inventoryCode: ‘Fimela_300x250_Prebid’ } }, ], }, { code: “div-gpt-ad-fimela-halfpage-1”, mediaTypes: { banner: { sizes: [ [300, 250], [300, 600], [160, 600], ], }, }, bids: [{ bidder: “innity”, params: { zone: 98050, pub: 539 } }, { bidder: “teads”, params: { pageId: 151756, placementId: 167827 } }, { bidder: “rubicon”, params: { accountId: 12534, siteId: 377678, zoneId: 2083798 } }, { bidder: ‘pubmatic’, params: { publisherId: ‘156536’, adSlot: ‘Prebid-Fimela-Mobile-300×600’ } }, { bidder: ‘unruly’, params: { siteId: 243584 } }, { bidder: ‘medianet’, params: { cid: ‘8CUWX4UX4’, crid: ‘123558562’ } }, { bidder: ‘smartadserver’, params: { domain: ‘https://prg-apac.smartadserver.com’, networkId: 4221, siteId: 498332, pageId: 1556524, formatId: 111311 } }, { bidder: “openx”, params: { delDomain: “emtek-d.openx.net”, unit: “556894069” } }, { bidder: ‘ix’, params: { siteId: ‘802781’ } }, { bidder: “oftmedia”, params: { placementId: “27497156” } }, { bidder: “yahoossp”, params: { dcn: ‘8a969d80018383b1b722c650cea4023c’, pos: ‘8a96992f018383b1c311c65152410246’ } }, { bidder: “taboola”, params: { tagId: ‘halfpage_readpage_1’, publisherId: ‘1501404’, } }, { bidder: “triplelift”, params: { inventoryCode: ‘Fimela_300x600_Prebid’ } }, ], }, { code: “div-gpt-ad-fimela-halfpage-2”, mediaTypes: { banner: { sizes: [ [300, 250], [300, 600], [160, 600], ], }, }, bids: [{ bidder: “innity”, params: { zone: 98050, pub: 539 } }, { bidder: “teads”, params: { pageId: 151756, placementId: 167827 } }, { bidder: “rubicon”, params: { accountId: 12534, siteId: 377678, zoneId: 2083798 } }, { bidder: ‘pubmatic’, params: { publisherId: ‘156536’, adSlot: ‘Prebid-Fimela-Mobile-300×600’ } }, { bidder: ‘unruly’, params: { siteId: 243584 } }, { bidder: ‘medianet’, params: { cid: ‘8CUWX4UX4’, crid: ‘123558562’ } }, { bidder: “openx”, params: { delDomain: “emtek-d.openx.net”, unit: “556894069” } }, { bidder: “yahoossp”, params: { dcn: ‘8a969d80018383b1b722c650cea4023c’, pos: ‘8a96992f018383b1c311c65152410246’ } }, { bidder: “taboola”, params: { tagId: ‘halfpage_readpage_2’, publisherId: ‘1501404’, } }, ], }, { code: “div-gpt-ad-liputan6-lb”, mediaTypes: { banner: { sizes: [ [728, 90], [970, 90], [970, 250], ], }, }, bids: [{ bidder: ‘smartadserver’, params: { domain: ‘https://prg-apac.smartadserver.com’, networkId: 4221, siteId: 498332, pageId: 1556524, formatId: 111313 } }, { bidder: ‘ix’, params: { siteId: ‘802777’ } }, { bidder: “teads”, params: { pageId: 151756, placementId: 167827 } }, { bidder: “oftmedia”, params: { placementId: “27497157” } }, { bidder: “yahoossp”, params: { dcn: ‘8a969d80018383b1b722c650cea4023c’, pos: ‘8a96992f018383b1c311c65237800248’ } }, { bidder: “taboola”, params: { tagId: ‘leaderboard_readpage_1’, publisherId: ‘1501404’, } }, ], }, ]; var adUnitsVideo = [{ code: “div-gpt-ad-fimela-sc-1”, mediaTypes: { video: { playerSize: [300, 250], // Not set so that the player can be repsonsive context: “outstream”, protocols: [2, 3, 7], }, }, bids: [{ bidder: “spotx”, params: { channel_id: 285432, ad_unit: “outstream”, outstream_function: spotxOutstreamFunc } }, { bidder: ‘ix’, params: { siteId: ‘802778’ } }, ], }, { code: “div-gpt-ad-fimela-halfpage-1”, mediaTypes: { video: { playerSize: [300, 600], // Not set so that the player can be repsonsive context: “outstream”, protocols: [2, 3, 7], }, }, bids: [{ bidder: “spotx”, params: { channel_id: 285432, ad_unit: “outstream”, outstream_function: spotxOutstreamFunc } }, { bidder: ‘ix’, params: { siteId: ‘802781’ } }, ], }, { code: “div-gpt-ad-fimela-halfpage-2”, mediaTypes: { video: { playerSize: [300, 600], // Not set so that the player can be repsonsive context: “outstream”, protocols: [2, 3, 7], }, }, bids: [{ bidder: “spotx”, params: { channel_id: 285432, ad_unit: “outstream”, outstream_function: spotxOutstreamFunc } }, ], }, { code: “div-gpt-ad-liputan6-lb”, mediaTypes: { video: { playerSize: [970, 250], // Not set so that the player can be repsonsive context: “outstream”, protocols: [2, 3, 7] }, }, bids: [{ bidder: ‘ix’, params: { siteId: ‘802777’ } }, ], }, ]; pbjs.bidderSettings = { taboola: {storageAllowed: true} } pbjs.que = pbjs.que || []; googletag.cmd = googletag.cmd || []; /** END – PREBID INIT, CONFIGURATION & GOOGLE INIT */ /** LOAD PREBID – END */ /* DMP CATEGORY LIST */ window.createDMPTracker = function(adsCatList, dfpTracker, macro) { window.createCDPTracker(adsCatList, macro); parent.window.open(dfpTracker, ‘_blank’); }; window.createCDPTracker = function(cat, macro) { var cName = ‘ahoy_visitor=’, cVisitorId = document.cookie.split(‘;’).find(v => { return v.match(cName); }), partnerUID = cVisitorId ? decodeURIComponent(cVisitorId).trim().replace(cName, ”) : 0, gamMacro = typeof macro === “string” ? JSON.parse(macro) : macro, defaultKey = { adunitId: “ads_adunit_id”, advertiserId: “ads_advertiser_id”, creativeId: “ads_creative_id”, lineitemId: “ads_lineitem_id”, orderId: “ads_order_id”, }; actionDetails = Object.keys(gamMacro).reduce((obj, k) => Object.assign(obj, defaultKey[k] ? { [defaultKey[k]]: gamMacro[k] } : { [k]: gamMacro[k] }), {}), cdpData = { action: actionDetails.action ? actionDetails.action : ‘ads_click’, action_category: cat, action_details: actionDetails.action ? (delete actionDetails.action, actionDetails = actionDetails) : actionDetails, visitor_id: partnerUID }; //partnerUID ? window.VidioPersonalization.sendData(null, cdpData) : ”; //partnerUID ? window.AhoyEvent.sendPersonalizationUserEvent(cdpData) : ”; (actionDetails.action == ‘ads_click’) ? (partnerUID ? window.AhoyEvent.sendPersonalizationUserEvent(cdpData) : ”) : ”; }; var elImmersiveContainer = document.createElement(‘div’); elImmersiveContainer.setAttribute(‘id’, ‘div-gpt-ad-fimela-immersive-oop’); if (document.body.appendChild(elImmersiveContainer)) { googletag.cmd.push(function() { /*INIT CONTENT FILTERING SCRIPT*/ var urlPath = document.URL; GAMLibrary.brandSafetyChecker(); /* DEFINE IMMERSIVE TAG – DO NOT CHANGE THE SLOT ORDER, IMMERSIVE ALWAYS ON THE 1st POSITION – */ window.GAMLibrary.immersive = googletag.defineOutOfPageSlot(GAMLibrary.gamImmersive, ‘div-gpt-ad-fimela-immersive-oop’).addService(googletag.pubads()); window.GAMLibrary.leaderboard = googletag.defineSlot(GAMLibrary.gamLeaderboard, [ [728, 90], [970, 90], [970, 250] ], ‘div-gpt-ad-fimela-lb-1’).addService(googletag.pubads()); window.GAMLibrary.showcase = googletag.defineSlot(GAMLibrary.gamShowcase, [ [300, 250], [250, 250] ], ‘div-gpt-ad-fimela-sc-1’).addService(googletag.pubads()); window.GAMLibrary.halfpage1 = googletag.defineSlot(GAMLibrary.gamHalfpage1, [ [300, 250], [300, 600], [160, 600] ], ‘div-gpt-ad-fimela-halfpage-1’).addService(googletag.pubads()); window.GAMLibrary.ballon = googletag.defineOutOfPageSlot(GAMLibrary.gamBalloon, ‘div-gpt-ad-fimela-lFloating-oop’).addService(googletag.pubads()); window.GAMLibrary.organicFeedCRM1 = googletag.defineOutOfPageSlot(GAMLibrary.gamOrganicFeedCRM1, ‘div-gpt-ad-fimela-crm1-oop’).addService(googletag.pubads()); window.GAMLibrary.organicFeedCRM2 = googletag.defineOutOfPageSlot(GAMLibrary.gamOrganicFeedCRM2, ‘div-gpt-ad-fimela-crm2-oop’).addService(googletag.pubads()); window.GAMLibrary.organicFeedCRM3 = googletag.defineOutOfPageSlot(GAMLibrary.gamOrganicFeedCRM3, ‘div-gpt-ad-fimela-crm3-oop’).addService(googletag.pubads()); googletag.pubads().addEventListener(‘slotRenderEnded’, function(event) { var dfp_slotElementId = event.slot.getSlotId().getDomId(); /* get adunit dom id*/ var containerId = event.slot.getSlotElementId(); var containerEl = document.getElementById(containerId); if (event.slot == window.GAMLibrary.immersive) { if (event.isEmpty) { var gam_billboard = googletag.defineOutOfPageSlot(GAMLibrary.gamBillboard, ‘div-gpt-ad-fimela-billboard-oop’).addService(googletag.pubads()); var gam_topfrm = googletag.defineOutOfPageSlot(GAMLibrary.gamTopFrame, ‘div-gpt-ad-fimela-topfrm-oop’).addService(googletag.pubads()); var gam_bottomfrm = googletag.defineSlot(GAMLibrary.gamBottomFrame, [468, 60], ‘div-gpt-ad-fimela-bottomfrm-oop’).addService(googletag.pubads()); if (!GAMLibrary.GAMisTablet) { gam_skinad = googletag.defineOutOfPageSlot(GAMLibrary.gamSkinad, ‘div-gpt-ad-fimela-skinad-oop’).addService(googletag.pubads()); googletag.pubads().refresh([gam_billboard, gam_topfrm, gam_bottomfrm, gam_skinad]); } else { googletag.pubads().refresh([gam_billboard, gam_topfrm, gam_bottomfrm]); } } } if (containerEl !== null) { var iframeEl = containerEl.querySelectorAll(‘iframe’)[0]; /* it’s delayed by 10 milliseconds, because iframe is not yet fully rendered and limited to max to 10 seconds to wait*/ var timeoutFunction = function() { var src = “#” + containerId; /* `src` attribute is null, when iframe is FriendlyIframe, and when it’s present, then it’s SafeFrame */ if (iframeEl) { if ((iframeEl.getAttribute(‘src’) !== null)) { src = iframeEl.getAttribute(‘src’).replace(/#.*/, “”) + src; } else { var name = iframeEl.getAttribute(‘name’) + “#” + containerId; iframeEl.setAttribute(‘name’, name); } iframeEl.setAttribute(‘src’, src); } }; setTimeout(timeoutFunction, 10); } }); /* START – SEND IMPRESSION DATA TO CDP */ googletag.pubads().addEventListener(‘slotOnload’, function(event) { var dfp_slotDelivered = event.slot.getResponseInformation() ? ‘block’ : ‘none’; /* check wheter there is ads or not*/ if (dfp_slotDelivered == ‘block’) { cdpData = { action: ‘ads_impression’, action_details: { slotElementId: event.slot.getSlotElementId(), ResponseInformation: event.slot.getResponseInformation(), sizes: event.slot.getSizes(), adunitPath: event.slot.getAdUnitPath(), outOfPage: event.slot.getOutOfPage() } }; window.AhoyEvent.sendPersonalizationUserEvent(cdpData); } }); /* END – SEND IMPRESSION DATA TO CDP */ /* START TARGETING BLOCK */ googletag.pubads().setTargeting(“tags”, GAMLibrary.tags); googletag.pubads().setTargeting(“currentUrl”, urlPath); googletag.pubads().setTargeting(“platform”, kmklabs.platform); googletag.pubads().setTargeting(“type”, kmklabs.gtm.type); googletag.pubads().setTargeting(“pageType”, kmklabs.pageType); googletag.pubads().setTargeting(“channel”, kmklabs.gtm.subCategory); googletag.pubads().setTargeting(“audience”, kmklabs.gtm.audience ? kmklabs.gtm.audience.split(“|”) : “false”); googletag.pubads().setTargeting(“isAdvertorial”, typeof(isAdvertorial = kmklabs.article && kmklabs.article.isAdvertorial.toString()) === “undefined” ? “false” : isAdvertorial); googletag.pubads().setTargeting(“isMultipage”, typeof(isMultipage = kmklabs.article && kmklabs.article.isMultipage.toString()) === “undefined” ? “false” : isMultipage); googletag.pubads().setTargeting(“articleId”, kmklabs.gtm.articleId.toString()); googletag.pubads().setTargeting(“pagingNum”, typeof(pageParam = kmklabs.gtm.pageParam && kmklabs.gtm.pageParam.toString()) === “undefined” ? “false” : pageParam); googletag.pubads().setTargeting(“site”, kmklabs.site); googletag.pubads().setTargeting(“age”, typeof(age = kmklabs.gtm.age) === “undefined” ? “false” : kmklabs.gtm.age.toString()); googletag.pubads().setTargeting(“gender”, typeof(gender = kmklabs.gtm.gender) === “undefined” ? “false” : kmklabs.gtm.gender.toString()); googletag.pubads().setTargeting(“subcategory”, kmklabs.gtm.subCategory); /* END TARGETING BLOCK */ /* SET VISITOR ID AS PUBLISHER PROVIDED ID – START*/ var cVisitorId = (visId = document.cookie.split(“ahoy_visitor”)[1]) ? visId.split(‘;’)[0].replace(/[^a-zA-Z0-9]/ig, ”) : (window.ahoy.visitorId) ? window.ahoy.visitorId : false; if (cVisitorId) { googletag.pubads().setPublisherProvidedId(cVisitorId + ‘kly’); } /* SET VISITOR ID AS PUBLISHER PROVIDED ID – END*/ googletag.pubads().setCentering(true); googletag.pubads().enableSingleRequest(); googletag.pubads().collapseEmptyDivs(); googletag.pubads().disableInitialLoad(); googletag.enableServices(); /* INITIATE INFINITE SC */ GAMLibrary.initiateInfiniteSC(); googletag.pubads().refresh([window.GAMLibrary.immersive, window.GAMLibrary.ballon, window.GAMLibrary.organicFeedCRM1, window.GAMLibrary.organicFeedCRM2, window.GAMLibrary.organicFeedCRM3]); }); } /* INITIATE PREBID */ var prebidObject = new PrebidInstantiate(1000, 3000, 1000, adUnitsDisplay, adUnitsVideo, priceGranularityConfig); /** GET MESSAGE FROM SAFEFRAME CONTAINER */ GAMLibrary.onMessageReceivedGPTUpdateCreativeStyle(); /** GET MESSAGE FROM SAFEFRAME CONTAINER */ /* TRIGGER INFEED AND NATIVEOUT CONTAINER */ // window.addEventListener(“load”, GAMLibrary.initiateNativeContainer); /*Put additional script to load showcase on infinite page*/ var element = document.querySelector(‘.read-page–core-article’); var observer = new MutationObserver(function(mutations) { elContent = document.querySelectorAll(‘.read-page–core-article’); if (elContent.length > 1) { /*add load more ads div container*/ var order = parseInt(elContent.length); if (document.querySelector(‘div-gpt-ad-fimela-lb-‘ + order)) { var fim_lb = googletag.defineSlot(GAMLibrary.gamLeaderboard, [ [728, 90], [970, 90], [970, 250] ], ‘div-gpt-ad-fimela-lb-‘ + order).addService(googletag.pubads()); googletag.pubads().refresh([fim_lb]); } if (document.querySelector(‘div-gpt-ad-fimela-halfpage-‘ + order)) { var fim_hp = googletag.defineSlot(GAMLibrary.gamHalfpage1, [ [300, 250], [300, 600], [160, 600] ], ‘div-gpt-ad-fimela-halfpage-‘ + order).addService(googletag.pubads()); googletag.pubads().refresh([fim_hp]); } if (document.querySelector(‘div-gpt-ad-fimela-sc-‘ + order)) { var fim_sc = googletag.defineSlot(GAMLibrary.gamShowcase, [ [300, 250], [250, 250] ], ‘div-gpt-ad-fimela-sc-‘ + order).addService(googletag.pubads()); googletag.pubads().refresh([fim_sc]); } } }); observer.observe(document.querySelectorAll(‘.read-page–article-triumvirate_with-ads’)[0], { childList: true }); ]]>