");vwo_$('head').append(_vwo_sel);return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("HEAD")}}, R_722219_759_1_2_0:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var ctx=vwo_$(x),el; /*vwo_debug log("Revert","content",""); vwo_debug*/; el=vwo_$('[vwo-element-id="1733126851444"]'); el.revertContentOp().remove();})("HEAD")}}, C_722219_759_1_2_1:{ fn:function(log,nonce=''){return (function(x) {})(".leo-col-6")}}, R_722219_759_1_2_1:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; })(".leo-col-6")}}, ct759_16048c03a9b024888f00d49e44c4bca2:{ fn:function(executeTrigger, vwo_$) { (//Visited PDP audience trigger for VWO function() { // ---------------------------------- // ----- Personalization config ----- // ---------------------------------- var productsViewedMaxItems = 3; // Max number of recommended products /* Product master infos: - name = Master product name. Ensure that this matches the master mapping (eg. data layer values) */ var productsViewedCTAArr = [ { "name": "GREAT CareShield" }, { "name": "GoGreat Term Life" }, { "name": "TravelSmart Premier" }, { "name": "HomeGR8 Plus" }, { "name": "GREAT Protector Active" }, { "name": "Essential Protector Plus" }, { "name": "GREAT Junior Protector" }, { "name": "Drive and Save Plus" }, { "name": "GREAT Maid Protect" }, { "name": "GREAT Critical Cover Series" }, { "name": "GREAT Prime Rewards" }, { "name": "GREAT SP" }, { "name": "GREAT Golden Protector" }, { "name": "GREAT Term" }, { "name": "GREAT EV Protect" }, { "name": "GREAT Hospital Cash " }, { "name": "GREAT Cancer Guard" }, { "name": "PA Supreme" }, { "name": "GREAT Home Protect" } ]; // ----------------------------------------- // ----- System config (Do not change) ----- // ----------------------------------------- var productsViewedCookieName = "personalization_products_viewed"; var productsPurchasedCookieName = "personalization_products_purchased"; // ------------------------------- // ----- Get cookie function ----- // ------------------------------- function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } // ------------------------------------------------ // ----- Check last viewed/purchased products ----- // ------------------------------------------------ // Read cookies var productsViewedArr = []; // Default empty array var productsViewedStr = getCookie(productsViewedCookieName); var productsPurchasedArr = []; // Default empty array var productsPurchasedStr = getCookie(productsPurchasedCookieName); // If cookies are not empty, read the unstringified values if(productsViewedStr != "") {productsViewedArr = JSON.parse(productsViewedStr);} if(productsPurchasedStr != "") {productsPurchasedArr = JSON.parse(productsPurchasedStr);} // Remove purchased products from last viewed products productsViewedArr = productsViewedArr.filter(function (a) { return typeof productsPurchasedArr.find(function (b) { return b.name == a.name; }) == "undefined"; }); // Cross check master product infos productsViewedArr = productsViewedArr.filter(function (a) { return typeof productsViewedCTAArr.find(function (b) { return b.name == a.name; }) != "undefined"; }); // Reduce to the latest X array items productsViewedArr = productsViewedArr.slice(-productsViewedMaxItems); // If there are last products viewed, run VWO campaign if(productsViewedArr.length) { executeTrigger(); } })() }}, C_722219_736_1_2_0:{ fn:function(log,nonce=''){return (function(x) {try{!function(){var e=window.location.pathname,t=[{name:"GREAT CareShield",productCategory:"health-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/health-insurance/great-careshield.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/health-insurance/220402/get-quotation.html",bulletPoints:["Disability financial support starts from the inability to perform any ADL","Get up to 90% more in monthly benefits for caregiver's and children's expenses","Utilise your MediSave funds4 for enhanced coverage"]},{name:"GREAT Critical Cover Series",productCategory:"health-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/health-insurance/great-critical-cover.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/life-insurance/220303/get-quotation.html",bulletPoints:["100% payout for every critical illness claim","Coverage continues over and over again, even after the first critical illness claim","Flexibility in choice of coverage"]},{name:"GoGreat Term Life",productCategory:"life-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/life-insurance/gogreat-term-life.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/life-insurance/210301/get-quotation.html",bulletPoints:["Complete your protection needs from just S$0.21* a day","All-round protection till age 65","Hassle-free application"]},{name:"GREAT Protector Active",productCategory:"personal-accident-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/personal-accident-insurance/great-protector-active.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/personal-accident-insurance/200201/get-quotation.html",bulletPoints:["Get up to S$3 million in coverage against accidents","Boost coverage by up to 1.5 times with Benefit Booster4","High medical expenses reimbursement"]},{name:"Essential Protector Plus",productCategory:"personal-accident-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/personal-accident-insurance/essential-protector-plus.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/personal-accident-insurance/200204/get-quotation.html",bulletPoints:["Reimbursement of up to S$15,000 for medical expenses","Get daily income upon hospitalisation","Extra payout of up to S$8,000 for accidental injuries","Additional 20% coverage for ladies"]},{name:"GREAT Junior Protector",productCategory:"personal-accident-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/personal-accident-insurance/great-junior-protector.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/personal-accident-insurance/200202/get-quotation.html",bulletPoints:["Up to 3 times payout upon Accidental Death and Permanent Disablement","Daily hospital cash benefit for up to 41 Infectious Diseases","Reimbursement of up to S$9,000 for Accidental Medical Expenses"]},{name:"GREAT Prime Rewards",productCategory:"wealth-accumulation",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/wealth-accumulation/great-prime-rewards.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/life-insurance/220105/get-quotation.html",bulletPoints:["Receive regular income stream to suit your retirement needs","Boost your annual payouts by up to 1.82X","Your capital is guaranteed1","Maximise retirement planning with SRS"]},{name:"GREAT Hospital Cash",productCategory:"health-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/health-insurance/great-hospital-cash.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/health-insurance/230401/get-quotation.html",bulletPoints:["Assurance of hospital cash payouts after 12 hours^","Enjoy up to a lifetime of hospitalisation coverage","Enjoy more discounts on your premiums","Sign up online and start your coverage with ease"]},{name:"GREAT Golden Protector",productCategory:"personal-accident-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/personal-accident-insurance/great-golden-protector.html",cta2Text:"Buy now",cta2Url:"//buy.greateasternlife.com/sg/en/personal-accident-insurance/200203/get-quotation.html",bulletPoints:["Up to 300% payout and up to S$200 daily hospital cash benefit","Comprehensive post-accident benefits","Payouts of up to S$25,000 for fractures, dislocations or burns","Get 25% off premiums on 2nd life assured"]},{name:"PA Supreme",productCategory:"personal-accident-insurance",cta1Text:"Learn more",cta1Url:"/sg/en/personal-insurance/our-products/personal-accident-insurance/pa-supreme.html",cta2Text:"Buy now",cta2Url:"//greateasternlife.com/psu",bulletPoints:["High payout in an unfortunate event","Financial support for a swift recovery","Assurance of emergency support that counts"]}],a=`\n \n \n \n \n \n`,n='\n \n';function r(e){for(var t=e+"=",a=decodeURIComponent(document.cookie).split(";"),n=0;nsetTimeout(e,1e3))}setTimeout((async function(){var e=0;do{if((y=document.querySelector(".featuredArticle h3"))&&window.google_tag_manager)break;e++,await o()}while(e<10);var c=[],i=r("personalization_products_viewed"),l=[],s=r("personalization_products_purchased");""!=i&&(c=JSON.parse(i)),""!=s&&(l=JSON.parse(s)),c=c.filter((function(e){return void 0===l.find((function(t){return t.name==e.name&&e.productCategory==u}))}));var u=window.google_tag_manager["GTM-NW5CPDN"].dataLayer.get("productCategory");if((c=(c=c.filter((function(e){return void 0!==t.find((function(t){return t.name==e.name&&t.productCategory==u}))})).map((function(e){return e.cta1Text=t.find((function(t){return t.name==e.name})).cta1Text,e.cta1Url=t.find((function(t){return t.name==e.name})).cta1Url,e.cta2Text=t.find((function(t){return t.name==e.name})).cta2Text,e.cta2Url=t.find((function(t){return t.name==e.name})).cta2Url,e.bulletPoints=t.find((function(t){return t.name==e.name})).bulletPoints,e}))).slice(-1)).length){var p=c[0].name,d=c[0].cta1Text,m=c[0].cta1Url,g=c[0].cta2Text,f=c[0].cta2Url,h=c[0].bulletPoints,y=document.querySelector(".featuredArticle h3").innerText;if(p.toLowerCase()!=y.toLowerCase()){dataLayer.push({event:"vwoEvent",eventDetails:{category:"[vwo] cta - inside thumbnail".toLowerCase(),action:"impression",label:("[vwo_ce_rtg] product cat thumbnail - "+p).toLowerCase()},contentSubcategory:"recommended"});var b='\n
\n \n \n
\n

{productName}

\n\n
\n ';b+=h.map((function(e){return n.replace(/\{bulletPoint\}/g,e)})).join(""),b=(b=(b=(b=(b=(b=(b=(b+=a).replace(/\{productName\}/g,p)).replace(/\{cta1Text\}/g,d)).replace(/\{cta1Url\}/g,m)).replace(/\{cta2Text\}/g,g)).replace(/\{cta2Url\}/g,f)).replace(/\{gaEventLabel_Cta1\}/g,("[vwo_ce_rtg] product cat thumbnail - "+p+" - "+d).toLowerCase())).replace(/\{gaEventLabel_Cta2\}/g,("[vwo_ce_rtg] product cat thumbnail - "+p+" - "+g).toLowerCase()),document.querySelector(".featuredArticle .leo-container .leo-row .leo-col-8").classList.replace("leo-col-8","leo-col-6"),document.querySelector(".featuredArticle .leo-container .leo-row").insertAdjacentHTML("beforeend",b)}}}),1e3)}();}catch(e){} ;var _vwo_sel=vwo_$("");vwo_$('head').append(_vwo_sel);return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("HEAD")}}, C_722219_985_1_2_0:{ fn:function(){return (function(x) { try{ function setCookie(e,t,o){const i=new Date;i.setTime(i.getTime()+24*o*60*60*1e3);const n="expires="+i.toUTCString();document.cookie=e+"="+t+";"+n+";path=/; domain=.greateasternlife.com"}setCookie("lastPageVisited","product",180); return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {} })("HEAD")}}, C_722219_997_1_2_0:{ fn:function(){return (function(x) { try{ // Start variation JS void (function loadVariation(timeInFuture) { // Main Test object const test = { // Some test specific global letiables id: "EXP-1", // Test init init: function () { // Add a test specific classname to the body element document.body.classList.add(test.id); // Below function calls order is important test.mainJS(); }, // Main JS mainJS: function () { const cookieName = "quotationData"; // cookie name const cookieExpiryDays = 90; const dataPopulationCookieName = "data-population-cookie"; /// *** Utility functions *** /// // Utility function to get selected index const getSelectedIndex = (selector, selectedClass = '-selected') => { return [...document.querySelectorAll(selector)].findIndex(item => item.classList.contains(selectedClass)); } // Utility function to get payment index const getPaymentIndex = (selector, selectedClass = '-selected') => { return [...document.querySelectorAll(selector)].findIndex(item => item.parentElement.classList.contains(selectedClass)); } // Utility function to select an option by text content function selectOptionByText(selector, textContent) { document.querySelectorAll(selector).forEach(item => { if (item.textContent.trim() === textContent) { item.click(); } }); } // Utility function to set input value and dispatch event function setInputValue(selector, value) { const inputElement = document.querySelector(selector); if (inputElement) { inputElement.value = value; inputElement.dispatchEvent(new Event('input')); } } // Utility function to click a radio button by index function clickRadioButtonByIndex(selector, index) { const buttons = document.querySelectorAll(selector); if (buttons[index]) { buttons[index].click(); } } // function clickRadioButtonForGCS(selector, index) { // const buttons = document.querySelectorAll(selector); // if (buttons[index]) { // buttons[index].parentElement.click(); // } // } // Utility function to click an input element by ID function clickInputById(id) { const inputElement = document.querySelector(`#${id}`); if (inputElement) { inputElement.click(); } } // Utility function to Function to set cookie function setCookie(cname, cvalue, exdays) { const d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); const expires = `expires=${d.toUTCString()}`; document.cookie = `${cname}=${cvalue}; ${expires}; path=/; domain=.adobecqms.net`; }; // Utility function to Function to get cookie function getCookie(cname) { const name = cname + "="; const decodedCookie = decodeURIComponent(document.cookie); const ca = decodedCookie.split(';'); for (var i = 0; i < ca.length; i++) { let c = ca[i].trim(); if (c.indexOf(name) === 0) { return c.substring(name.length, c.length); } } return ""; } // // Utility function to delete cookie // function deleteCookie(name) { // document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=.greateasternlife.com`; // } /// *** Utility functions *** /// // function to set or update quotation cookie const setOrUpdateQuoteDataInCookie = (quotationData) => { if (!quotationData || typeof quotationData !== 'object') return; const saveCookie = (data) => { setCookie(cookieName, JSON.stringify(data), cookieExpiryDays); }; const existingCookie = getCookie(cookieName); if (!existingCookie) { saveCookie(quotationData); //console.log("Quotation data saved as a new cookie."); return; } let existingData; try { existingData = JSON.parse(existingCookie); } catch (error) { //console.error("Failed to parse existing cookie:", error); saveCookie(quotationData); return; } if (existingData.productJourney === quotationData.productJourney) { // Same product journey, update values const updatedData = { ...existingData, ...quotationData }; saveCookie(updatedData); //console.log("Updated existing quotation data."); } else { saveCookie(quotationData); //console.log("Replaced quotation data with a new product journey."); } }; // function to set Great Protector Active quote data function getQuoteDataGPA() { if (window.location.pathname !== '/sg/en/personal-accident-insurance/200201/get-quotation.html') return; let productJourney = 'GREAT Protector Active'; let insuredFor = document.querySelector('label[for="insured"] +.multiselect .multiselect-single-label')?.textContent; let idSelector = document.querySelectorAll('label[for="thirdPartyIdType"] +.multiselect .multiselect-single-label , label[for="idType"] +.multiselect .multiselect-single-label')[0]; let idType = idSelector?.textContent; let birthDate = document.querySelector('input#birthdayInput')?.value; let planOptionsIndex = getSelectedIndex('.plan-options .cmp-radio'); let addOnSelection = document.querySelectorAll('.checkbox-custom .cmp-checkbox-custom.-selected').length > 0; let paymentCycle = getPaymentIndex('#paymentFrequency-Monthly , #paymentFrequency-Annual'); // Initializing an empty object let quotationData = {}; // Adding properties only if the values are available if (productJourney) quotationData.productJourney = productJourney; if (insuredFor) quotationData.insuredFor = insuredFor; if (idType) quotationData.idType = idType; if (birthDate) quotationData.birthDate = birthDate; if (planOptionsIndex !== -1) quotationData.planOptionsIndex = planOptionsIndex; if (paymentCycle !== -1 && document.querySelectorAll('.checkbox-custom .cmp-checkbox-custom.-selected').length > -1) { //alert('check 01') quotationData.addOnSelection = addOnSelection } if (paymentCycle !== -1) quotationData.paymentCycle = paymentCycle; // Store or update quotation data in cookie if (insuredFor && idType && birthDate) setOrUpdateQuoteDataInCookie(quotationData); } // get value of data population cookie to populate data let dataPopulationCookieValue = getCookie(dataPopulationCookieName); // set session storage based on cookie value // if (dataPopulationCookieValue) { // sessionStorage.setItem("data-population", "true"); // deleteCookie("data-population-cookie"); // } // Main function to handle form data population based on the pathname function handleDataPopulation(productData, loadAgain = false) { const pathname = window.location.pathname; const { productJourney } = productData; // Actions for Great Protector Active if (pathname === '/sg/en/personal-accident-insurance/200201/get-quotation.html' && productJourney === 'GREAT Protector Active') { if (productData.insuredFor && loadAgain) { selectOptionByText('label[for="insured"] + .multiselect .multiselect-option', productData.insuredFor); } setTimeout(function () { if (productData.idType && loadAgain) { selectOptionByText('label[for="thirdPartyIdType"] + .multiselect .multiselect-option , label[for="idType"] + .multiselect .multiselect-option', productData.idType); } if (productData.birthDate && loadAgain) { setInputValue("#birthdayInput", productData.birthDate); } }, 500) setTimeout(function () { if (productData.planOptionsIndex > -1) { clickRadioButtonByIndex('.plan-options .cmp-radio input', productData.planOptionsIndex); setTimeout(function () { let targetContent = document.querySelectorAll('.plan-options .cmp-radio input + label .radio-select-label-selected')[0]; if (targetContent) { targetContent.textContent = 'Pre-selected'; } }, 1000) } if (productData.addOnSelection) { setTimeout(function () { clickInputById('selectedExtraPlan-undefined'); if (productData.paymentCycle > -1) { setTimeout(function () { if (document.querySelector('label[for="paymentFrequency-Annual"] .cmp-text.font-normal span').textContent.length > 3) { clickRadioButtonByIndex('#paymentFrequency-Monthly , #paymentFrequency-Annual', productData.paymentCycle); } }, 1500); } }, 500) } else { if (productData.paymentCycle > -1) { setTimeout(function () { if (document.querySelector('label[for="paymentFrequency-Annual"] .cmp-text.font-normal span').textContent.length > 3) { clickRadioButtonByIndex('#paymentFrequency-Monthly , #paymentFrequency-Annual', productData.paymentCycle); } }, 1500); } } }, 2000) } } function loadData() { if (dataPopulationCookieValue !== 'true') return; (function pollForFormload() { if ( document.querySelector('input[name="agentMobileNumber"]') && document.querySelectorAll('#paymentFrequency-Annual , #packageItem-W05I1-annual').length > 0 ) { const existingCookie = getCookie(cookieName); const productData = existingCookie ? JSON.parse(existingCookie) : {}; // Handle form filling based on the current page handleDataPopulation(productData); } else { setTimeout(pollForFormload, 25); } })(); } // function to handle click events function eventHandler(event) { const { target } = event; //console.log('target:', target); if ( window.location.pathname === '/sg/en/personal-accident-insurance/200201/get-quotation.html' && target.closest('.cmp-button a') && ( target.textContent.includes('View benefits') || target.closest('.cmp-button a[href*="https://buy-uat-greateasternlife.adobecqms.net/sg/en/personal-accident-insurance/200201/quick-check.html"]')) ) { if (target.textContent.includes('View benefits')) loadData(); getQuoteDataGPA(); //alert('working GPA'); } } // Initialize product data from cookie const existingCookie = getCookie(cookieName); const productData = existingCookie ? JSON.parse(existingCookie) : {}; // Handle form data population based on the current page if (dataPopulationCookieValue === 'true') { handleDataPopulation(productData, true); } document.body.addEventListener('click', eventHandler); }, }; // Return if the test ran already! if (document.querySelector(`.${test.id}`)) return; // Polling conditions if (document.readyState === "complete") { try { // Activate test test.init(); // Success log //console.log('Vertis Digital: EXP-1: V: 1:12'); } catch (error) { // Error log console.log(`Initialization Error:`, error); } } else { Date.now() < timeInFuture ? setTimeout(loadVariation.bind({}, timeInFuture), 25) : console.log("loadVariation timed out!"); } })(Date.now() + 60000); // End variation JS return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {} })("HEAD")}}, ct997_11fd5df3bdf6d6f8b7b1bbf21173a0ed:{ fn:function(executeTrigger, vwo_$) { (function () { if (location.pathname !== '/sg/en/personal-accident-insurance/200201/get-quotation.html') return; const productsPurchasedCookieName = "personalization_products_purchased"; const quotationDataCookieName = "quotationData"; const dataPopulationCookieName = "data-population-cookie"; // Function to get cookie function getCookie(cname) { const name = cname + "="; const decodedCookie = decodeURIComponent(document.cookie); const cookies = decodedCookie.split(';'); for (const cookie of cookies) { const c = cookie.trim(); if (c.indexOf(name) === 0) { return c.substring(name.length); } } return ""; } const productsPurchasedStr = getCookie(productsPurchasedCookieName); const productPurchaseData = productsPurchasedStr ? JSON.parse(productsPurchasedStr) : []; //const quotationDataCookieValue = getCookie(quotationDataCookieName); //const dataPopulationCookieValue = getCookie(dataPopulationCookieName); const productsViewedCTAArr = [ { "name": "GREAT Protector Active" } ]; // Check if any product from productsViewedCTAArr is in productPurchaseData const hasMatchingProduct = productsViewedCTAArr.some(viewedProduct => productPurchaseData.some(purchasedProduct => purchasedProduct.name === viewedProduct.name) ); // console.log('hasMatchingProduct:', hasMatchingProduct); // console.log('quotationDataCookieValue:', quotationDataCookieValue); // console.log('dataPopulationCookieValue:', dataPopulationCookieValue); // Activation conditions // const shouldActivate = ( // (!hasMatchingProduct && quotationDataCookieValue === '') || // (!hasMatchingProduct && quotationDataCookieValue && dataPopulationCookieValue === 'true') // ) if (!hasMatchingProduct) { //alert('activate'); executeTrigger(); } })() }}, C_722219_819_1_2_5:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("visibility",".announcement-blue-bg"); vwo_debug*/(el=vwo_$(".announcement-blue-bg")).vwoCss({visibility:"visible !important"});})(".announcement-blue-bg")}}, C_722219_819_1_2_4:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove","#RCBFORM > div:nth-of-type(1) > div:nth-of-type(1)"); vwo_debug*/(el=vwo_$("#RCBFORM > div:nth-of-type(1) > div:nth-of-type(1)")).vwoCss({display:"none !important"});})("#RCBFORM > div:nth-of-type(1) > div:nth-of-type(1)")}}, C_722219_819_1_2_3:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".root > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(24) > div:nth-of-type(1)"); vwo_debug*/(el=vwo_$(".root > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(24) > div:nth-of-type(1)")).vwoCss({display:"none !important"});})(".root > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(24) > div:nth-of-type(1)")}}, C_722219_819_1_2_2:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".footer"); vwo_debug*/(el=vwo_$(".footer")).vwoCss({display:"none !important"});})(".footer")}}, C_722219_819_1_2_1:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".header"); vwo_debug*/(el=vwo_$(".header")).vwoCss({display:"none !important"});})(".header")}}, C_722219_819_1_2_0:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".cmp-marquee-promotion"); vwo_debug*/(el=vwo_$(".cmp-marquee-promotion")).vwoCss({display:"none !important"});})(".cmp-marquee-promotion")}}, C_722219_1036_1_2_0:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".breadcrumb > ul:nth-of-type(1)"); vwo_debug*/(el=vwo_$(".breadcrumb > ul:nth-of-type(1)")).vwoCss({display:"none !important"});})(".breadcrumb > ul:nth-of-type(1)")}}, ct_969ce375f56191050c360e633277bd5a:{ fn:function(executeTrigger, vwo_$, config) { (function() { if (!config || typeof config !== "object") { return; } if (window.vwo_$(config.sel).length > 0) { return executeTrigger(); } window.VWO._.phoenixMT.once("vwo_mutObs." + config.triggerName, () => { if (window.vwo_$(config.sel).length > 0) { executeTrigger(); } }); })() } }, ct_5215ff5c22dc94f8ba11d10604b76f9d:{ fn:function(executeTrigger, vwo_$, config) { (function() { if (!config || typeof config !== "object") { return; } if (window.vwo_$(config.sel).length > 0) { return executeTrigger(); } window.VWO._.phoenixMT.once("vwo_mutObs." + config.triggerName, () => { if (window.vwo_$(config.sel).length > 0) { executeTrigger(); } }); })() } }, C_722219_980_1_2_0:{ fn:function(log,nonce=''){return (function(x) { try{ var _vwo_sel = vwo_$("`); !vwo_$("head").find('#1737431535466').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)} try{}catch(e) {console.error(e)} try{const inputField=document.querySelectorAll(".cmp-input__inputfield"),notificationDiv=document.querySelector(".education-message-notification");var spanElement=document.querySelector(".cmp-notification__icon.cmp-notification__icon--image"),childElement=spanElement.querySelector("img");const slideAdd=document.querySelector(".vwo-slider");function updateClassC(e){console.log("NEWVALUE",e);const t=document.querySelector(".cmp-notification__text .cmp-notification__textcon");t&&("4,000"===e?(notificationDiv.classList.remove("hidden"),t.textContent="For $4,000 you can hire a trained domestic helper for caregiving and pay for rehabilitation and medical supply expenses.",childElement.src="/content/dam/gel-orion/pre-login-agency/sg/en/common-images/icons/icon-milestone-heart.png"):"4,800"===e?(notificationDiv.classList.remove("hidden"),t.textContent="$4,800 can bring you care by a loved one as well as rehabilitation and medical supplies.",childElement.src="/content/dam/gel-orion/pre-login-agency/sg/en/common-images/icons/icon-milestone-successful.png"):notificationDiv.classList.add("hidden"))}function sendValue(e){window.VWO=window.VWO||[],VWO.event=VWO.event||function(){VWO.push(["event"].concat([].slice.call(arguments)))},VWO.event("gcsSelectedRevenueAmount",{container5D41476F83DivAemCmpForm:e,gcsSlideValue2:e})}slideAdd.classList.add("slider-icons-wrapper"),inputField.forEach(e=>{const t=e.querySelector(".modelValue");if(t){const e=()=>{console.log("Current value:",t.textContent),updateClassC(t.textContent.trim()),sendValue(t.textContent.trim())};e();new MutationObserver(()=>{e()}).observe(t,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attributeOldValue:!0,characterDataOldValue:!0})}});}catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_722219_980_1_3_0:{ fn:function(log,nonce=''){return (function(x) { try{ var _vwo_sel = vwo_$("`); !vwo_$("head").find('#1737431535472').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)} try{}catch(e) {console.error(e)} try{const inputField=document.querySelectorAll(".cmp-input__inputfield"),notificationDiv=document.querySelector(".education-message-notification");var spanElement=document.querySelector(".cmp-notification__icon.cmp-notification__icon--image"),childElement=spanElement.querySelector("img");function updateClassC(e){console.log("NEWVALUE",e);document.querySelector(".cmp-notification__text .cmp-notification__textcon")&&("4,000"===e||"4,800"===e||notificationDiv.classList.add("hidden"))}function sendValue(e){window.VWO=window.VWO||[],VWO.event=VWO.event||function(){VWO.push(["event"].concat([].slice.call(arguments)))},VWO.event("gcsSelectedRevenueAmount",{container5D41476F83DivAemCmpForm:e,gcsSlideValue2:e})}notificationDiv.classList.add("hidden"),console.log("GCS test started"),inputField.forEach(e=>{const t=e.querySelector(".modelValue");if(t){const e=()=>{console.log("Current value:",t.textContent),sendValue(t.textContent.trim())};e();new MutationObserver(()=>{e()}).observe(t,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attributeOldValue:!0,characterDataOldValue:!0})}});}catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_722219_980_1_3_1:{ fn:function(log,nonce=''){return (function(x) { try{ var _vwo_sel = vwo_$("`); !vwo_$("head").find('#1737431535473').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)} try{}catch(e) {console.error(e)} try{/* // Flag to ensure the action happens only once let firstTime = true; function forceClickAndChange() { if (firstTime) { // Simulate a click on the icon-edit element const iconEditButton = document.querySelector('.icon-edit'); if (iconEditButton) { iconEditButton.click(); console.log(iconEditButton); console.log("edit clicked"); } //attempt to change sliderinput value const changeValue = document.getElementById('sliderinput'); if (changeValue) { changeValue.value = 4000; console.log("amount changed v2"); } // Change the value of the modalvalue span const modalValueSpan = document.querySelector(".modelValue"); if (modalValueSpan) { modalValueSpan.textContent = 4000; console.log("amount changed v1"); } // Simulate a click on the icon-check element const iconCheckButton = document.querySelector('.icon-check'); if (iconCheckButton) { iconCheckButton.click(); console.log("edit check clicked"); // Set the flag to false to prevent future executions } firstTime = false; } } // Call the function to initiate the process forceClickAndChange(); */ }catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_722219_1036_1_2_3:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".m-0 > div:nth-of-type(1) > div:nth-of-type(4)"); vwo_debug*/(el=ctx).vwoCss({display:"none !important"});})(".m-0 > div:nth-of-type(1) > div:nth-of-type(4)")}}, R_722219_1036_1_2_3:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","remove",".m-0 > div:nth-of-type(1) > div:nth-of-type(4)"); vwo_debug*/(el=ctx).vwoRevertCss();})(".m-0 > div:nth-of-type(1) > div:nth-of-type(4)")}}, C_722219_1036_1_2_4:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".leo-download-links"); vwo_debug*/(el=ctx).vwoCss({display:"none !important"});})(".leo-download-links")}}, R_722219_1036_1_2_4:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","remove",".leo-download-links"); vwo_debug*/(el=ctx).vwoRevertCss();})(".leo-download-links")}}, C_722219_1036_1_2_5:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".leo-row--gap-xs > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(6)"); vwo_debug*/(el=ctx).vwoCss({display:"none !important"});})(".leo-row--gap-xs > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(6)")}}, R_722219_1036_1_2_5:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","remove",".leo-row--gap-xs > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(6)"); vwo_debug*/(el=ctx).vwoRevertCss();})(".leo-row--gap-xs > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(6)")}}, C_722219_1036_1_2_6:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".leo-row--gap-xs > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)"); vwo_debug*/(el=ctx).vwoCss({display:"none !important"});})(".leo-row--gap-xs > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)")}}, R_722219_1036_1_2_6:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","remove",".leo-row--gap-xs > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)"); vwo_debug*/(el=ctx).vwoRevertCss();})(".leo-row--gap-xs > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)")}}, R_722219_998_1_2_0:{ fn:function(){return (function(x) { try{ var el,ctx=vwo_$(x); /*vwo_debug log("Revert","addElement","body"); vwo_debug*/(el=vwo_$('[vwo-element-id="1736837447632"]')).remove(); var ctx=vwo_$(x),el; /*vwo_debug log("Revert","content",""); vwo_debug*/; el=vwo_$('[vwo-element-id="1736837447668"]'); el.revertContentOp().remove(); return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {} })("HEAD")}}, C_722219_998_1_3_0:{ fn:function(){return (function(x) { try{ // Start variation JS void (function loadVariation(timeInFuture) { // Main Test object const test = { // Some test specific global letiables id: "EXP-1-control", // Test init init: function () { // Add a test specific classname to the body element document.body.classList.add(test.id); // Below function calls order is important test.mainJS(); }, // Main JS mainJS: function () { const cookieName = "quotationData"; // Function to get cookie function getCookie(cname) { const name = cname + "="; const decodedCookie = decodeURIComponent(document.cookie); const cookies = decodedCookie.split(';'); for (const cookie of cookies) { const c = cookie.trim(); if (c.indexOf(name) === 0) { return c.substring(name.length); } } return ""; } // function to trigger GA events function gaEventTrigger(eventAction, eventLabel, eventSubCategory = '', eventJourneyCTA = '') { dataLayer.push({ event: "vwoEvent", eventDetails: { category: "[vwo] floating banner - ab test - control", action: eventAction, label: eventLabel }, ...(eventSubCategory ? { contentSubcategory: eventSubCategory } : {}), ...(eventJourneyCTA ? { journeyCta: eventJourneyCTA } : {}) }); }; const existingCookie = getCookie(cookieName); const productData = existingCookie ? JSON.parse(existingCookie) : {}; let productName = productData?.productJourney; // Retrieve banner view count from localStorage or default to 0 let bannerViewCount = parseInt(localStorage.getItem('bannerViewCount') || '0', 10); // Check session storage for the 'viewInSession' flag, defaulting to 'show' const viewInSession = sessionStorage.getItem('viewInSession') || 'show'; // Update session storage if not already set if (viewInSession === 'show') { sessionStorage.setItem('viewInSession', 'show'); // Increment and update banner view count in localStorage bannerViewCount += 1; localStorage.setItem('bannerViewCount', bannerViewCount); } if ( productData && productData.productJourney && location.pathname === '/sg/en/personal-insurance.html' && bannerViewCount <= 2 && viewInSession !== 'dont show' ) { // trigger impression event let eventLabel = (`[vwo_ce_rtg] resume orion journey floating banner - ${productName}`).toLowerCase(); let eventSubCategory = productName.toLowerCase(); gaEventTrigger('impression', eventLabel, eventSubCategory); // set banner view count to session & local storage sessionStorage.setItem('viewInSession', 'seen'); } }, }; // Return if the test ran already! if (document.querySelector(`.${test.id}`)) return; // Polling conditions if (document.readyState === 'complete') { try { // Activate test test.init(); // Success log console.log('Vertis Digital: Control: EXP-1: V: 1:01'); } catch (error) { // Error log console.log(`Initialization Error:`, error); } } else { Date.now() < timeInFuture ? setTimeout(loadVariation.bind({}, timeInFuture), 25) : console.log("loadVariation timed out!"); } })(Date.now() + 60000); // End variation JS return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {} })("HEAD")}}, ct998_7968865b609e3fc27b943d00b3dd1b98:{ fn:function(executeTrigger, vwo_$) { (function () { if (location.pathname !== '/sg/en/personal-insurance.html') return false; const cookieName = "quotationData"; const productsPurchasedCookieName = "personalization_products_purchased"; // Function to get cookie function getCookie(cname) { const name = cname + "="; const decodedCookie = decodeURIComponent(document.cookie); const cookies = decodedCookie.split(';'); for (const cookie of cookies) { const c = cookie.trim(); if (c.indexOf(name) === 0) { return c.substring(name.length); } } return ""; } const existingCookie = getCookie(cookieName); const productsPurchasedStr = getCookie(productsPurchasedCookieName); const productData = existingCookie ? JSON.parse(existingCookie) : {}; const productPurchaseData = productsPurchasedStr ? JSON.parse(productsPurchasedStr) : []; const productsViewedCTAArr = [ { "name": "GREAT Protector Active" } ]; // Check if any product from productsViewedCTAArr is in productPurchaseData const hasMatchingProduct = productsViewedCTAArr.some(viewedProduct => productPurchaseData.some(purchasedProduct => purchasedProduct.name === viewedProduct.name) ); let bannerCount = localStorage.getItem('bannerViewCount'); if ( !hasMatchingProduct && productData && productData.productJourney && (bannerCount === null || (bannerCount && parseInt(bannerCount, 10) < 3)) ) { //alert('activate'); executeTrigger(); } })() }}, R_722219_1036_1_2_8:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","remove",".leo-row--gap-xs > div:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(5)"); vwo_debug*/(el=ctx).vwoRevertCss();})(".leo-row--gap-xs > div:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(5)")}}, C_722219_1036_1_2_9:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".cmp-marqueePromotion"); vwo_debug*/(el=vwo_$(".cmp-marqueePromotion")).vwoCss({display:"none !important"});})(".cmp-marqueePromotion")}}, R_722219_1036_1_2_9:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","remove",".cmp-marqueePromotion"); vwo_debug*/(el=vwo_$(".cmp-marqueePromotion")).vwoRevertCss();})(".cmp-marqueePromotion")}}, C_722219_1036_1_2_10:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".cmp-announcement-widget-xf"); vwo_debug*/(el=vwo_$(".cmp-announcement-widget-xf")).vwoCss({display:"none !important"});})(".cmp-announcement-widget-xf")}}, R_722219_1036_1_2_10:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","remove",".cmp-announcement-widget-xf"); vwo_debug*/(el=vwo_$(".cmp-announcement-widget-xf")).vwoRevertCss();})(".cmp-announcement-widget-xf")}}, ct1023_953ef402e8096046b2371d5b5a151128:{ fn:function(executeTrigger, vwo_$) { ( //Visited PDP audience trigger for VWO function () { // ---------------------------------- // ----- Personalization config ----- // ---------------------------------- var MAX_VIEWED_PRODUCTS = 3; // Max number of recommended products /* Product master infos: - name = Master product name. Ensure that this matches the master mapping (eg. data layer values) */ var productsViewedCTAArr = [ { name: "GREAT CareShield" }, { name: "GREAT Critical Cover Series" }, { name: "GoGreat Term Life" }, { name: "GREAT Protector Active" }, { name: "Essential Protector Plus" }, { name: "GREAT Junior Protector" }, { name: "GREAT Prime Rewards" }, { name: "TravelSmart Premier" }, { name: "Drive and Save Plus" }, { name: "GREAT Maid Protect" }, // { name: "GREAT SP" }, { name: "GREAT Golden Protector" }, { name: "GREAT EV Protect" }, { name: "GREAT Hospital Cash " }, { name: "PA Supreme" }, { name: "GREAT Home Protect" }, { name: "GREAT SupremeHealth + GREAT TotalCare" }, { name: "GREAT Wealth Advantage 4" }, { name: "GREAT Maternity Care 2" }, { name: "GREAT Flexi Protect Series 3" }, // unmatched product names in orion journey // { name: "GREAT SP (24-month)" }, { name: "GREAT Critical Cover: Top 3 CIs" }, { name: "GREAT Term (Digital)" }, { name: "GREAT Hospital Cash" }, // new products { name: "GREAT Term" }, { name: "Prestige Legacy Index" }, { name: "Prestige Legacy Advantage" }, { name: "Prestige Harvest" }, { name: "Prestige Life Gold (SGD/USD)" }, { name: "LifeSecure" }, { name: "Pay Assure" }, { name: "Prestige Global Health Options | International Health Insurance" }, { name: "Essential Protector" }, { name: "AccidentCare Plus II" }, { name: "Prestige PACare" }, { name: "GREAT Lifetime Payout 2 Special " }, { name: "GREAT Retire Income" }, { name: "Prestige Life Rewards Series" }, { name: "GREAT Flexi Cashback" }, { name: "GREAT Wealth Multiplier" }, { name: "GREAT Flexi Goal" }, { name: "Prestige Portfolio" }, { name: "GREAT Invest Advantage" }, { name: "Investment-Linked Funds" } ]; // List of Non digital products var productsRCB = [ { name: "GREAT SupremeHealth + GREAT TotalCare" }, { name: "GREAT Wealth Advantage 4" }, { name: "GREAT Maternity Care 2" }, { name: "GREAT Flexi Protect Series 3" }, { name: "GREAT Term" }, { name: "Prestige Legacy Index" }, { name: "Prestige Legacy Advantage" }, { name: "Prestige Harvest" }, { name: "Prestige Life Gold (SGD/USD)" }, { name: "LifeSecure" }, { name: "Pay Assure" }, { name: "Prestige Global Health Options | International Health Insurance" }, { name: "Essential Protector" }, { name: "AccidentCare Plus II" }, { name: "Prestige PACare" }, { name: "GREAT Lifetime Payout 2 Special " }, { name: "GREAT Retire Income" }, { name: "Prestige Life Rewards Series" }, { name: "GREAT Flexi Cashback" }, { name: "GREAT Wealth Multiplier" }, { name: "GREAT Flexi Goal" }, { name: "Prestige Portfolio" }, { name: "GREAT Invest Advantage" }, { name: "Investment-Linked Funds" } ]; // ----------------------------------------- // ----- System config (Do not change) ----- // ----------------------------------------- var VIEWED_PRODUCTS_COOKIE = "personalization_products_viewed_all"; var PURCHASED_PRODUCTS_COOKIE = "personalization_products_purchased"; var VIEWED_RCB_COOKIE = "personalization_products_viewed_RCB"; // ------------------------------- // ----- Get cookie function ----- // ------------------------------- function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i].trim(); if (c.indexOf(name) === 0) { return c.substring(name.length, c.length) } } return ""; } // ------------------------------------------------ // ----- Check last viewed/purchased products ----- // ------------------------------------------------ // Read cookies const productsViewedStr = getCookie(VIEWED_PRODUCTS_COOKIE); const productsPurchasedStr = getCookie(PURCHASED_PRODUCTS_COOKIE); const productsViewedRCBStr = getCookie(VIEWED_RCB_COOKIE); // Parse cookies if they are not empty, otherwise default to an empty array let productsViewedArr = productsViewedStr ? JSON.parse(productsViewedStr) : []; let productsPurchasedArr = productsPurchasedStr ? JSON.parse(productsPurchasedStr) : []; let productsViewedRCBArr = productsViewedRCBStr ? JSON.parse(productsViewedRCBStr) : []; // Remove purchased products from last viewed products productsViewedArr = productsViewedArr.filter( viewedProduct => !productsPurchasedArr.some(purchasedProduct => purchasedProduct.name === viewedProduct.name) ); // Filter out products that have already been viewed from the RCB list productsRCB = productsRCB.filter( rcbProduct => !productsViewedRCBArr.some(viewedRCBProduct => viewedRCBProduct.name === rcbProduct.name) ); // Remove non viewed RCB products from the viewed products array productsViewedArr = productsViewedArr.filter( viewedProduct => !productsRCB.some(rcbProduct => rcbProduct.name === viewedProduct.name) ); // Cross check master product infos productsViewedArr = productsViewedArr.filter( viewedProduct => productsViewedCTAArr.some(ctaProduct => ctaProduct.name === viewedProduct.name) ); // Reduce to the latest X array items productsViewedArr = productsViewedArr.slice(-MAX_VIEWED_PRODUCTS); // If there are last products viewed, run VWO campaign if (productsViewedArr.length) { executeTrigger(); //alert('activate') } } )() }}, R_722219_1023_1_2_0:{ fn:function(){return (function(x) { try{ var el,ctx=vwo_$(x); /*vwo_debug log("Revert","addElement","body"); vwo_debug*/(el=vwo_$('[vwo-element-id="1740714890171"]')).remove(); var ctx=vwo_$(x),el; /*vwo_debug log("Revert","content",""); vwo_debug*/; el=vwo_$('[vwo-element-id="1740714890173"]'); el.revertContentOp().remove(); return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) { VWO._.vAEH(e); } })("HEAD")}}, C_722219_1023_1_2_0:{ fn:function(){return (function(x) { try{ var _vwo_sel = vwo_$(""); !vwo_$("head").find("#1740714890173").length && vwo_$('head').append(_vwo_sel); // Start variation JS void (function loadVariation(timeInFuture) { // Main Test object const test = { // Some test specific global letiables id: "MT-07", // Test init init: function () { // Add a test specific classname to the body element document.body.classList.add(test.id); // Below function calls order is important test.mainJS(); }, // Main JS mainJS: function () { // ----- Personalization config ----- const productsViewedMaxItems = 3; const mainTitle = "Your recent visits"; const learnMoreCTA = "Learn More"; const buyNowCTA = "Buy Now"; const talkToUsCTA = "Talk To Us"; // GA tracking var gaEventLabelPrefix = "[vwo_ce_rtg] your recent visits"; // SVG Icons const healthInsuranceIcon = ` icons/prod cat/hospital/clr-hospitalisation `; const lifeInsuranceIcon = ` icons/prod cat/whole life/clr-whole-life `; const travelInsuranceIcon = ` icons/prod cat/lifestyle/clr-travel `; const homeInsuranceIcon = ` icons/prod cat/lifestyle/clr-house `; const personalAccidentInsuranceIcon = ` icons/prod cat/PA/clr-personal-assident `; const retirementIncomeIcon = ` icons/prod cat/savings + retirement/clr-retirement `; const carInsuranceIcon = ` icons/prod cat/lifestyle/clr-motor `; const maidInsuranceIcon = ` icons/prod cat/lifestyle/clr-maid `; const wealthInsurenceIcon = ` icons/prod cat/investment/clr-wealth `; // list of products and their information const productMasterInfos = [ { name: "GREAT CareShield", productName: "GREAT CareShield", className: "GREAT-CareShield", learnMoreUrl: "/sg/en/personal-insurance/our-products/health-insurance/great-careshield.html", buyOrTalkToUsLink: "//buy.greateasternlife.com/sg/en/health-insurance/220402/get-quotation.html?template=post", productDescription: "Get up to 40% off your first-year premium and 20% off subsequent years’ premiums. T&Cs apply.", productIcon: healthInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "GoGreat Term Life", productName: "GoGreat Term Life", className: "GoGreat-Term-Life", learnMoreUrl: "/sg/en/personal-insurance/our-products/life-insurance/gogreat-term-life.html", buyOrTalkToUsLink: "//buy.greateasternlife.com/sg/en/life-insurance/210301/get-quotation.html?template=post", productDescription: "Boost up to S$300,000 on your coverage from a yearly premium of just S$77.15", productIcon: lifeInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "TravelSmart Premier", productName: "TravelSmart Premier", className: "TravelSmart-Premier", learnMoreUrl: "/sg/en/personal-insurance/our-products/travel-insurance/travelsmart-premier.html", buyOrTalkToUsLink: "//store.greateasterngeneral.com/SG/AgencySales/D/B2C/P:TSP", productDescription: "Enjoy 45% off Classic and Elite single trip plans. T&Cs apply.", productIcon: travelInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "GREAT Protector Active", productName: "GREAT Protector Active", className: "GREAT-Protector-Active", learnMoreUrl: "/sg/en/personal-insurance/our-products/personal-accident-insurance/great-protector-active.html", buyOrTalkToUsLink: "//buy.greateasternlife.com/sg/en/personal-accident-insurance/200201/get-quotation.html?template=post", productDescription: "Get up to S$3 million in coverage against accidents", productIcon: personalAccidentInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "Essential Protector Plus", productName: "Essential Protector Plus", className: "Essential-Protector-Plus", learnMoreUrl: "/sg/en/personal-insurance/our-products/personal-accident-insurance/essential-protector-plus.html", buyOrTalkToUsLink: "//buy.greateasternlife.com/sg/en/personal-accident-insurance/200204/get-quotation.html?template=post", productDescription: "Peace of mind with global protection against accidents", productIcon: personalAccidentInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "GREAT Junior Protector", productName: "GREAT Junior Protector", className: "GREAT-Junior-Protector", learnMoreUrl: "/sg/en/personal-insurance/our-products/personal-accident-insurance/great-junior-protector.html", buyOrTalkToUsLink: "//buy.greateasternlife.com/sg/en/personal-accident-insurance/200202/get-quotation.html?template=post", productDescription: "Safeguard your child against accidents wherever they are", productIcon: personalAccidentInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "Drive and Save Plus", productName: "Drive and Save Plus", className: "Drive-and-Save-Plus", learnMoreUrl: "/sg/en/personal-insurance/our-products/car-insurance/drive-and-save-plus.html", buyOrTalkToUsLink: "//store.greateasterngeneral.com/SG/AgencySales/D/B2C/P:VDP", productDescription: "Safeguard your drive with enhanced protection", productIcon: carInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "GREAT Maid Protect", productName: "GREAT Maid Protect", className: "GREAT-Maid-Protect", learnMoreUrl: "/sg/en/personal-insurance/our-products/maid-insurance/great-maid-protect.html", buyOrTalkToUsLink: "//store.greateasterngeneral.com/SG/AgencySales/D/B2C/P:AGM", productDescription: "Enjoy 20% off all plan types. T&Cs apply.", productIcon: maidInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "GREAT Critical Cover Series", productName: "GREAT Critical Cover Series", className: "GREAT-Critical-Cover-Series", learnMoreUrl: "/sg/en/personal-insurance/our-products/health-insurance/great-critical-cover.html", buyOrTalkToUsLink: "//buy.greateasternlife.com/sg/en/life-insurance/220303/get-quotation.html?template=post", productDescription: "Critical illness coverage that continues over and over again", productIcon: healthInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "GREAT Prime Rewards", productName: "GREAT Prime Rewards", className: "GREAT-Prime-Rewards", learnMoreUrl: "/sg/en/personal-insurance/our-products/retirement-income/great-prime-rewards.html", buyOrTalkToUsLink: "//buy.greateasternlife.com/sg/en/life-insurance/220105/get-quotation.html", productDescription: "Live out your retirement dream with a guaranteed income stream", productIcon: retirementIncomeIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, // { // name: "GREAT SP", // productName: "GREAT SP", // className: "GREAT-SP", // learnMoreUrl: "/sg/en/personal-insurance/our-products/wealth-accumulation/great-sp.html", // buyOrTalkToUsLink: "//buy.greateasternlife.com/sg/en/life-insurance/240101/get-quotation.html?template=post", // productDescription: "Guaranteed returns of 2.60% p.a. upon maturity. T&Cs apply", // productIcon: wealthInsurenceIcon, // buttonsTitles: [learnMoreCTA, buyNowCTA] // }, { name: "GREAT Golden Protector", productName: "GREAT Golden Protector", className: "GREAT-Golden-Protector", learnMoreUrl: "/sg/en/personal-insurance/our-products/personal-accident-insurance/great-golden-protector.html", buyOrTalkToUsLink: "//buy.greateasternlife.com/sg/en/personal-accident-insurance/200203/get-quotation.html?template=post", productDescription: "Protect your golden years with financial assurance", productIcon: personalAccidentInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "GREAT EV Protect", productName: "GREAT EV Protect", className: "GREAT-EV-Protect", learnMoreUrl: "/sg/en/personal-insurance/our-products/car-insurance/great-ev-protect.html", buyOrTalkToUsLink: "//store.greateasterngeneral.com/SG/AgencySales/D/B2C/P:VEV", productDescription: "Protect your drive with comprehensive coverage for your electric vehicle", productIcon: carInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "GREAT Hospital Cash ", productName: "GREAT Hospital Cash ", className: "GREAT-Hospital-Cash", learnMoreUrl: "/sg/en/personal-insurance/our-products/health-insurance/great-hospital-cash.html", buyOrTalkToUsLink: "//buy.greateasternlife.com/sg/en/health-insurance/230401/get-quotation.html", productDescription: "Daily Cash Benefit upon hospitalisation", productIcon: healthInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "PA Supreme", productName: "PA Supreme", className: "PA-Supreme", learnMoreUrl: "/sg/en/personal-insurance/our-products/personal-accident-insurance/pa-supreme.html", buyOrTalkToUsLink: "//www.greateasternlife.com/psu", productDescription: "Enjoy 25% off all plan types. T&Cs apply.", productIcon: personalAccidentInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, { name: "GREAT Home Protect", productName: "GREAT Home Protect", className: "GREAT-Home-Protect", learnMoreUrl: "/sg/en/personal-insurance/our-products/home-insurance/great-home-protect.html", buyOrTalkToUsLink: "//store.greateasterngeneral.com/SG/AgencySales/D/B2C/P:HHP", productDescription: "Enjoy 20% off your home insurance! T&Cs apply.", productIcon: homeInsuranceIcon, buttonsTitles: [learnMoreCTA, buyNowCTA] }, // No digital products { name: "GREAT SupremeHealth + GREAT TotalCare", productName: "GREAT SupremeHealth", className: "GREAT-SupremeHealth", learnMoreUrl: "/sg/en/personal-insurance/our-products/health-insurance/great-supremehealth-main.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/health-insurance/great-supremehealth-main.html#rcbform", productDescription: "Cover up to 95% of your total hospitalisation bill", productIcon: healthInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "GREAT Wealth Advantage 4", productName: "GREAT Wealth Advantage", className: "GREAT-Wealth-Advantage", learnMoreUrl: "/sg/en/personal-insurance/our-products/wealth-accumulation/great-wealth-advantage.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/wealth-accumulation/great-wealth-advantage.html#rcbform", productDescription: "Power up your investment portfolio on your terms", productIcon: wealthInsurenceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "GREAT Maternity Care 2", productName: "GREAT Maternity Care", className: "GREAT-Maternity-Care", learnMoreUrl: "/sg/en/personal-insurance/our-products/health-insurance/great-maternity-care.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/health-insurance/great-maternity-care.html#rcbform", productDescription: "Comprehensive coverage from as early as 13 weeks into your pregnancy", productIcon: healthInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "GREAT Flexi Protect Series 3", productName: "GREAT Flexi Protect Series", className: "GREAT-Flexi-Protect-Series", learnMoreUrl: "/sg/en/personal-insurance/our-products/life-insurance/great-flexi-protect-series.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/life-insurance/great-flexi-protect-series.html#rcbform", productDescription: "Secure lifelong multiplied coverage to protect you and your loved ones", productIcon: lifeInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, // new products { name: "GREAT Term", productName: "GREAT Term", className: "GREAT-Term", learnMoreUrl: "/sg/en/personal-insurance/our-products/life-insurance/great-term.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/life-insurance/great-term.html#rcbform", productDescription: "Secure your future with a customisable, affordable term plan", productIcon: lifeInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "Prestige Legacy Index", productName: "Prestige Legacy Index", className: "Prestige-Legacy-Index", learnMoreUrl: "/sg/en/personal-insurance/our-products/life-insurance/prestige-legacy-index.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/life-insurance/prestige-legacy-index.html#rcbform", productDescription: "Build timeless value of your legacy with high lifetime protection", productIcon: lifeInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "Prestige Legacy Advantage", productName: "Prestige Legacy Advantage", className: "Prestige-Legacy-Advantage", learnMoreUrl: "/sg/en/personal-insurance/our-products/life-insurance/prestige-legacy-advantage.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/life-insurance/prestige-legacy-advantage.html#rcbform", productDescription: "Grow the value of your legacy beyond the ordinary", productIcon: lifeInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "Prestige Harvest", productName: "Prestige Harvest", className: "Prestige-Harvest", learnMoreUrl: "/sg/en/personal-insurance/our-products/life-insurance/prestige-harvest-universal-life-insurance-plan.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/life-insurance/prestige-harvest-universal-life-insurance-plan.html#rcbform", productDescription: "Leave a lasting legacy. Enjoy your golden years.", productIcon: lifeInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "Prestige Life Gold (SGD/USD)", productName: "Prestige Life Gold", className: "Prestige-Life-Gold", learnMoreUrl: "/sg/en/personal-insurance/our-products/life-insurance/prestige-life-gold.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/life-insurance/prestige-life-gold.html#rcbform", productDescription: "Protection for a lifetime, a legacy for generations", productIcon: lifeInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "LifeSecure", productName: "LifeSecure", className: "LifeSecure", learnMoreUrl: "/sg/en/personal-insurance/our-products/health-insurance/lifesecure.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/health-insurance/lifesecure.html#rcbform", productDescription: "Secure your future with comprehensive disability coverage", productIcon: healthInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "Pay Assure", productName: "Pay Assure", className: "Pay-Assure", learnMoreUrl: "/sg/en/personal-insurance/our-products/health-insurance/pay-assure.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/health-insurance/pay-assure.html#rcbform", productDescription: "Ensure income continuity with the assurance of monthly benefits", productIcon: healthInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "Prestige Global Health Options | International Health Insurance", productName: "Prestige Global Health Options", className: "Prestige-Global-Health-Options", learnMoreUrl: "/sg/en/personal-insurance/our-products/health-insurance/prestigeglobalhealthoptions.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/health-insurance/prestigeglobalhealthoptions.html#rcbform", productDescription: "International Health Insurance", productIcon: healthInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "Essential Protector", productName: "Essential Protector", className: "Essential-Protector", learnMoreUrl: "/sg/en/personal-insurance/our-products/personal-accident-insurance/essential-protector.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/personal-accident-insurance/essential-protector.html#rcbform", productDescription: "Safeguard yourself and your family against accidents", productIcon: personalAccidentInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "AccidentCare Plus II", productName: "AccidentCare Plus II", className: "AccidentCare-Plus", learnMoreUrl: "/sg/en/personal-insurance/our-products/personal-accident-insurance/accidentcare-plus-2.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/personal-accident-insurance/accidentcare-plus-2.html#rcbform", productDescription: "Tailor-made personal accident protection", productIcon: personalAccidentInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "Prestige PACare", productName: "Prestige PACare", className: "Prestige-PACare", learnMoreUrl: "/sg/en/personal-insurance/our-products/personal-accident-insurance/prestige-pacare.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/personal-accident-insurance/prestige-pacare.html#rcbform", productDescription: "Your guardian in life’s unpredictable moments", productIcon: personalAccidentInsuranceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "GREAT Lifetime Payout 2 Special ", productName: "GREAT Lifetime Payout 2 Special", className: "GREAT-Lifetime-Payout-2-Special", learnMoreUrl: "/sg/en/personal-insurance/our-products/retirement-income/great-lifetime-payout.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/retirement-income/great-lifetime-payout.html#rcbform", productDescription: "Enjoy a lifetime income stream of guaranteed monthly payouts", productIcon: retirementIncomeIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "GREAT Retire Income", productName: "GREAT Retire Income", className: "GREAT-Retire-Income", learnMoreUrl: "/sg/en/personal-insurance/our-products/retirement-income/great-retire-income.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/retirement-income/great-retire-income.html#rcbform", productDescription: "Safeguard your financial freedom, not just your retirement", productIcon: retirementIncomeIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "Prestige Life Rewards Series", productName: "Prestige Life Rewards Series", className: "Prestige-Life-Rewards-Series", learnMoreUrl: "/sg/en/personal-insurance/our-products/wealth-accumulation/prestige-life-rewards-series.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/wealth-accumulation/prestige-life-rewards-series.html#rcbform", productDescription: "Build a lasting legacy of generational wealth", productIcon: wealthInsurenceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, // Duplicate product: GREAT Lifetime Payout 2 Special { name: "GREAT Flexi Cashback", productName: "GREAT Flexi Cashback", className: "GREAT-Flexi-Cashback", learnMoreUrl: "/sg/en/personal-insurance/our-products/wealth-accumulation/great-flexi-cashback.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/wealth-accumulation/great-flexi-cashback.html#rcbform", productDescription: "Build your dreams while enjoying yearly cash payouts", productIcon: wealthInsurenceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "GREAT Wealth Multiplier", productName: "GREAT Wealth Multiplier", className: "GREAT-Wealth-Multiplier", learnMoreUrl: "/sg/en/personal-insurance/our-products/wealth-accumulation/great-wealth-multiplier.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/wealth-accumulation/great-wealth-multiplier.html#rcbform", productDescription: "Build your financial future with multiplied returns", productIcon: wealthInsurenceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "GREAT Flexi Goal", productName: "GREAT Flexi Goal", className: "GREAT-Flexi-Goal", learnMoreUrl: "/sg/en/personal-insurance/our-products/wealth-accumulation/great-flexi-goal.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/wealth-accumulation/great-flexi-goal.html#rcbform", productDescription: "Future-proof your family’s financial future with certainty", productIcon: wealthInsurenceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "Prestige Portfolio", productName: "Prestige Portfolio", className: "Prestige-Portfolio", learnMoreUrl: "/sg/en/personal-insurance/our-products/wealth-accumulation/prestige-portfolio.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/wealth-accumulation/prestige-portfolio.html#rcbform", productDescription: "Secure your investment potential with versatility on fund choices", productIcon: wealthInsurenceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "GREAT Invest Advantage", productName: "GREAT Invest Advantage", className: "GREAT-Invest-Advantage", learnMoreUrl: "/sg/en/personal-insurance/our-products/wealth-accumulation/great-invest-advantage.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/wealth-accumulation/great-invest-advantage.html#rcbform", productDescription: "Harness your savings for investment growth opportunities", productIcon: wealthInsurenceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, { name: "Investment-Linked Funds", productName: "Investment Linked Funds", className: "Investment-Linked-Funds", learnMoreUrl: "/sg/en/personal-insurance/our-products/wealth-accumulation/investment-linked-funds.html", buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/wealth-accumulation/investment-linked-funds.html#rcbform", productDescription: "Invest in professionally managed investment-linked funds to maximise your investment returns", productIcon: wealthInsurenceIcon, buttonsTitles: [learnMoreCTA, talkToUsCTA] }, ]; // List of RCB products let productsRCB = [ { name: "GREAT SupremeHealth + GREAT TotalCare" }, { name: "GREAT Wealth Advantage 4" }, { name: "GREAT Maternity Care 2" }, { name: "GREAT Flexi Protect Series 3" }, // new products { name: "GREAT Term" }, { name: "Prestige Legacy Index" }, { name: "Prestige Legacy Advantage" }, { name: "Prestige Harvest" }, { name: "Prestige Life Gold (SGD/USD)" }, { name: "LifeSecure" }, { name: "Pay Assure" }, { name: "Prestige Global Health Options | International Health Insurance" }, { name: "Essential Protector" }, { name: "AccidentCare Plus II" }, { name: "Prestige PACare" }, { name: "GREAT Lifetime Payout 2 Special " }, { name: "GREAT Retire Income" }, { name: "Prestige Life Rewards Series" }, // Duplicate product: GREAT Lifetime Payout 2 Special { name: "GREAT Flexi Cashback" }, { name: "GREAT Wealth Multiplier" }, { name: "GREAT Flexi Goal" }, { name: "Prestige Portfolio" }, { name: "GREAT Invest Advantage" }, { name: "Investment-Linked Funds" } ]; // Master product names handling const productNamesMaster = { // "GREAT SP (24-month)": "GREAT SP", "GREAT Critical Cover: Top 3 CIs": "GREAT Critical Cover Series", "GREAT Term (Digital)": "GREAT Term", "GREAT Hospital Cash": "GREAT Hospital Cash " }; // ----- System config ----- const VIEWED_PRODUCTS_COOKIE = "personalization_products_viewed_all"; const PURCHASED_PRODUCTS_COOKIE = "personalization_products_purchased"; const VIEWED_RCB_COOKIE = "personalization_products_viewed_RCB"; const vwoCtaClassName = "vwo_homepage_recentvisits_cta"; // fuction to add UTM Paramaeters function addUTMParameters(url, utmParams) { const [baseUrl, hashPart] = url.split('#'); // Split URL into main part and fragment const urlObj = new URL(baseUrl, "https://www.greateasternlife.com"); // Append UTM parameters Object.entries(utmParams).forEach(([key, value]) => { urlObj.searchParams.set(key, value); }); // Construct the relative path //const relativePath = urlObj.pathname + urlObj.search; const fullUrl = hashPart ? `${urlObj.toString()}#${hashPart}` : urlObj.toString(); //const relativeUrl = hashPart ? `${relativePath}#${hashPart}` : relativePath; return fullUrl; } // ----- System config: HTML structure----- const htmlTitle = `

${mainTitle}

`; const htmlCard = (productName, className, productIcon, productUrl, productBuyUrl, productDescription, buttonsTitles) => { let utmContentName = `vworv-${className}`.toLowerCase(); const utmParams = { utm_campaign: "gels_dco_rtg_ds_cxdrtg0225", utm_source: "other_website", utm_medium: "text-link", utm_content: utmContentName, utm_term: "cxdrtg" }; let finalProductUrl = addUTMParameters(productUrl, utmParams); let finalProductBuyUrl = addUTMParameters(productBuyUrl, utmParams); const descriptionClass = (productDescription.length > 82) ? "long-description" : ""; const headerClass = (productName.length > 30) ? "long-header" : ""; return (`
${productIcon}
${productName}

${productDescription}

`) } // Get cookie function function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i].trim(); if (c.indexOf(name) === 0) { return c.substring(name.length, c.length) } } return ""; } // function to trigger GA events function gaEventTrigger(eventAction, eventLabel, eventSubCategory = '', eventJourneyCTA = '') { dataLayer.push({ event: "vwoEvent", eventDetails: { category: "[vwo] thumbnail", action: eventAction, label: eventLabel }, ...(eventSubCategory ? { contentSubcategory: eventSubCategory } : {}), ...(eventAction === 'click' && eventJourneyCTA ? { journeyCta: eventJourneyCTA } : {}) }); }; // Read cookies const productsViewedStr = getCookie(VIEWED_PRODUCTS_COOKIE); const productsPurchasedStr = getCookie(PURCHASED_PRODUCTS_COOKIE); const productsViewedRCBStr = getCookie(VIEWED_RCB_COOKIE); // Parse cookies if they are not empty, otherwise default to an empty array let productsViewedArr = productsViewedStr ? JSON.parse(productsViewedStr) : []; let productsPurchasedArr = productsPurchasedStr ? JSON.parse(productsPurchasedStr) : []; let productsViewedRCBArr = productsViewedRCBStr ? JSON.parse(productsViewedRCBStr) : []; // Remove purchased products from last viewed products productsViewedArr = productsViewedArr.filter( viewedProduct => !productsPurchasedArr.some(purchasedProduct => purchasedProduct.name === viewedProduct.name) ); //console.log('productsViewedArr01:', productsViewedArr); // Filter out products that have already been viewed from the RCB list productsRCB = productsRCB.filter( rcbProduct => !productsViewedRCBArr.some(viewedRCBProduct => viewedRCBProduct.name === rcbProduct.name) ); //console.log('productsViewedArr02:', productsViewedArr); // Remove non viewed RCB products from the viewed products array productsViewedArr = productsViewedArr.filter( viewedProduct => !productsRCB.some(rcbProduct => rcbProduct.name === viewedProduct.name) ); //console.log('productsViewedArr03:', productsViewedArr); // Update product names using productNamesMaster productsViewedArr = productsViewedArr.map(viewedProduct => { const updatedName = productNamesMaster[viewedProduct.name] || viewedProduct.name; return { ...viewedProduct, name: updatedName }; }); //console.log('productsViewedArr04:', productsViewedArr); // Remove duplicate products from product list productsViewedArr = productsViewedArr.filter((item, index, array) => array.findLastIndex(obj => obj.name === item.name) === index ); //console.log('productsViewedArr05:', productsViewedArr); // Cross check master product infos productsViewedArr = productsViewedArr .filter( a => productMasterInfos.some(b => b.name === a.name) ) .map( a => { // Map image URL & CTA links const masterInfo = productMasterInfos.find(b => b.name === a.name); return { ...a, name: masterInfo.name, productName: masterInfo.productName, className: masterInfo.className, productDescription: masterInfo.productDescription, learnMoreUrl: masterInfo.learnMoreUrl, buyOrTalkToUsLink: masterInfo.buyOrTalkToUsLink, productIcon: masterInfo.productIcon, buttonsTitles: masterInfo.buttonsTitles }; } ); // Reduce to the latest X array items productsViewedArr = productsViewedArr.slice(-productsViewedMaxItems); // If no last products viewed, exit immediately if (!productsViewedArr.length) { return; } // Sort by the latest products viewed productsViewedArr.reverse(); //console.log('productsViewedArr:', productsViewedArr); // ----- Add section: Your recent visits ----- // create card html let htmlCardSection = ``; // Loop through last X products viewed and construct the cards HTML productsViewedArr.forEach(product => { const { productName, className, learnMoreUrl, buyOrTalkToUsLink, productDescription, productIcon, buttonsTitles } = product; let htmlTemp = htmlCard(productName, className, productIcon, learnMoreUrl, buyOrTalkToUsLink, productDescription, buttonsTitles); htmlCardSection += htmlTemp; // ----- GA tracking - Impression (individual card) ----- let eventLabel = (`${gaEventLabelPrefix} - card - ${productName} - ${productDescription}`).toLowerCase(); let eventSubCategory = productName.toLowerCase() gaEventTrigger("impression", eventLabel, eventSubCategory); }) // main markup let mainMarkup = `
${htmlTitle} ${htmlCardSection}
`; // Add the new row before the current 1st row if (!document.querySelector('.recent-visit-section-container')) { document.querySelectorAll(".columnControl.aem-GridColumn.aem-GridColumn--default--12")[1].insertAdjacentHTML("beforebegin", mainMarkup); if (document.querySelector('.recent-visit-section-container .long-description')) { document.querySelector('.recent-visit-section-container').classList.add('big-descriptions'); } if (document.querySelector('.recent-visit-section-container .long-header')) { document.querySelector('.recent-visit-section-container').classList.add('big-header'); } // ----- GA tracking - Impression (whole section) ----- let eventLabel = (`${gaEventLabelPrefix} - section`).toLowerCase(); gaEventTrigger("impression", eventLabel); } // click handler function function clickHandler(event) { const { target } = event; //console.log('target: ', target); if (target.closest('a.recent-card-button[title="Learn More"]')) { // ----- GA tracking - Click (learn more CTA) ----- let learnMore = target.closest('a.recent-card-button[title="Learn More"]'); let productName = learnMore?.getAttribute('product-name')?.trim().toLowerCase(); let productDescription = learnMore?.getAttribute('product-description'); if (productName && productDescription) { //alert('button click - learn more'); let label = (`${gaEventLabelPrefix} - card - ${productName} - ${productDescription} - learn more`).toLowerCase(); let eventJourneyCTA = (`vworv-${productName}-learn`).toLowerCase() gaEventTrigger('click', label, productName, eventJourneyCTA); } } if (target.closest('a.recent-card-button[title="Buy Now"]')) { // ----- GA tracking - Click (buy now CTA) ----- let learnMore = target.closest('a.recent-card-button[title="Buy Now"]'); let productName = learnMore?.getAttribute('product-name')?.trim().toLowerCase(); let productDescription = learnMore?.getAttribute('product-description'); if (productName && productDescription) { //alert('button click - buy now'); let label = (`${gaEventLabelPrefix} - card - ${productName} - ${productDescription} - buy now`).toLowerCase(); let eventJourneyCTA = (`vworv-${productName}-buy`).toLowerCase(); gaEventTrigger('click', label, productName, eventJourneyCTA); } } if (target.closest('a.recent-card-button[title="Talk To Us"]')) { // ----- GA tracking - Click (talk to CTA) ----- let learnMore = target.closest('a.recent-card-button[title="Talk To Us"]'); let productName = learnMore?.getAttribute('product-name')?.trim().toLowerCase(); let productDescription = learnMore?.getAttribute('product-description'); if (productName && productDescription) { //alert('button click - Talk To Us'); let label = (`${gaEventLabelPrefix} - card - ${productName} - ${productDescription} - Talk To Us`).toLowerCase(); let eventJourneyCTA = (`vworv-${productName}-talk`).toLowerCase(); gaEventTrigger('click', label, productName, eventJourneyCTA); } } } document.body.addEventListener('click', clickHandler) }, }; // Return if the test ran already! if (document.querySelector(`.${test.id}`)) return; // Polling conditions if ( document.querySelectorAll(".cmp-container .columnControl.aem-GridColumn").length > 4 && document.querySelectorAll('.leo-card .leo-icon svg[width="16px"]').length > 6 && document.querySelector(".promo-link.leo-col-4") ) { try { // Activate test setTimeout(test.init(), 1000) //test.init(); // Success log //console.log('Vertis Digital: MT-07: V: 1:12'); } catch (error) { // Error log console.log(`Initialization Error:`, error); } } else { Date.now() < timeInFuture ? setTimeout(loadVariation.bind({}, timeInFuture), 25) : console.log("loadVariation timed out!"); } })(Date.now() + 60000); // End variation JS return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {VWO._.vAEH(e);} })("HEAD")}}, C_722219_998_1_2_0:{ fn:function(){return (function(x) { try{ var _vwo_sel = vwo_$(""); !vwo_$("head").find("#1736837447668").length && vwo_$('head').append(_vwo_sel); // Start variation JS void (function loadVariation(timeInFuture) { // Main Test object const test = { // Some test specific global letiables id: "EXP-1-Home", // Test init init: function () { // Add a test specific classname to the body element document.body.classList.add(test.id); // Below function calls order is important test.mainJS(); }, // Main JS mainJS: function () { const cookieName = "quotationData"; const dataPopulationCookieName = "data-population-cookie"; // Function to get cookie function getCookie(cname) { const name = cname + "="; const decodedCookie = decodeURIComponent(document.cookie); const cookies = decodedCookie.split(';'); for (const cookie of cookies) { const c = cookie.trim(); if (c.indexOf(name) === 0) { return c.substring(name.length); } } return ""; } // Utility function to Function to set cookie function setCookie(cname, cvalue, exmin) { const d = new Date(); d.setTime(d.getTime() + (exmin * 60 * 1000)); const expires = `expires=${d.toUTCString()}`; document.cookie = `${cname}=${cvalue}; ${expires}; path=/; domain=.greateasternlife.com`; }; // function to trigger GA events function gaEventTrigger(eventAction, eventLabel, eventSubCategory = '', eventJourneyCTA = '') { dataLayer.push({ event: "vwoEvent", eventDetails: { category: "[vwo] floating banner - ab test - expose", action: eventAction, label: eventLabel }, ...(eventSubCategory ? { contentSubcategory: eventSubCategory } : {}), ...(eventJourneyCTA ? { journeyCta: eventJourneyCTA } : {}) }); }; const existingCookie = getCookie(cookieName); const productData = existingCookie ? JSON.parse(existingCookie) : {}; const productLinks = { 'GREAT Protector Active': 'https://buy-uat-greateasternlife.adobecqms.net/sg/en/personal-accident-insurance/200201/get-quotation.html' } let productName = productData?.productJourney; let productRedirect = productLinks[productData?.productJourney]; const crossIcon = ` Group 22 Copy 12`; const createBanner = (productName) => (`
`); // Retrieve banner view count from localStorage or default to 0 let bannerViewCount = parseInt(localStorage.getItem('bannerViewCount') || '0', 10); // Check session storage for the 'viewInSession' flag, defaulting to 'show' const viewInSession = sessionStorage.getItem('viewInSession') || 'show'; // Update session storage if not already set if (viewInSession === 'show') { sessionStorage.setItem('viewInSession', 'show'); // Increment and update banner view count in localStorage bannerViewCount += 1; localStorage.setItem('bannerViewCount', bannerViewCount); } if ( productData && productData.productJourney && location.pathname === '/sg/en/personal-insurance.html' && !document.querySelector('.product-purchase-banner-section') && bannerViewCount <= 2 && viewInSession !== 'dont show' ) { // insert the banner document.querySelector('main .cmp-container > .aem-Grid').insertAdjacentHTML('beforeend', createBanner(productName)); // trigger impression event let eventLabel = (`[vwo_ce_rtg] resume orion journey floating banner - ${productName}`).toLowerCase(); let eventSubCategory = productName.toLowerCase(); gaEventTrigger('impression', eventLabel, eventSubCategory); // set banner view count to session & local storage sessionStorage.setItem('viewInSession', 'seen'); // function for click events function clickHander(event) { const { target } = event; //console.log('target: ', target); if (target.closest('.banner-icon-section svg')) { document.querySelector('.product-purchase-banner-section').classList.add('hide-banner'); sessionStorage.setItem('viewInSession', 'dont show'); // trigger click event to Close CTA let eventLabel = (`[vwo_ce_rtg] resume orion journey floating banner - ${productName}`).toLowerCase(); let eventSubCategory = productName.toLowerCase(); gaEventTrigger('close', eventLabel, eventSubCategory); } if (target.closest('.banner-button.new-button') && productRedirect) { // trigger click event to CTA let eventLabel = (`[vwo_ce_rtg] resume orion journey floating banner - ${productName} - Resume my purchase`).toLowerCase(); let eventSubCategory = productName.toLowerCase(); let eventJourneyCTA = ("vworf-" + productName).toLowerCase(); gaEventTrigger('click', eventLabel, eventSubCategory, eventJourneyCTA); setCookie(dataPopulationCookieName, "true", 15); window.location.href = productRedirect; } } // Add event listener on click event. document.body.addEventListener('click', clickHander); } }, }; // Return if the test ran already! if (document.querySelector(`.${test.id}`)) return; // Polling conditions if (document.querySelector('main .cmp-container > .aem-Grid')) { try { // Activate test test.init(); // Success log console.log('Vertis Digital: Home: EXP-1: V: 1:11'); } catch (error) { // Error log console.log(`Initialization Error:`, error); } } else { Date.now() < timeInFuture ? setTimeout(loadVariation.bind({}, timeInFuture), 25) : console.log("loadVariation timed out!"); } })(Date.now() + 60000); // End variation JS return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {} })("HEAD")}}, C_722219_1005_1_2_1:{ fn:function(log,nonce=''){return (function(x) { try{ var _vwo_sel = vwo_$("`); !vwo_$("head").find('#1740052750814').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)} try{}catch(e) {console.error(e)} try{var value;console.log("value check started");const elementlist=document.getElementsByClassName("cmp-button__button--primary");var myFunction=function(){document.querySelectorAll(".cmp-text.mb-2.color-gray-dark").forEach(e=>{const t=e.querySelector("p.font-14");if(t&&t.textContent.includes("Plan type:")){let e=t.textContent.replace("Plan type:","").trim().replace("()","").trim();sendValue(value=e),console.log("value v1 check",value)}})};function sendValue(e){window.VWO=window.VWO||[],VWO.event=VWO.event||function(){VWO.push(["event"].concat([].slice.call(arguments)))},VWO.event("gtcPlanType",{gtcPlanType:e})}Array.from(elementlist).forEach((function(e){e.addEventListener("click",myFunction)}));}catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_722219_1005_1_2_0:{ fn:function(log,nonce=''){return (function(x) { try{ var _vwo_sel = vwo_$("`); !vwo_$("head").find('#1740052750811').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)} try{}catch(e) {console.error(e)} try{const plan=document.querySelector("#selectedPlan-Gold");plan.click(),console.log("plan selected");}catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, ct_50797db9f8236bc7d9dca0f411851f4f:{ fn:function(executeTrigger, vwo_$, config) { (function() { if (!config || typeof config !== "object") { return; } if (window.vwo_$(config.sel).length > 0) { return executeTrigger(); } window.VWO._.phoenixMT.once("vwo_mutObs." + config.triggerName, () => { if (window.vwo_$(config.sel).length > 0) { executeTrigger(); } }); })() } }, ct_cbb73702f57faed15ee0829091863373:{ fn:function(executeTrigger, vwo_$, config) { (function() { if (!config || typeof config !== "object") { return; } if (window.vwo_$(config.sel).length > 0) { return executeTrigger(); } window.VWO._.phoenixMT.once("vwo_mutObs." + config.triggerName, () => { if (window.vwo_$(config.sel).length > 0) { executeTrigger(); } }); })() } }, C_722219_1036_1_2_8:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".leo-row--gap-xs > div:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(5)"); vwo_debug*/(el=ctx).vwoCss({display:"none !important"});})(".leo-row--gap-xs > div:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(5)")}}, R_722219_1036_1_2_7:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","remove",".leo-row--gap-xs > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)"); vwo_debug*/(el=ctx).vwoRevertCss();})(".leo-row--gap-xs > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)")}}, C_722219_1036_1_2_7:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".leo-row--gap-xs > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)"); vwo_debug*/(el=ctx).vwoCss({display:"none !important"});})(".leo-row--gap-xs > div:nth-of-type(3) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(4)")}}, R_722219_1036_1_2_2:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","remove",".main > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(7)"); vwo_debug*/(el=ctx).vwoRevertCss();})(".main > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(7)")}}, C_722219_1036_1_2_2:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".main > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(7)"); vwo_debug*/(el=ctx).vwoCss({display:"none !important"});})(".main > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(7)")}}, R_722219_1036_1_2_1:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","remove",".leo-py-md"); vwo_debug*/(el=vwo_$(".leo-py-md")).vwoRevertCss();})("#geapp")}}, C_722219_1036_1_2_1:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("remove",".leo-py-md"); vwo_debug*/(el=vwo_$(".leo-py-md")).vwoCss({display:"none !important"});})("#geapp")}}, R_722219_1036_1_2_0:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","remove",".breadcrumb > ul:nth-of-type(1)"); vwo_debug*/(el=vwo_$(".breadcrumb > ul:nth-of-type(1)")).vwoRevertCss();})(".breadcrumb > ul:nth-of-type(1)")}}},rules:[{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.819"}],"triggers":["11789806","11789809","11789812"]},{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.997"}],"triggers":["10577314"]},{"tags":[{"data":{"type":"m","campaigns":[{"c":1036,"g":1}]},"id":"metric","metricId":423424},{"data":{"type":"m","campaigns":[{"c":997,"g":1}]},"id":"metric","metricId":423424},{"data":{"type":"m","campaigns":[{"c":1039,"g":1}]},"id":"metric","metricId":423424},{"data":{"type":"m","campaigns":[{"c":985,"g":4}]},"id":"metric","metricId":423424},{"data":{"type":"m","campaigns":[{"c":819,"g":1}]},"id":"metric","metricId":423424}],"triggers":["3546160"]},{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.1"}],"triggers":["2695522"]},{"tags":[{"data":{"type":"g","campaigns":[{"c":1028,"g":1}]},"id":"metric","metricId":0}],"triggers":["11653180"]},{"tags":[{"data":{"type":"g","campaigns":[{"c":1028,"g":4}]},"id":"metric","metricId":0}],"triggers":["11653183"]},{"tags":[{"data":{"type":"g","campaigns":[{"c":1028,"g":6}]},"id":"metric","metricId":0}],"triggers":["11653186"]},{"tags":[{"data":{"type":"g","campaigns":[{"c":1028,"g":8}]},"id":"metric","metricId":0}],"triggers":["11653189"]},{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.1036"}],"triggers":["11789830","11789836","11789839"]},{"tags":[{"data":{"type":"g","campaigns":[{"c":653,"g":3}]},"id":"metric","metricId":0}],"triggers":["3487735"]},{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.1039"}],"triggers":["11787625","11787628","11789761"]},{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.1028"}],"triggers":["5291080","11537446"]},{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.998"}],"triggers":["10320859"]},{"tags":[{"data":{"type":"g","campaigns":[{"c":1027,"g":1}]},"id":"metric","metricId":0}],"triggers":["11649010"]},{"tags":[{"data":{"type":"g","campaigns":[{"c":1027,"g":4}]},"id":"metric","metricId":0}],"triggers":["11649013"]},{"tags":[{"data":{"type":"m","campaigns":[{"c":1027,"g":5}]},"id":"metric","metricId":1242532}],"triggers":["11537467"]},{"tags":[{"data":{"type":"m","campaigns":[{"c":980,"g":16}]},"id":"metric","metricId":1032369}],"triggers":["9125625"]},{"tags":[{"data":{"type":"m","campaigns":[{"c":980,"g":17}]},"id":"metric","metricId":1032258}],"triggers":["9125532"]},{"tags":[{"data":{"type":"m","campaigns":[{"c":980,"g":18}]},"id":"metric","metricId":1189237}],"triggers":["10641040"]},{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.2"}],"triggers":["2695525"]},{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.1005"},{"priority":4,"id":"runCampaign","data":"campaigns.1027"},{"priority":4,"id":"runCampaign","data":"campaigns.980"},{"priority":4,"id":"runCampaign","data":"campaigns.736"}],"triggers":["5291080"]},{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.985"}],"triggers":["10244176"]},{"tags":[{"data":{"type":"m","campaigns":[{"c":998,"g":2}]},"id":"metric","metricId":466127},{"data":{"type":"m","campaigns":[{"c":980,"g":13}]},"id":"metric","metricId":466127},{"data":{"type":"m","campaigns":[{"c":759,"g":2}]},"id":"metric","metricId":466127},{"data":{"type":"m","campaigns":[{"c":1023,"g":2}]},"id":"metric","metricId":466127},{"data":{"type":"m","campaigns":[{"c":736,"g":2}]},"id":"metric","metricId":466127}],"triggers":["4496841"]},{"tags":[{"data":{"type":"m","campaigns":[{"c":998,"g":3}]},"id":"metric","metricId":466124},{"data":{"type":"m","campaigns":[{"c":980,"g":12}]},"id":"metric","metricId":466124},{"data":{"type":"m","campaigns":[{"c":759,"g":1}]},"id":"metric","metricId":466124},{"data":{"type":"m","campaigns":[{"c":1023,"g":1}]},"id":"metric","metricId":466124},{"data":{"type":"m","campaigns":[{"c":736,"g":1}]},"id":"metric","metricId":466124}],"triggers":["4496838"]},{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.1023"}],"triggers":["11780143","11780146"]},{"tags":[{"data":{"type":"m","campaigns":[{"c":980,"g":14}]},"id":"metric","metricId":1184620}],"triggers":["10583434"]},{"tags":[{"data":{"type":"m","campaigns":[{"c":1005,"g":3}]},"id":"metric","metricId":1263805}],"triggers":["11534305"]},{"tags":[{"data":{"type":"m","campaigns":[{"c":1005,"g":1}]},"id":"metric","metricId":1202800}],"triggers":["10841803"]},{"tags":[{"data":{"type":"m","campaigns":[{"c":1005,"g":2}]},"id":"metric","metricId":1263802}],"triggers":["11534302"]},{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.759"}],"triggers":["9850753"]},{"tags":[{"data":{"type":"m","campaigns":[{"c":980,"g":15}]},"id":"metric","metricId":1188703}],"triggers":["10635910"]},{"tags":[{"data":{"type":"g","campaigns":[{"c":998,"g":4}]},"id":"metric","metricId":0}],"triggers":["10577338"]},{"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.653"}],"triggers":["3487732"]},{"tags":[{"data":{"type":"g","campaigns":[{"c":1027,"g":6}]},"id":"metric","metricId":0}],"triggers":["11649016"]},{"tags":[{"id":"visibilityService","priority":2}],"triggers":["9"]},{"tags":[{"id":"runTestCampaign"}],"triggers":["2"]},{"tags":[{"id":"urlChange"}],"triggers":["75"]},{"tags":[{"id":"checkEnvironment"}],"triggers":["5"]},{"tags":[{"id":"prePostMutation","priority":3},{"id":"groupCampaigns","priority":2}],"triggers":["8"]}],pages:{"ec":[{"560865":{"inc":["o",["url","urlReg","(?i).*"]]}}]},pagesEval:{"ec":[560865]}}})(); ;;var commonWrapper=function(argument){if(!argument){argument={valuesGetter:function(){return{}},valuesSetter:function(){},verifyData:function(){return{}}}}const getVisitorUuid=function(){if(window._vwo_acc_id>=1037725){return window.VWO&&window.VWO.get("visitor.id")}else{return window.VWO._&&window.VWO._.cookies&&window.VWO._.cookies.get("_vwo_uuid")}};var pollInterval=100;var timeout=6e4;return function(){var accountIntegrationSettings={};var _interval=null;function waitForAnalyticsVariables(){try{accountIntegrationSettings=argument.valuesGetter();accountIntegrationSettings.visitorUuid=getVisitorUuid()}catch(error){accountIntegrationSettings=undefined}if(accountIntegrationSettings&&argument.verifyData(accountIntegrationSettings)){argument.valuesSetter(accountIntegrationSettings);return 1}return 0}var currentTime=0;_interval=setInterval((function(){currentTime=currentTime||performance.now();var result=waitForAnalyticsVariables();if(result||performance.now()-currentTime>=timeout){clearInterval(_interval)}}),pollInterval)}}; commonWrapper({valuesGetter:function(){return {"ga4s":0}},valuesSetter:function(data){var singleCall=data["ga4s"]||0;if(singleCall){window.sessionStorage.setItem("vwo-ga4-singlecall",true)}var ga4_device_id="";if(typeof window.VWO._.cookies!=="undefined"){ga4_device_id=window.VWO._.cookies.get("_ga")||""}if(ga4_device_id){window.vwo_ga4_uuid=ga4_device_id.split(".").slice(-2).join(".")}},verifyData:function(data){if(typeof window.VWO._.cookies!=="undefined"){return window.VWO._.cookies.get("_ga")||""}else{return false}}})(); var pushBasedCommonWrapper=function(argument){var firedCamp={};if(!argument){argument={integrationName:"",getExperimentList:function(){},accountSettings:function(){},pushData:function(){}}}return function(){window.VWO=window.VWO||[];const getVisitorUuid=function(){if(window._vwo_acc_id>=1037725){return window.VWO&&window.VWO.get("visitor.id")}else{return window.VWO._&&window.VWO._.cookies&&window.VWO._.cookies.get("_vwo_uuid")}};var sendDebugLogsOld=function(expId,variationId,errorType,user_type,data){try{var errorPayload={f:argument["integrationName"]||"",a:window._vwo_acc_id,url:window.location.href,exp:expId,v:variationId,vwo_uuid:getVisitorUuid(),user_type:user_type};if(errorType=="initIntegrationCallback"){errorPayload["log_type"]="initIntegrationCallback";errorPayload["data"]=JSON.stringify(data||"")}else if(errorType=="timeout"){errorPayload["timeout"]=true}if(window.VWO._.customError){window.VWO._.customError({msg:"integration debug",url:window.location.href,lineno:"",colno:"",source:JSON.stringify(errorPayload)})}}catch(e){window.VWO._.customError&&window.VWO._.customError({msg:"integration debug failed",url:"",lineno:"",colno:"",source:""})}};var sendDebugLogs=function(expId,variationId,errorType,user_type){var eventName="vwo_debugLogs";var eventPayload={};try{eventPayload={intName:argument["integrationName"]||"",varId:variationId,expId:expId,type:errorType,vwo_uuid:getVisitorUuid(),user_type:user_type};if(window.VWO._.event){window.VWO._.event(eventName,eventPayload,{enableLogs:1})}}catch(e){eventPayload={msg:"integration event log failed",url:window.location.href};window.VWO._.event&&window.VWO._.event(eventName,eventPayload)}};const callbackFn=function(data){if(!data)return;var expId=data[1],variationId=data[2],repeated=data[0],singleCall=0,debug=0;var experimentList=argument.getExperimentList();var integrationName=argument["integrationName"]||"vwo";if(typeof argument.accountSettings==="function"){var accountSettings=argument.accountSettings();if(accountSettings){singleCall=accountSettings["singleCall"];debug=accountSettings["debug"]}}if(debug){sendDebugLogs(expId,variationId,"intCallTriggered",repeated)}if(singleCall&&(repeated==="vS"||repeated==="vSS")||firedCamp[expId]){return}window.expList=window.expList||{};var expList=window.expList[integrationName]=window.expList[integrationName]||[];if(expId&&variationId&&["VISUAL_AB","VISUAL","SPLIT_URL"].indexOf(_vwo_exp[expId].type)>-1){if(experimentList.indexOf(+expId)!==-1){firedCamp[expId]=variationId;var visitorUuid=getVisitorUuid();var pollInterval=100;var currentTime=0;var timeout=6e4;var user_type=_vwo_exp[expId].exec?"vwo-retry":"vwo-new";var interval=setInterval((function(){if(expList.indexOf(expId)!==-1){clearInterval(interval);return}currentTime=currentTime||performance.now();var toClearInterval=argument.pushData(expId,variationId,visitorUuid);if(debug&&toClearInterval){sendDebugLogsOld(expId,variationId,"",user_type);sendDebugLogs(expId,variationId,"intDataPushed",user_type)}var isTimeout=performance.now()-currentTime>=timeout;if(isTimeout&&debug){sendDebugLogsOld(expId,variationId,"timeout",user_type);sendDebugLogs(expId,variationId,"intTimeout",user_type)}if(toClearInterval||isTimeout){clearInterval(interval)}if(toClearInterval){window.expList[integrationName].push(expId)}}),pollInterval||100)}}};window.VWO.push(["onVariationApplied",callbackFn]);window.VWO.push(["onVariationShownSent",callbackFn])}}; var surveyDataCommonWrapper=function(argument){if(!argument){argument={getCampaignList:function(){return[]},surveyStatusChange:function(){},answerSubmitted:function(){}}}return function(){window.VWO=window.VWO||[];function getValuesFromAnswers(answers){var values=[];for(var i=0;i=timeout;if(toClearInterval||isTimeout){clearInterval(interval)}}),pollInterval)}}window.VWO.push(["onSurveyShown",function(data){commonSurveyCallback(data,argument.surveyStatusChange,"surveyShown")}]);window.VWO.push(["onSurveyCompleted",function(data){commonSurveyCallback(data,argument.surveyStatusChange,"surveyCompleted")}]);window.VWO.push(["onSurveyAnswerSubmitted",function(data){commonSurveyCallback(data,argument.answerSubmitted,"surveySubmitted")}])}}; (function(){var VWOOmniTemp={};window.VWOOmni=window.VWOOmni||{};for(var key in VWOOmniTemp)Object.prototype.hasOwnProperty.call(VWOOmniTemp,key)&&(window.VWOOmni[key]=VWOOmniTemp[key]);window._vwoIntegrationsLoaded=1;pushBasedCommonWrapper({integrationName:"GA4",getExperimentList:function(){return [736,759,980,985,1023,997,998,1005,1027,1028,1039]},accountSettings:function(){var accountIntegrationSettings={"manualSetup":false,"dataVariable":"","setupVia":""};if(accountIntegrationSettings["debugType"]=="ga4"&&accountIntegrationSettings["debug"]){accountIntegrationSettings["debug"]=1}else{accountIntegrationSettings["debug"]=0}return accountIntegrationSettings},pushData:function(expId,variationId){var accountIntegrationSettings={"manualSetup":false,"dataVariable":"","setupVia":""};var ga4Setup=accountIntegrationSettings["setupVia"]||"gtag";if(typeof window.gtag!=="undefined"&&ga4Setup=="gtag"){window.gtag("event","VWO",{vwo_campaign_name:window._vwo_exp[expId].name+":"+expId,vwo_variation_name:window._vwo_exp[expId].comb_n[variationId]+":"+variationId});window.gtag("event","experience_impression",{exp_variant_string:"VWO-"+expId+"-"+variationId});return true}return false}})();pushBasedCommonWrapper({integrationName:"GA4-GTM",getExperimentList:function(){return [736,759,980,985,1023,997,998,1005,1027,1028,1039]},accountSettings:function(){var accountIntegrationSettings={"manualSetup":false,"dataVariable":"","setupVia":""};if(accountIntegrationSettings["debugType"]=="gtm"&&accountIntegrationSettings["debug"]){accountIntegrationSettings["debug"]=1}else{accountIntegrationSettings["debug"]=0}return accountIntegrationSettings},pushData:function(expId,variationId){var accountIntegrationSettings={"manualSetup":false,"dataVariable":"","setupVia":""};var ga4Setup=accountIntegrationSettings["setupVia"]||"gtm";var dataVariable=accountIntegrationSettings["dataVariable"]||"dataLayer";if(typeof window[dataVariable]!=="undefined"&&ga4Setup=="gtm"){window[dataVariable].push({event:"vwo-data-push-ga4",vwo_exp_variant_string:"VWO-"+expId+"-"+variationId});return true}return false}})(); ;})();(function(){window.VWO=window.VWO||[];var pollInterval=100;var _vis_data={};var intervalObj={};var analyticsTimerObj={};var experimentListObj={};window.VWO.push(["onVariationApplied",function(data){if(!data){return}var expId=data[1],variationId=data[2];if(expId&&variationId&&["VISUAL_AB","VISUAL","SPLIT_URL"].indexOf(window._vwo_exp[expId].type)>-1){}}])})();; ;var vD=VWO.data||{};VWO.data={content:{"fns":{"list":{"args":{"1":{"6625f8d396bba":"1720140365","6678ed3f31d18":"1733984498","66875a9973fa4":"1727406621","6678ed65bfb87":"1733984498"}},"vn":1}}},as:"r6.visualwebsiteoptimizer.com",dacdnUrl:"https://dev.visualwebsiteoptimizer.com",accountJSInfo:{"noSS":false,"ts":1740907908,"mrp":20,"pvn":0,"url":{},"gC":[{"t":1,"id":1,"wt":{"909":99.999998},"c":[909],"et":2},{"t":1,"id":5,"wt":{"899":50,"901":50},"c":[901,899],"et":2}],"pc":{"a":100,"t":100},"rp":90}};for(var k in vD){VWO.data[k]=vD[k]};;var gcpfb=function(a,loadFunc,status,err,success){function vwoErr() {_vwo_err({message:"Google_Cdn failing for " + a + ". Trying Fallback..",code:"cloudcdnerr",status:status});} if(a.indexOf("/cdn/")!==-1){loadFunc(a.replace("cdn/",""),err,success); vwoErr(); return true;} else if(a.indexOf("/dcdn/")!==-1&&a.indexOf("evad.js") !== -1){loadFunc(a.replace("dcdn/",""),err,success); vwoErr(); return true;}};window.VWO=window.VWO || [];window.VWO._= window.VWO._ || {};window.VWO._.gcpfb=gcpfb;;var d={cookie:document.cookie,URL:document.URL,referrer:document.referrer};var w={VWO:{_:{}},location:{href:window.location.href,search:window.location.search},_vwoCc:window._vwoCc};;window._vwo_cdn="https://dev.visualwebsiteoptimizer.com/cdn/";window._vwo_apm_debug_cdn="https://dev.visualwebsiteoptimizer.com/cdn/";window.VWO._.useCdn=true;window.vwo_eT="br";window._VWO=window._VWO||{};window._VWO.fSeg=["866"];window._VWO.dcdnUrl="/dcdn/settings.js";window.VWO.sTs=1740796022;window._VWO._vis_nc_lib=window._vwo_cdn+"edrv/nc-d6ff1022487af1829902efe655b28300br.js";var loadWorker=function(url){_vwo_code.load(url,{dSC: true, onloadCb: function(xhr,a){window._vwo_wt_l=true;if(xhr.status===200 ||xhr.status===304){var code="var window="+JSON.stringify(w)+",document="+JSON.stringify(d)+";window.document=document;"+xhr.responseText;var blob=new Blob([code||"throw new Error('code not found!');"],{type:"application/javascript"}),url=URL.createObjectURL(blob);window.mainThread={webWorker:new Worker(url)};window.vwoChannelFW=new MessageChannel();window.vwoChannelToW=new MessageChannel();window.mainThread.webWorker.postMessage({vwoChannelToW:vwoChannelToW.port1,vwoChannelFW:vwoChannelFW.port2},[vwoChannelToW.port1, vwoChannelFW.port2]);if(!window._vwo_mt_f)return window._vwo_wt_f=true;_vwo_code.addScript({text:window._vwo_mt_f});delete window._vwo_mt_f}else{if(gcpfb(a,loadWorker,xhr.status)){return;}_vwo_code.finish("&e=loading_failure:"+a)}}, onerrorCb: function(a){if(gcpfb(a,loadWorker)){return;}window._vwo_wt_l=true;_vwo_code.finish("&e=loading_failure:"+a);}})};loadWorker("https://dev.visualwebsiteoptimizer.com/cdn/edrv/worker-a0061b8ba28231c30f6d5a9df191b6e3br.js");;var _vis_opt_file;var _vis_opt_lib;if(window.VWO._.allSettings.dataStore.previewExtraSettings!=undefined&&window.VWO._.allSettings.dataStore.previewExtraSettings.isSurveyPreviewMode){var surveyHash=window.VWO._.allSettings.dataStore.plugins.LIBINFO.SURVEY_DEBUG_EVENTS.HASH;var param1="evad.js?va=";var param2="&d=debugger_new";var param3="&sp=1&a=722219&sh="+surveyHash;_vis_opt_file=vwoCode.use_existing_jquery&&typeof vwoCode.use_existing_jquery()!=="undefined"?vwoCode.use_existing_jquery()?param1+"vanj"+param2:param1+"va_gq"+param2:param1+"edrv/va_gq-82ae5b5a18f7d1856a3029ff9c6d26b6br.js"+param2;_vis_opt_file=_vis_opt_file+param3;_vis_opt_lib="https://dev.visualwebsiteoptimizer.com/dcdn/"+_vis_opt_file}else if(window.VWO._.allSettings.dataStore.mode!=undefined&&window.VWO._.allSettings.dataStore.mode=="PREVIEW"){ var path1 = 'edrv/pd_'; var path2 = window.VWO._.allSettings.dataStore.plugins.LIBINFO.EVAD.HASH + ".js"; ;_vis_opt_file=vwoCode.use_existing_jquery&&typeof vwoCode.use_existing_jquery()!=="undefined"?vwoCode.use_existing_jquery()?path1+"vanj"+path2:path1+"va_gq"+path2:path1+"edrv/va_gq-82ae5b5a18f7d1856a3029ff9c6d26b6br.js"+path2;_vis_opt_lib="https://dev.visualwebsiteoptimizer.com/cdn/"+_vis_opt_file}else{_vis_opt_file=vwoCode.use_existing_jquery&&typeof vwoCode.use_existing_jquery()!=="undefined"?vwoCode.use_existing_jquery()?"edrv/vanj-192f82910e37422099f379771c3fbfdfbr.js":"edrv/va_gq-82ae5b5a18f7d1856a3029ff9c6d26b6br.js":"edrv/va_gq-82ae5b5a18f7d1856a3029ff9c6d26b6br.js"}window._vwo_library_timer=setTimeout((function(){vwoCode.removeLoaderAndOverlay&&vwoCode.removeLoaderAndOverlay();vwoCode.finish()}),vwoCode.library_tolerance&&typeof vwoCode.library_tolerance()!=="undefined"?vwoCode.library_tolerance():2500),_vis_opt_lib=typeof _vis_opt_lib=="undefined"?window._vwo_cdn+_vis_opt_file:_vis_opt_lib;var loadLib=function(url){_vwo_code.load(url, {dSC: true, onloadCb:function(xhr,a){window._vwo_mt_l=true;if(xhr.status===200 || xhr.status===304){if(!window._vwo_wt_f)return window._vwo_mt_f=xhr.responseText;_vwo_code.addScript({text:xhr.responseText});delete window._vwo_wt_f;}else{if(gcpfb(a,loadLib,xhr.status)){return;}_vwo_code.finish("&e=loading_failure:"+a);}}, onerrorCb: function(a){if(gcpfb(a,loadLib)){return;}window._vwo_mt_l=true;_vwo_code.finish("&e=loading_failure:"+a);}})};loadLib(_vis_opt_lib);VWO.load_co=function(u,opts){return window._vwo_code.load(u,opts);};;;}}catch(e){_vwo_code.finish();_vwo_code.removeLoaderAndOverlay&&_vwo_code.removeLoaderAndOverlay();_vwo_err(e);window.VWO.caE=1}})();

Be wary of phishing scams. Please visit our Security Advisory page for more information.