[]
n), pageTargeting.w = Mntl.utilities.getW(); const initialSlots = []; initialSlots.push({ config: { id: ‘leaderboard-flex-1’, sizes: [[728, 90], [970,90], [970, 250]], type: ‘leaderboard’, rtb: true, timedRefresh: 0, waitForThirdParty: false }, targeting: Mntl.fnUtilities.deepExtend({}, { pos: ‘atf’, priority: 1 }) }); initialSlots.push({ config: { id: ‘square-flex-1’, sizes: [[300, 250],[299, 251],[300, 600],[300, 1050],[160, 600]], type: ‘square’, rtb: true, timedRefresh: 0, waitForThirdParty: false }, targeting: Mntl.fnUtilities.deepExtend({}, { pos: ‘atf’, priority: 2 }) }); const testIds = Mntl.GPT.getTestIds(); pageTargeting.ab = testIds; pageTargeting.bts = testIds; Mntl.utilities.onLoad(function() { Mntl.utilities.loadExternalJS({ src: ‘//securepubads.g.doubleclick.net/tag/js/gpt.js’, async: false }); }); const options = { domain: ‘www.realsimple.com’, templateName: ‘listsc’, isMobile: false, dfpId: ‘3865’, publisherProvidedId: ‘0284cc07-ba67-4cc5-9709-acb1f8bd5b8f’, singleRequest: false, useLmdFormat: true, useOxygen: true, prebidConfigApi: false, useInfiniteRightRail: true, useAuctionFloorSearch: true, fiftyPercentAdRefresh: true, revenueGroupAllowList: ”, lmdSiteCode: ‘rs’, pageTargeting, baseSlotTargeting, adLazyOffset, geo: { isInEurope: true, isInUsa: false }, initialSlots, auctionFloors: {“other”:{“id”:”f7c604d0208f4ea2972d9b73db342408″,”floor”:”5″},”leaderboardac”:{“id”:”a0ddf07e50504fbaae9bf180afaa5e0e”,”floor”:”10″},”leaderboard-flex-1″:{“id”:”ab475dc87a004fb59ea4d1e5204a5275″,”floor”:”5″},”square-flex-2″:{“id”:”0a4504089c1040d299c9617dab5ce8aa”,”floor”:”5″},”square-flex-1″:{“id”:”42f267d0ba324eadbb75456ced00f1cd”,”floor”:”5″},”square-fixed-4″:{“id”:”7a07c6f3e2a94eb9bef56d0682c35f6c”,”floor”:”5″},”leaderboard-fixed-3″:{“id”:”e1554aa01b6347ac83b00b11d917114a”,”floor”:”5″},”square-fixed-3″:{“id”:”3fb1d1d2a3274056b494895f0f5e1459″,”floor”:”5″},”leaderboard-fixed-4″:{“id”:”beb006b8d494438da265edcb9d903481″,”floor”:”5″},”square-fixed-2″:{“id”:”78a6e4eebe494691bb26d1eb6a91e9dc”,”floor”:”5″},”leaderboard-fixed-1″:{“id”:”6904ab32172540a38b3fd48bde2bd347″,”floor”:”5″},”square-fixed-1″:{“id”:”113d384c9d654ab29c76cc48853bc32a”,”floor”:”5″},”leaderboard-fixed-2″:{“id”:”2f3bb9cde8d543c0a061aabd92344be1″,”floor”:”5″},”square-fixed-8″:{“id”:”a1e36995929e45c4a557c62c30493234″,”floor”:”5″},”square-fixed-7″:{“id”:”811969bd88614462a9914a596ef965ac”,”floor”:”5″},”mob-square-flex-1″:{“id”:”ea94ec79208743b58599a5dacbccf144″,”floor”:”5″},”square-fixed-6″:{“id”:”c3d1838d50be4764bee785a0b02d8a22″,”floor”:”5″},”leaderboardfooter-flex-2″:{“id”:”443876d37d364717b319ea4ded5cbe84″,”floor”:”15″},”leaderboard-fixed-5″:{“id”:”fca344ab7f5b40aeb8f359880ccc259e”,”floor”:”5″},”square-fixed-5″:{“id”:”c12245a269624b59a9e56201f8d45f3d”,”floor”:”5″},”leaderboardfooter-flex-1″:{“id”:”e9b804b6e36f40b48ba504fb684a0e91″,”floor”:”10″},”leaderboard-fixed-0″:{“id”:”4dc46b04b44143ff8eaef944c96622da”,”floor”:”5″},”mob-square-fixed-1″:{“id”:”331ff11b28034a0d8a1508189e2941e8″,”floor”:”5″},”mob-square-fixed-2″:{“id”:”a912c54bd2104bebacd84a78aba5c648″,”floor”:”5″},”mob-square-fixed-3″:{“id”:”1fbc084cc10e4ea8bf7a1a53044bd4e9″,”floor”:”5″},”inline”:{“id”:”1276e560914a48de935a0fe266535080″,”floor”:”5″},”square-fixed”:{“id”:”5572f51f8d76471eac2eeea5bc5dea39″,”floor”:”5″},”square-fixed-9″:{“id”:”0e38856639d24d81aa6645600fa83ab8″,”floor”:”5″},”mob-adhesive-banner-fixed”:{“id”:”751b33b6c1ae4caa8c5594fbd0d64f84″,”floor”:”5″}}, utils: { generateSlotId: Realsimple.GPT.generateSlotId }, displayOnScroll: false, displayOnConsent: true, adsToCollapse: [‘leaderboard*’,’square*’] }; if (Mntl.AdMetrics) { Mntl.AdMetrics.init(“6381640”, “n0eaa5877de304d4585898d1c517dc03206″, initialSlots.map(slot => slot.config.id), Date.now()); } else { Mntl.AdMetrics = { pushMetrics: () => {} }; } 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=HL3wGzrOghPpw6Ct86jAaikblIJuZzbSgrQK’, async: true }); window.PushlySDK = window.PushlySDK || []; // eslint-disable-next-line prefer-rest-params function pushly() { window.PushlySDK.push(arguments); } pushly(‘load’, { domainKey: ‘HL3wGzrOghPpw6Ct86jAaikblIJuZzbSgrQK’, sw: ‘/pushly-sdk-worker.js’ }); }, parseFloat(delay) * 1000); }); // 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 = window.dataLayer || []; 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 | LMD domains | 1” , “99-3” : “useFloorSearch | active | Use Floor Search | 1” , “99-4” : “testJiraTicketRevDev | active | Active | 1” , “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” : “recipescDesktopAdRefresh | active | active, right rail ads timed refresh active | 1” , “99-8” : “gamVideoUsePlcmt | active | Pass plcmt | 1” , “99-9” : “liveIntentConnectedIdTest | control | LiveIntent ConnectedID is enabled | 0” , “99-10” : “useDynamicVideoSizes | active | active | 1” , “99-11” : “prebidVideoUsePlcmt | active | Pass plcmt | 1” , “55” : “relatedArticlesAlgorithm | useRecommendationService | Enables usage of proximity API | 1” , “99-13” : “removeAdTiers | active | active | 1” , “99-14” : “testJiraTicketPRM2 | active | doesn’t do anything | 1” , “99-15” : “useLiveRamp | active | active | 1” , “99-16” : “enableAdLazyOffsetIntro1 | active | updates lazy offset for intro1 ad in recipes | 1” } }); window.dataLayer.push({ envData: { environment: { environment: “k8s-prod”, application: “realsimple”, dataCenter: “us-east-1” }, server: { version: “2.24.0”, title: “realsimple-launcher” }, client : { browserUA: navigator.userAgent, serverUA: “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0”, deviceType: “pc”, usStateCode: “” }, mantle: “4.0.379”, 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 pageViewDataAsJSON = {“country”:”GB”,”description”:”These online cooking schools offer free or low-cost classes. Each course is led by industry professionals who can virtually up your home-cooking game.”,”title”:”7 Best Online Culinary Schools for Home Cooks” || document.title || ”,”contentGroup”:”Other”,”revenueGroup”:””,”viewType”:””,”authorId”:”1009555″,”templateName”:”LISTSC”,”documentId”:6381640,”authorNames”:”Melissa Kravitz Hoeffner”,”templateId”:”115″,”muid”:”0284cc07-ba67-4cc5-9709-acb1f8bd5b8f”,”lastEditingAuthorId”:”247537″,”lastEditingUserId”:”166568314578218″,”fullUrl”:”https://www.realsimple.com/food-recipes/cooking-tips-techniques/online-culinary-schools” + location.hash,”experienceType”:”single page”,”entryType”:”direct”,”excludeFromComscore”:false,”internalSessionId”:”n0eaa5877de304d4585898d1c517dc03206″,”internalRequestId”:”n0eaa5877de304d4585898d1c517dc03206″,”hid”:””,”experienceTypeName”:””,”recircDocIdsFooter”:”S-7099242|S-6381998|S-6382452|S-6378118|S-6379876|S-6376683|S-6380371|S-6376098|S-6831048|S-6379059|S-6384700|S-6378255|S-6380148|S-6382108|S-6378462|S-6381902″,”euTrafficFlag”:true,”isGoogleBot”:false,”mantleVersion”:”4.0.379″,”commerceVersion”:””,”primaryTaxonomyIds”:”5509608|6375227|6375103″,”primaryTaxonomyNames”:”RealSimple|Food|Cooking Tips & Techniques”}; var scrolledPageData = {}; var scrolledDocOrdinal; var scrolledPage; pageViewDataAsJSON.breakpointName = Realsimple.utilities.getW(); pageViewDataAsJSON.bounceExchangeId = 2548; pageViewDataAsJSON.descriptiveTaxonomy = ‘11252,16376,10151,11053,11075,12631,12499,14025,24974’; if ( 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