[] slot.config.id), Date.now()); } else { Mntl.AdMetrics = { pushMetrics: () => {} }; } Mntl.GPT.setMantleDependencies(mantleDependencies); Mntl.GPT.init(options); }());window.addEventListener(‘readyForThirdPartyTracking’, () => { // Set a delay for loading the script // Specify the delay duration in pushly.xml const delay = ‘8’; window.setTimeout(() => { Mntl.utilities.loadExternalJS({ src: ‘https://cdn.p-n.io/pushly-sdk.min.js?domain_key=g8mDWq7d84LyHyUP9AsdmULDWaIx87ljeWjF’, async: true }); window.PushlySDK = window.PushlySDK || []; // eslint-disable-next-line prefer-rest-params function pushly() { window.PushlySDK.push(arguments); } pushly(‘load’, { domainKey: ‘g8mDWq7d84LyHyUP9AsdmULDWaIx87ljeWjF’, sw: ‘/pushly-sdk-worker.js’ }); }, parseFloat(delay) * 1000); }); window.dataLayer = window.dataLayer || []; // moved from gtm.ftl so we can initialize GTM only onLoad. From https://support.google.com/tagmanager/answer/6103696?hl=en Mntl.utilities.onLoad(function() { (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;defer=true;j.src=’//www.googletagmanager.com/gtm.js?id=’+i+dl;j.type=”text/javascript”;f.parentNode.insertBefore(j,f)})(window,document,’script’,’dataLayer’,’GTM-P3X3VT7′); }); window.dataLayer.push({ event: ‘ab-proctor’, ‘abTests-proctor’: { “99-0” : “useOxygen | useOxygen | use the Oxygenated ad unit format and slot names | 1” , “99-1” : “vanillaJSLazyAdRecipeSC | active | vanillaLazyAd.js enabled | 1” , “99-2” : “userIdAuctionDelay | lmd | Carbon (legacy Meredith) domains | 1” , “99-3” : “useFloorSearch | active | Use Floor Search | 1” , “99-4” : “testJiraTicketRevDev | control | Control | 0” , “99-5” : “fiftyPercentAdRefresh | active | Ads refresh when 50% in view | 1” , “99-6” : “useConsentManagement | noEnforcement | use Consent Management Module with no enforcement | 1” , “99-7” : “continuousScrollMobSquareFlexOffset | active | Adds offset to mob-square-fixed-1 ad on CS articles | 1” , “99-8” : “recipescDesktopAdRefresh | active | active, right rail ads timed refresh active | 1” , “99-9” : “gamVideoUsePlcmt | active | Pass plcmt | 1” , “99-10” : “liveIntentConnectedIdTest | control | LiveIntent ConnectedID is enabled | 0” , “99-11” : “prebidConfigApi | active | Ad Config API is enabled | 1” , “99-12” : “privateAggretationAPI | active | use private aggregation API | 1” , “99-13” : “useDynamicVideoSizes | active | active | 1” , “99-14” : “orion | control | Control | 0” , “99-15” : “prebidVideoUsePlcmt | active | Pass plcmt | 1” , “99-16” : “useLiveIntentSignedInUser | active | active | 1” , “55” : “relatedArticlesAlgorithm | useRecommendationService | Enables usage of proximity API | 1” , “71” : “MobileHPOptimizationv1 | active | active, mobile HP optimizations applied | 1” , “99-19” : “removeAdTiers | active | active | 1” , “99-20” : “testJiraTicketPRM2 | active | doesn’t do anything | 1” , “99-21” : “useLiveRamp | active | active | 1” , “65” : “trxMidFunnel | control | Test is inactive – TRX mid funnel component does not show | 0” } }); window.dataLayer.push({ envData: { environment: { environment: “k8s-prod”, application: “travelandleisure”, dataCenter: “us-east-1” }, server: { version: “2.64.0”, title: “travelandleisure-launcher” }, client : { browserUA: navigator.userAgent, serverUA: “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36”, deviceType: “pc”, usStateCode: “” }, mantle: “4.0.564”, commerce: “” } }); (function(fnUtils, CMP) { const deferLoadTime = 5000; const readyForThirdPartyTrackingEvent = new CustomEvent(‘readyForThirdPartyTracking’, { bubbles: true }); const readyForThirdPartyTracking = fnUtils.once(function() { window.dataLayer.push({event: ‘readyForThirdPartyTracking’}); window.dispatchEvent(readyForThirdPartyTrackingEvent); }); const readyForDeferredScriptsEvent = new CustomEvent(‘readyForDeferredScripts’, { bubbles: true }); const readyForDeferredScripts = fnUtils.once(function() { window.dataLayer.push({event: ‘readyForDeferredScripts’}); window.dispatchEvent(readyForDeferredScriptsEvent); }); const hasTargetingConsentHandler = function() { const hasConsent = CMP.hasTargetingConsent(); if (hasConsent) { readyForThirdPartyTracking(); } // Trigger the readyForDeferredScripts if consent is given // or if the user has closed the banner(AlertBox) which exists for EU // or if the user optin consent is not required, which applies for non gdpr locations if (hasConsent || CMP.isAlertBoxClosed() || !CMP.isOptInConsent()) { readyForDeferredScripts(); } return hasConsent; }; const purposeOneConsentHandler = async function() { const hasPurposeOneConsent = await CMP.hasPurposeOneConsent(); if (hasPurposeOneConsent) { readyForThirdPartyTracking(); } if (hasPurposeOneConsent || CMP.isAlertBoxClosed()) { readyForDeferredScripts(); } return hasPurposeOneConsent; }; const onRequiredDomEvent = fnUtils.once(function() { if (!CMP) { readyForThirdPartyTracking(); readyForDeferredScripts(); return; } const handler = CMP.supportsTCData() ? purposeOneConsentHandler : hasTargetingConsentHandler; if (!CMP.isLoading()) { handler(); } CMP.onConsentChange(handler); }); [ [‘adRendered’, onRequiredDomEvent], [‘beforeunload’, onRequiredDomEvent], [‘load’, function() { setTimeout(onRequiredDomEvent, deferLoadTime); }] ].forEach(function(event) { window.addEventListener(event[0], event[1], { once: true }); }); })(Mntl.fnUtilities || {}, Mntl.CMP);window.dataLayer = window.dataLayer || []; (function() { var isContinuousScroll = document.querySelector(‘.mntl-continuous-scroll’); var pageViewDataAsJSON = {“country”:”DE”,”title”:”This Is the Only Beachfront Hotel in California’s Iconic Monterey Peninsula” || document.title || ”,”authorId”:”1002775″,”contentGroup”:”Other”,”revenueGroup”:””,”documentId”:8698055,”templateName”:”STRUCTUREDCONTENT”,”authorNames”:”Stacey Leasca”,”viewType”:””,”templateId”:”110″,”muid”:”c5f6ebfa-c41a-4986-b7e5-5ce9578a1a05″,”lastEditingAuthorId”:”1002775″,”lastEditingUserId”:”161732010582001″,”fullUrl”:”https://www.travelandleisure.com/the-monterey-beach-hotel-reopens-monterey-california-8698055″ + location.hash,”experienceType”:”single page”,”entryType”:”direct”,”excludeFromComscore”:false,”internalSessionId”:”n91e9c6b1727b49578c1591d47e9b5d5e12″,”internalRequestId”:”n91e9c6b1727b49578c1591d47e9b5d5e12″,”hid”:””,”experienceTypeName”:””,”recircDocIdsFooter”:”S-5524889|S-5431727|S-8640413|S-5433256|S-5428931|S-8610749|S-7551460|S-5426899|S-5441795|S-8641940|S-8612778|S-8601587|S-5437840|S-6735807|S-5440137|S-5427755″,”euTrafficFlag”:true,”isGoogleBot”:false,”mantleVersion”:”4.0.564″,”commerceVersion”:””,”primaryTaxonomyIds”:”5324443|5425739″,”primaryTaxonomyNames”:”Travel + Leisure|Hotels + Resorts”,”description”:”Monterey Beach Hotel is back and better than ever. See your first look at the newly revamped hotel.”}; var scrolledPageData = {}; var scrolledDocOrdinal; var scrolledPage; pageViewDataAsJSON.breakpointName = Travelandleisure.utilities.getW(); pageViewDataAsJSON.bounceExchangeId = 2548; pageViewDataAsJSON.descriptiveTaxonomy = ‘13261,11030,14077,17353,11322,11277,11035,11356,16537,16724’; if (isContinuousScroll) { pageViewDataAsJSON.experienceTypeName = ‘continuous’; if (window.dataLayer && window.dataLayer.length) { //loop through events and collect previous scrolledDocOrdinal and scrolledPage values scrolledPageData = window.dataLayer.reduce( (acc, curr) => { if (curr.event == ‘unifiedPageview’) { acc.scrolledDocOrdinal = acc.scrolledDocOrdinal ? acc.scrolledDocOrdinal + 1 : 1; acc.scrolledPage = acc.scrolledPage ? acc.scrolledPage + ” | ” + (curr.documentId).toString() : (curr.documentId).toString(); } return acc; }, {}); } scrolledPage = scrolledPageData.scrolledPage ? scrolledPageData.scrolledPage + ‘ | ‘ + (pageViewDataAsJSON.documentId).toString() : (pageViewDataAsJSON.documentId).toString(); scrolledDocOrdinal = scrolledPageData.scrolledDocOrdinal ? scrolledPageData.scrolledDocOrdinal + 1 : 1; pageViewDataAsJSON.scrolledPage = scrolledPage; pageViewDataAsJSON.scrolledDocOrdinal = scrolledDocOrdinal; } Mntl.utilities.onLoad(function() { Mntl.PageView.init(pageViewDataAsJSON); }); })();]]>
Source

Leave a Reply