");vwo_$('head').append(_vwo_sel);return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("HEAD")}}, C_722219_1028_1_2_0:{ fn:function(){return (function(x) { try{
var _vwo_sel = vwo_$("");
!vwo_$("head").find("#1739332828552").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-10",
// 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 () {
/* ---- LOGO ---- */
const quizLogo = `
`;
const crossIcon = `
`;
const newCrossIcon = `
`;
/* ---- DATA ---- */
// quiz data
const collections = [
{
quizName: "Healthy heart, Happy life - Quiz 1",
quizNumber: "quiz 1",
className: "healthy-heart-quiz-one",
image: "https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-1.jpg",
coverImage: "https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-1.jpg",
url: "https://www.greateasternlife.com/sg/en/personal-insurance/lifepedia/healthy-heart-happy-life/heart-health-and-you-quiz-1.html",
header: "Healthy heart, Happy life - Quiz 1",
quizDate: "Jan 06, 2025",
promoCopy: "Answer 3 simple questions and win an exclusive prize from Eu Yan Sang worth $15!",
questionOne: [
"1. One should see a ____________ if he/she is experiencing chest pain and shortness of breath as it could be a possible sign of heart disease and heart failure.",
["Cardiologist", "Dentist", "Gastroenterologist"]
],
questionTwo: [
"2. These chronic conditions – diabetes, high blood pressure, and high ___________ (also known as the “Three Highs”), are usually asymptomatic and may be unnoticed. It has been observed that patients are also developing these conditions at an increasingly earlier age.",
["Blood count", "Cholesterol", "Fever"]
]
},
{
quizName: "Healthy heart, Happy life - Quiz 2",
quizNumber: "quiz 2",
className: "healthy-heart-quiz-two",
image: "https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-2.jpg",
coverImage: "https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-2-thumbnail.jpg",
url: "https://www.greateasternlife.com/sg/en/personal-insurance/lifepedia/healthy-heart-happy-life/huat-the-heart-wants-quiz-2.html",
header: "Healthy heart, Happy life - Quiz 2",
quizDate: "Jan 20, 2025",
promoCopy: "Answer 3 simple questions and win an exclusive prize from Fitness First worth $60!",
questionOne: [
"1. Even though pineapple tarts are everywhere for the festive season, I should limit my intake to ____ pieces because it is equivalent to 7 teaspoons of sugar, which is within our recommended daily intake of 10 teaspoons.",
["2", "4", "6"]
],
questionTwo: [
"2. Nian gao, nian gao, in the box… which is the most calorie-loaded of them all?",
["Steamed", "Fried"]
]
},
];
// quiz image links
const imageUrls = [
"https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-1.jpg",
"https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-2.jpg",
"https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-2-thumbnail.jpg"
];
// array of quiz pages
const quizPages = [
'/sg/en/personal-insurance/lifepedia/healthy-heart-happy-life/heart-health-and-you-quiz-1.html',
'/sg/en/personal-insurance/lifepedia/healthy-heart-happy-life/huat-the-heart-wants-quiz-2.html',
];
// array of pages to show quiz logo
const variationPages = [
'/sg/en/personal-insurance.html'
];
/* ---- Utility Functions ---- */
// // image preload function
function preloadImages(imageUrls) {
imageUrls.forEach(url => {
const img = new Image();
img.src = url;
});
}
// function to validate and process quiz data
function validationAndProcessQuizData(quizUrl, quizNumber) {
// Cache form elements
const formSection = document.querySelector('.form-section');
const questionOneInput = document.querySelectorAll('.form-group-one .radio-item input:checked')[0];
const questionTwoInput = document.querySelectorAll('.form-group-two .radio-item input:checked')[0];
// Validation: Check if questions are answered
const isEmpty = !(questionOneInput?.value) || !(questionTwoInput?.value.trim());
const existingError = formSection.querySelector('.error-copy');
const errorHtml = `
Please complete the questions.
`
if (isEmpty) {
// Add error message if it doesn't exist
if (!existingError) {
formSection.insertAdjacentHTML('beforeend', errorHtml);
formSection.classList.add('form-error');
return; // Exit the function
}
return;
}
// Remove error if validation passes
if (existingError) {
existingError.remove();
}
formSection.classList.remove('form-error');
// Prepare quiz data
const quizData = [
quizUrl.trim(),
questionOneInput.value.trim(),
questionTwoInput.value.trim(),
];
// Store the data in session storage
sessionStorage.setItem('quizData', JSON.stringify(quizData));
// step 3 - continue CTA click
let quizName = quizNumber.toLowerCase();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 3 - continue - ${quizName}`;
let eventJourneyCTA = `vworq-hh-3-${quizName}`;
gaEventTrigger('click', eventLabel, eventJourneyCTA);
// Redirect to the quiz URL
window.location.href = quizUrl;
}
// function to trigger GA events
function gaEventTrigger(eventAction, eventLabel, eventJourneyCTA = '') {
dataLayer.push({
event: "vwoEvent",
eventDetails: {
category: "[vwo] sticky icon",
action: eventAction,
label: eventLabel
},
contentSubcategory: "healthy heart quiz",
...(eventJourneyCTA ? { journeyCta: eventJourneyCTA } : {})
});
};
// fuction to detect touch device
const isTouchDevice = () => {
return (
'ontouchstart' in window || // Check for touch events
navigator.maxTouchPoints > 0 || // Check for touch points
navigator.msMaxTouchPoints > 0 // Microsoft-specific touch points
);
};
/* ---- HTML Templates Markup and Functions ---- */
// create Quiz cards markup
const createQuizCard = (className, coverImage, header, quizDate) => {
return (`
`;
// function to create inner content for modal level two
let modalTwoInnerContent = (className, title, promoCopy) => (`
${title}
${promoCopy}
Start now
`);
//function to generate radio buttons
function generateRadioButtons(options, groupName) {
// Helper function to generate a single radio item
const createRadioItem = (option, index) => {
const id = `${groupName}-option-${index + 1}`; // Unique ID for each option
return `
`;
};
// Generate all radio items
const radioItems = options.map((option, index) => createRadioItem(option, index)).join("");
// Wrap the radio items in the section structure
return `
${radioItems}
`;
}
// function to create inner content for modal level two
let modalThreeInnerContent = (className, questionOne, questionTwo) => (`
`);
// function to create markup for modals on level two and three
let quizModalfn = (className, quizName, image, modalInnerHtml, modalClassNameOne, modalClassNametwo) => (`
${quizCrossButton}
${quizCrossButton}
${modalInnerHtml}
`);
// markup for quiz modal level one
let quizModalLV1 = `
${quizCrossButton}
Take our simple quizzes and win instant rewards today!
Take part in our simple quizzes and win instant rewards today!
${QuizCards}
`;
// function to create the initial modal markup
let modalMarkup = () => (`
`;
// function to create inner content for modal level two
let modalTwoInnerContent = (className, title, promoCopy) => (`
${title}
${promoCopy}
Start now
`);
//function to generate radio buttons
function generateRadioButtons(options, groupName) {
// Helper function to generate a single radio item
const createRadioItem = (option, index) => {
const id = `${groupName}-option-${index + 1}`; // Unique ID for each option
return `
`;
};
// Generate all radio items
const radioItems = options.map((option, index) => createRadioItem(option, index)).join("");
// Wrap the radio items in the section structure
return `
${radioItems}
`;
}
// function to create inner content for modal level two
let modalThreeInnerContent = (className, questionOne, questionTwo) => (`
`);
// function to create markup for modals on level two and three
let quizModalfn = (className, quizName, image, modalInnerHtml, modalClassNameOne, modalClassNametwo) => (`
${quizCrossButton}
${quizCrossButton}
${modalInnerHtml}
`);
// markup for quiz modal level one
let quizModalLV1 = `
${quizCrossButton}
Take our simple quizzes and win instant rewards today!
Take part in our simple quizzes and win instant rewards today!
${QuizCards}
`;
// function to create the initial modal markup
let modalMarkup = () => (`
${quizModalLV1}
`);
/* ---- DOM Manipulation ---- */
// current url path
const currentPath = window.location.pathname;
// Dom manipulation for quiz variation
if (variationPages.includes(currentPath)) {
// preload images
preloadImages(imageUrls);
// insert quiz icon
if (document.querySelector('.quiz-icon-container')) return;
document.querySelector('main.container .cmp-container > .aem-Grid').insertAdjacentHTML('beforeend', quizIconHtml);
let eventLabel = '[vwo_ce_rtg] rewards quiz - healthy heart - win prizes - animated';
gaEventTrigger('impression', eventLabel);
// insert modal markup
document.querySelectorAll('main.container .cmp-container > .aem-Grid')[0].insertAdjacentHTML('beforeend', modalMarkup())
// click handler function for variation pages
function clickHandler(event) {
const { target } = event;
//console.log('target: ', target);
// Utility: Toggle modal visibility
const toggleModal = (selector, addClass, removeClass) => {
const modal = document.querySelector(selector);
if (modal) {
if (addClass !== null) modal.classList.add(addClass);
if (removeClass !== null) modal.classList.remove(removeClass);
}
};
// Utility: Map class names to modal numbers
const getModalNum = () => {
if (target.closest('.healthy-heart-quiz-one')) return 0;
if (target.closest('.healthy-heart-quiz-two')) return 1;
if (target.closest('.word-search-edition-three')) return 2;
return null; // Default if no match found
};
// Utility: Clear form errors
const clearFormErrors = () => {
document.querySelector('.form-section .error-copy')?.remove();
document.querySelector('.form-section.form-error')?.classList.remove('form-error');
};
// Handle: Quiz icon click (open modal)
if (target.closest('.quiz-icon-container .quiz-icon')) {
toggleModal('.quiz-modal-container', 'modal--visible', 'modal--hidden');
// click on quiz icon
let eventLabel = '[vwo_ce_rtg] rewards quiz - healthy heart - win prizes - animated';
let eventJourneyCTA = 'vworq-hh-win prizes-animated';
gaEventTrigger('click', eventLabel, eventJourneyCTA);
}
// Handle: Quiz cross icon click (cross icon)
if (target.closest('.quiz-icon-container .cross-icon')) {
document.querySelector('.quiz-icon-container').classList.add('hide-quiz-icon');
// hide quiz icon
let eventLabel = '[vwo_ce_rtg] rewards quiz - healthy heart - win prizes - animated';
gaEventTrigger('close', eventLabel);
return;
}
// Handle: Close modal
if (
target.closest('.modal-cross-button .cross-icon') ||
target.classList.contains('modal--visible')
) {
// step 1 modal - close
if (target.closest('.quiz-modal-content.quiz-level-one .modal-cross-button .cross-icon')) {
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 1 - select quiz - animated`;
gaEventTrigger('close', eventLabel);
}
// step 2 modal - close
if (target.closest('.quiz-modal-content.quiz-level-two .modal-cross-button .cross-icon')) {
//let quizName = document.querySelector('.quiz-modal.quiz-modal-two')?.getAttribute('quiz-name')?.toLowerCase();
let quizName = document.querySelector('.quiz-modal.quiz-modal-two')?.getAttribute('quiz-name').split('-')[1].toLowerCase().trim();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 2 - start now - ${quizName} - animated`;
gaEventTrigger('close', eventLabel);
}
// step 3 - close
if (target.closest('.quiz-modal-content.quiz-level-three .modal-cross-button .cross-icon')) {
//let quizName = document.querySelector('.quiz-modal.quiz-modal-three')?.getAttribute('quiz-name')?.toLowerCase();
let quizName = document.querySelector('.quiz-modal.quiz-modal-three')?.getAttribute('quiz-name').split('-')[1].toLowerCase().trim();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 3 - continue - ${quizName} - animated`;
gaEventTrigger('close', eventLabel);
}
toggleModal('.quiz-modal-container', 'modal--hidden', 'modal--visible');
document.querySelectorAll('.quiz-modal.quiz-modal-three, .quiz-modal.quiz-modal-two').forEach(modal => modal.remove());
toggleModal('.quiz-modal.quiz-modal-one', null, 'hide-modal'); // Unhide modal one
return;
}
// Handle: Click on modal cards
if (target.closest('.quiz-modal-one .quiz-card')) {
const modalNum = getModalNum();
if (modalNum !== null) {
const { quizName, quizNumber, className, image, promoCopy, details } = collections[modalNum];
const modalTwoInnerHtml = modalTwoInnerContent(className, quizName, promoCopy, details);
const modalTwoMarkup = quizModalfn(className, quizName, image, modalTwoInnerHtml, 'quiz-modal-two', 'quiz-level-two');
document.querySelector('.quiz-modal.quiz-modal-one').insertAdjacentHTML('afterend', modalTwoMarkup);
toggleModal('.quiz-modal.quiz-modal-one', 'hide-modal', null);
// step 1 - popup card click
let quizTitle = quizNumber.toLowerCase();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 1 - select quiz - ${quizTitle} - animated`;
let eventJourneyCTA = `vworq-hh-1-${quizTitle}-animated`;
gaEventTrigger('click', eventLabel, eventJourneyCTA);
}
return;
}
// Handle: Click on quiz start button in modal two
if (target.closest('.quiz-modal.quiz-modal-two .quiz-button')) {
const questionModalNum = getModalNum();
if (questionModalNum !== null) {
const { quizName, quizNumber, className, image, questionOne, questionTwo } = collections[questionModalNum];
const modalThreeInnerHtml = modalThreeInnerContent(className, questionOne, questionTwo);
const modalThreeMarkup = quizModalfn(className, quizName, image, modalThreeInnerHtml, 'quiz-modal-three', 'quiz-level-three');
document.querySelector('.quiz-modal.quiz-modal-one').insertAdjacentHTML('afterend', modalThreeMarkup);
toggleModal('.quiz-modal.quiz-modal-two', 'hide-modal', null);
// step 2 - start now CTA click
let quizTitle = quizNumber.toLowerCase();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 2 - start now - ${quizTitle} - animated`;
let eventJourneyCTA = `vworq-hh-2-${quizTitle}-animated`;
gaEventTrigger('click', eventLabel, eventJourneyCTA);
}
return;
}
// Handle: Click on quiz button in modal three (final action)
if (target.closest('.quiz-modal.quiz-modal-three .quiz-button')) {
const questionModalNum = getModalNum();
if (questionModalNum !== null) {
const { url, quizNumber } = collections[questionModalNum];
// Validate input and process quiz data
validationAndProcessQuizData(url, quizNumber);
}
return;
}
// Handle: Input focus (clear errors)
if (target.closest('input#form-quiestion-one') || target.closest('input#form-quiestion-two')) {
clearFormErrors();
return;
}
}
// Attach click handler to the document
document.body.addEventListener('click', clickHandler);
function touchStartEventHandler(event) {
const { target } = event;
//console.log('target touch: ', target);
// Utility: Toggle modal visibility
const toggleModal = (selector, addClass, removeClass) => {
const modal = document.querySelector(selector);
if (modal) {
modal.classList.add(addClass);
modal.classList.remove(removeClass);
}
};
// Handle: Close modal
if (
target.closest('.modal-cross-button .cross-icon') ||
target.classList.contains('modal--visible')
) {
// step 1 - close
if (target.closest('.quiz-modal-content.quiz-level-one .modal-cross-button .cross-icon')) {
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 1 - select quiz - animated`;
gaEventTrigger('close', eventLabel);
}
// step 2 - close
if (target.closest('.quiz-modal-content.quiz-level-two .modal-cross-button .cross-icon')) {
let quizName = document.querySelector('.quiz-modal.quiz-modal-two')?.getAttribute('quiz-name').split('-')[1].toLowerCase().trim();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 2 - start now - ${quizName} - animated`;
gaEventTrigger('close', eventLabel);
}
// step 3 - close
if (target.closest('.quiz-modal-content.quiz-level-three .modal-cross-button .cross-icon')) {
let quizName = document.querySelector('.quiz-modal.quiz-modal-three')?.getAttribute('quiz-name').split('-')[1].toLowerCase().trim();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 3 - continue - ${quizName} - animated`;
gaEventTrigger('close', eventLabel);
}
toggleModal('.quiz-modal-container', 'modal--hidden', 'modal--visible');
document.querySelectorAll('.quiz-modal.quiz-modal-three, .quiz-modal.quiz-modal-two').forEach(modal => modal.remove());
toggleModal('.quiz-modal.quiz-modal-one', null, 'hide-modal'); // Unhide modal one
return;
}
}
if (isTouchDevice()) {
document.body.addEventListener('touchstart', touchStartEventHandler)
}
}
// Dom manipulation to populate the quiz modal
if (quizPages.includes(currentPath)) {
// Retrieve and parse quiz data from sessionStorage
const quizData = sessionStorage.getItem('quizData');
if (quizData) {
try {
const [url, answerOne, answerTwo] = JSON.parse(quizData);
const currentUrl = window.location.href;
// Check if the current URL matches the stored URL
if (currentUrl.includes(url)) {
document.querySelectorAll(`.cmp-form .leo-radio__input input[value="${answerOne}"]`)[0].click();
document.querySelectorAll(`.cmp-form .leo-radio__input input[value="${answerTwo}"]`)[0].click();
}
} catch (error) {
//console.error('Failed to parse quiz data from sessionStorage:', error);
}
}
}
},
};
// Return if the test ran already!
if (document.querySelector(`.${test.id}`)) return;
// Polling conditions
if (document.querySelector('main.container .cmp-container > .aem-Grid')) {
try {
// Activate test
setTimeout(function () { test.init() }, 1000)
// Success log
console.log('Vertis Digital: EXP-10: V: 2:05');
} 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")}}, R_722219_1027_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="1739333374770"]')).remove();
var ctx=vwo_$(x),el;
/*vwo_debug log("Revert","content",""); vwo_debug*/;
el=vwo_$('[vwo-element-id="1739333374834"]');
el.revertContentOp().remove();
return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {} })("HEAD")}}, C_722219_1027_1_2_0:{ fn:function(){return (function(x) { try{
var _vwo_sel = vwo_$("");
!vwo_$("head").find("#1739333374834").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-10-V1",
// 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 () {
/* ---- LOGO ---- */
const quizLogo = `
`;
const crossIcon = `
`;
const newCrossIcon = `
`;
/* ---- DATA ---- */
// quiz data
const collections = [
{
quizName: "Healthy heart, Happy life - Quiz 1",
quizNumber: "quiz 1",
className: "healthy-heart-quiz-one",
image: "https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-1.jpg",
coverImage: "https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-1.jpg",
url: "https://www.greateasternlife.com/sg/en/personal-insurance/lifepedia/healthy-heart-happy-life/heart-health-and-you-quiz-1.html",
header: "Healthy heart, Happy life - Quiz 1",
quizDate: "Jan 06, 2025",
promoCopy: "Answer 3 simple questions and win an exclusive prize from Eu Yan Sang worth $15!",
questionOne: [
"1. One should see a ____________ if he/she is experiencing chest pain and shortness of breath as it could be a possible sign of heart disease and heart failure.",
["Cardiologist", "Dentist", "Gastroenterologist"]
],
questionTwo: [
"2. These chronic conditions – diabetes, high blood pressure, and high ___________ (also known as the “Three Highs”), are usually asymptomatic and may be unnoticed. It has been observed that patients are also developing these conditions at an increasingly earlier age.",
["Blood count", "Cholesterol", "Fever"]
]
},
{
quizName: "Healthy heart, Happy life - Quiz 2",
quizNumber: "quiz 2",
className: "healthy-heart-quiz-two",
image: "https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-2.jpg",
coverImage: "https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-2-thumbnail.jpg",
url: "https://www.greateasternlife.com/sg/en/personal-insurance/lifepedia/healthy-heart-happy-life/huat-the-heart-wants-quiz-2.html",
header: "Healthy heart, Happy life - Quiz 2",
quizDate: "Jan 20, 2025",
promoCopy: "Answer 3 simple questions and win an exclusive prize from Fitness First worth $60!",
questionOne: [
"1. Even though pineapple tarts are everywhere for the festive season, I should limit my intake to ____ pieces because it is equivalent to 7 teaspoons of sugar, which is within our recommended daily intake of 10 teaspoons.",
["2", "4", "6"]
],
questionTwo: [
"2. Nian gao, nian gao, in the box… which is the most calorie-loaded of them all?",
["Steamed", "Fried"]
]
},
];
// quiz image links
const imageUrls = [
"https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-1.jpg",
"https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-2.jpg",
"https://www.greateasternlife.com/content/dam/corp-site/great-eastern/sg/gels-dme-rewards/health-programme/heart-health/gels-dme-rewards-heart-health-quiz-2-thumbnail.jpg"
];
// array of quiz pages
const quizPages = [
'/sg/en/personal-insurance/lifepedia/healthy-heart-happy-life/heart-health-and-you-quiz-1.html',
'/sg/en/personal-insurance/lifepedia/healthy-heart-happy-life/huat-the-heart-wants-quiz-2.html',
];
// array of pages to show quiz logo
const variationPages = [
'/sg/en/personal-insurance/lifepedia.html',
'/sg/en/personal-insurance/lifepedia/medical-coverage.html',
'/sg/en/personal-insurance/lifepedia/life-protection.html',
'/sg/en/personal-insurance/lifepedia/lifestyle-protection.html',
'/sg/en/personal-insurance/lifepedia/savings-and-investment.html',
'/sg/en/personal-insurance/lifepedia/retirement-income.html',
'/sg/en/personal-insurance/lifepedia/career.html',
'/sg/en/personal-insurance/rewards-and-promotions.html'
];
/* ---- Utility Functions ---- */
// // image preload function
function preloadImages(imageUrls) {
imageUrls.forEach(url => {
const img = new Image();
img.src = url;
});
}
// function to validate and process quiz data
function validationAndProcessQuizData(quizUrl, quizNumber) {
// Cache form elements
const formSection = document.querySelector('.form-section');
const questionOneInput = document.querySelectorAll('.form-group-one .radio-item input:checked')[0];
const questionTwoInput = document.querySelectorAll('.form-group-two .radio-item input:checked')[0];
// Validation: Check if questions are answered
const isEmpty = !(questionOneInput?.value) || !(questionTwoInput?.value.trim());
const existingError = formSection.querySelector('.error-copy');
const errorHtml = `
Please complete the questions.
`
if (isEmpty) {
// Add error message if it doesn't exist
if (!existingError) {
formSection.insertAdjacentHTML('beforeend', errorHtml);
formSection.classList.add('form-error');
return; // Exit the function
}
return;
}
// Remove error if validation passes
if (existingError) {
existingError.remove();
}
formSection.classList.remove('form-error');
// Prepare quiz data
const quizData = [
quizUrl.trim(),
questionOneInput.value.trim(),
questionTwoInput.value.trim(),
];
// Store the data in session storage
sessionStorage.setItem('quizData', JSON.stringify(quizData));
// step 3 - continue CTA click
let quizName = quizNumber.toLowerCase();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 3 - continue - ${quizName} - static`;
let eventJourneyCTA = `vworq-hh-3-${quizName}-static`;
gaEventTrigger('click', eventLabel, eventJourneyCTA);
// Redirect to the quiz URL
window.location.href = quizUrl;
}
// function to trigger GA events
function gaEventTrigger(eventAction, eventLabel, eventJourneyCTA = '') {
dataLayer.push({
event: "vwoEvent",
eventDetails: {
category: "[vwo] sticky icon",
action: eventAction,
label: eventLabel
},
contentSubcategory: "healthy heart quiz",
...(eventJourneyCTA ? { journeyCta: eventJourneyCTA } : {})
});
};
// fuction to detect touch device
const isTouchDevice = () => {
return (
'ontouchstart' in window || // Check for touch events
navigator.maxTouchPoints > 0 || // Check for touch points
navigator.msMaxTouchPoints > 0 // Microsoft-specific touch points
);
};
/* ---- HTML Templates Markup and Functions ---- */
// create Quiz cards markup
const createQuizCard = (className, coverImage, header, quizDate) => {
return (`
`;
// function to create inner content for modal level two
let modalTwoInnerContent = (className, title, promoCopy) => (`
${title}
${promoCopy}
Start now
`);
//function to generate radio buttons
function generateRadioButtons(options, groupName) {
// Helper function to generate a single radio item
const createRadioItem = (option, index) => {
const id = `${groupName}-option-${index + 1}`; // Unique ID for each option
return `
`;
};
// Generate all radio items
const radioItems = options.map((option, index) => createRadioItem(option, index)).join("");
// Wrap the radio items in the section structure
return `
${radioItems}
`;
}
// function to create inner content for modal level two
let modalThreeInnerContent = (className, questionOne, questionTwo) => (`
`);
// function to create markup for modals on level two and three
let quizModalfn = (className, quizName, image, modalInnerHtml, modalClassNameOne, modalClassNametwo) => (`
${quizCrossButton}
${quizCrossButton}
${modalInnerHtml}
`);
// markup for quiz modal level one
let quizModalLV1 = `
${quizCrossButton}
Take our simple quizzes and win instant rewards today!
Take part in our simple quizzes and win instant rewards today!
${QuizCards}
`;
// function to create the initial modal markup
let modalMarkup = () => (`
${quizModalLV1}
`);
/* ---- DOM Manipulation ---- */
// current url path
const currentPath = window.location.pathname;
// Dom manipulation for quiz variation
if (variationPages.includes(currentPath)) {
// preload images
preloadImages(imageUrls);
// insert quiz icon
if (document.querySelector('.quiz-icon-container')) return;
document.querySelector('main.container .cmp-container > .aem-Grid').insertAdjacentHTML('beforeend', quizIconHtml);
let eventLabel = '[vwo_ce_rtg] rewards quiz - healthy heart - win prizes - static';
gaEventTrigger('impression', eventLabel);
// insert modal markup
document.querySelectorAll('main.container .cmp-container > .aem-Grid')[0].insertAdjacentHTML('beforeend', modalMarkup())
// click handler function for variation pages
function clickHandler(event) {
const { target } = event;
//console.log('target: ', target);
// Utility: Toggle modal visibility
const toggleModal = (selector, addClass, removeClass) => {
const modal = document.querySelector(selector);
if (modal) {
if (addClass !== null) modal.classList.add(addClass);
if (removeClass !== null) modal.classList.remove(removeClass);
}
};
// Utility: Map class names to modal numbers
const getModalNum = () => {
if (target.closest('.healthy-heart-quiz-one')) return 0;
if (target.closest('.healthy-heart-quiz-two')) return 1;
if (target.closest('.word-search-edition-three')) return 2;
return null; // Default if no match found
};
// Utility: Clear form errors
const clearFormErrors = () => {
document.querySelector('.form-section .error-copy')?.remove();
document.querySelector('.form-section.form-error')?.classList.remove('form-error');
};
// Handle: Quiz icon click (open modal)
if (target.closest('.quiz-icon-container .quiz-icon')) {
toggleModal('.quiz-modal-container', 'modal--visible', 'modal--hidden');
// click on quiz icon
let eventLabel = '[vwo_ce_rtg] rewards quiz - healthy heart - win prizes - static';
let eventJourneyCTA = 'vworq-hh-win prizes-static';
gaEventTrigger('click', eventLabel, eventJourneyCTA);
}
// Handle: Quiz cross icon click (cross icon)
if (target.closest('.quiz-icon-container .cross-icon')) {
document.querySelector('.quiz-icon-container').classList.add('hide-quiz-icon');
// hide quiz icon
let eventLabel = '[vwo_ce_rtg] rewards quiz - healthy heart - win prizes - static';
gaEventTrigger('close', eventLabel);
return;
}
// Handle: Close modal
if (
target.closest('.modal-cross-button .cross-icon') ||
target.classList.contains('modal--visible')
) {
// step 1 modal - close
if (target.closest('.quiz-modal-content.quiz-level-one .modal-cross-button .cross-icon')) {
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 1 - select quiz - static`;
gaEventTrigger('close', eventLabel);
}
// step 2 modal - close
if (target.closest('.quiz-modal-content.quiz-level-two .modal-cross-button .cross-icon')) {
let quizName = document.querySelector('.quiz-modal.quiz-modal-two')?.getAttribute('quiz-name').split('-')[1].toLowerCase().trim();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 2 - start now - ${quizName} - static`;
gaEventTrigger('close', eventLabel);
}
// step 3 - close
if (target.closest('.quiz-modal-content.quiz-level-three .modal-cross-button .cross-icon')) {
let quizName = document.querySelector('.quiz-modal.quiz-modal-three')?.getAttribute('quiz-name').split('-')[1].toLowerCase().trim();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 3 - continue - ${quizName} - static`;
gaEventTrigger('close', eventLabel);
}
toggleModal('.quiz-modal-container', 'modal--hidden', 'modal--visible');
document.querySelectorAll('.quiz-modal.quiz-modal-three, .quiz-modal.quiz-modal-two').forEach(modal => modal.remove());
toggleModal('.quiz-modal.quiz-modal-one', null, 'hide-modal'); // Unhide modal one
return;
}
// Handle: Click on modal cards
if (target.closest('.quiz-modal-one .quiz-card')) {
const modalNum = getModalNum();
if (modalNum !== null) {
const { quizName, quizNumber, className, image, promoCopy, details } = collections[modalNum];
const modalTwoInnerHtml = modalTwoInnerContent(className, quizName, promoCopy, details);
const modalTwoMarkup = quizModalfn(className, quizName, image, modalTwoInnerHtml, 'quiz-modal-two', 'quiz-level-two');
document.querySelector('.quiz-modal.quiz-modal-one').insertAdjacentHTML('afterend', modalTwoMarkup);
toggleModal('.quiz-modal.quiz-modal-one', 'hide-modal', null);
// step 1 - popup card click
let quizTitle = quizNumber.toLowerCase();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 1 - select quiz - ${quizTitle} - static`;
let eventJourneyCTA = `vworq-hh-1-${quizTitle}-static`;
gaEventTrigger('click', eventLabel, eventJourneyCTA);
}
return;
}
// Handle: Click on quiz start button in modal two
if (target.closest('.quiz-modal.quiz-modal-two .quiz-button')) {
const questionModalNum = getModalNum();
if (questionModalNum !== null) {
const { quizName, quizNumber, className, image, questionOne, questionTwo } = collections[questionModalNum];
const modalThreeInnerHtml = modalThreeInnerContent(className, questionOne, questionTwo);
const modalThreeMarkup = quizModalfn(className, quizName, image, modalThreeInnerHtml, 'quiz-modal-three', 'quiz-level-three');
document.querySelector('.quiz-modal.quiz-modal-one').insertAdjacentHTML('afterend', modalThreeMarkup);
toggleModal('.quiz-modal.quiz-modal-two', 'hide-modal', null);
// step 2 - start now CTA click
let quizTitle = quizNumber.toLowerCase();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 2 - start now - ${quizTitle} - static`;
let eventJourneyCTA = `vworq-hh-2-${quizTitle}-static`;
gaEventTrigger('click', eventLabel, eventJourneyCTA);
}
return;
}
// Handle: Click on quiz button in modal three (final action)
if (target.closest('.quiz-modal.quiz-modal-three .quiz-button')) {
const questionModalNum = getModalNum();
if (questionModalNum !== null) {
const { url, quizNumber } = collections[questionModalNum];
// Validate input and process quiz data
validationAndProcessQuizData(url, quizNumber);
}
return;
}
// Handle: Input focus (clear errors)
if (target.closest('input#form-quiestion-one') || target.closest('input#form-quiestion-two')) {
clearFormErrors();
return;
}
}
// Attach click handler to the document
document.body.addEventListener('click', clickHandler);
function touchStartEventHandler(event) {
const { target } = event;
//console.log('target touch: ', target);
// Utility: Toggle modal visibility
const toggleModal = (selector, addClass, removeClass) => {
const modal = document.querySelector(selector);
if (modal) {
modal.classList.add(addClass);
modal.classList.remove(removeClass);
}
};
// Handle: Close modal
if (
target.closest('.modal-cross-button .cross-icon') ||
target.classList.contains('modal--visible')
) {
// step 1 - close
if (target.closest('.quiz-modal-content.quiz-level-one .modal-cross-button .cross-icon')) {
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 1 - select quiz - static`;
gaEventTrigger('close', eventLabel);
}
// step 2 - close
if (target.closest('.quiz-modal-content.quiz-level-two .modal-cross-button .cross-icon')) {
let quizName = document.querySelector('.quiz-modal.quiz-modal-two')?.getAttribute('quiz-name').split('-')[1].toLowerCase().trim();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 2 - start now - ${quizName} - static`;
gaEventTrigger('close', eventLabel);
}
// step 3 - close
if (target.closest('.quiz-modal-content.quiz-level-three .modal-cross-button .cross-icon')) {
let quizName = document.querySelector('.quiz-modal.quiz-modal-three')?.getAttribute('quiz-name').split('-')[1].toLowerCase().trim();
let eventLabel = `[vwo_ce_rtg] rewards quiz - healthy heart - step 3 - continue - ${quizName} - static`;
gaEventTrigger('close', eventLabel);
}
toggleModal('.quiz-modal-container', 'modal--hidden', 'modal--visible');
document.querySelectorAll('.quiz-modal.quiz-modal-three, .quiz-modal.quiz-modal-two').forEach(modal => modal.remove());
toggleModal('.quiz-modal.quiz-modal-one', null, 'hide-modal'); // Unhide modal one
return;
}
}
if (isTouchDevice()) {
document.body.addEventListener('touchstart', touchStartEventHandler)
}
}
// Dom manipulation to populate the quiz modal
if (quizPages.includes(currentPath)) {
// Retrieve and parse quiz data from sessionStorage
const quizData = sessionStorage.getItem('quizData');
if (quizData) {
try {
const [url, answerOne, answerTwo] = JSON.parse(quizData);
const currentUrl = window.location.href;
// Check if the current URL matches the stored URL
if (currentUrl.includes(url)) {
document.querySelectorAll(`.cmp-form .leo-radio__input input[value="${answerOne}"]`)[0].click();
document.querySelectorAll(`.cmp-form .leo-radio__input input[value="${answerTwo}"]`)[0].click();
}
} catch (error) {
//console.error('Failed to parse quiz data from sessionStorage:', error);
}
}
}
},
};
// Return if the test ran already!
if (document.querySelector(`.${test.id}`)) return;
// Polling conditions
if (document.querySelector('main.container .cmp-container > .aem-Grid')) {
try {
// Activate test
setTimeout(function () { test.init() }, 1000)
// Success log
console.log('Vertis Digital: EXP-10: V: 1:05');
} 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")}}, ct1021_22c021a553486c22bb8b3ec4795cbf6f:{ 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 Term" },
{ "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" }
];
// List of RCB products
var productsRCB = [
{ "name": "GREAT SupremeHealth + GREAT TotalCare" },
{ "name": "GREAT Wealth Advantage 4" },
{ "name": "GREAT Maternity Care 2" },
{ "name": "GREAT Flexi Protect Series 3" }
];
// -----------------------------------------
// ----- 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();
}
}
)()
}}, R_722219_1021_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="1737521679116"]')).remove();
var ctx=vwo_$(x),el;
/*vwo_debug log("Revert","content",""); vwo_debug*/;
el=vwo_$('[vwo-element-id="1737521679156"]');
el.revertContentOp().remove();
return vwo_$('head')[0] && vwo_$('head')[0].lastChild; } catch(e) {} })("HEAD")}}, C_722219_1021_1_2_0:{ fn:function(){return (function(x) { try{
var _vwo_sel = vwo_$("");
!vwo_$("head").find("#1737521679156").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-02",
// 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 = `
`;
const lifeInsuranceIcon = `
`;
const travelInsuranceIcon = `
`;
const homeInsuranceIcon = `
`;
const personalAccidentInsuranceIcon = `
`;
const retirementIncomeIcon = `
`;
const carInsuranceIcon = `
`;
const maidInsuranceIcon = `
`;
const wealthInsurenceIcon = `
`;
// 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.30% 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 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: "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]
},
{
name: "GREAT SupremeHealth + GREAT TotalCare",
productName: "GREAT SupremeHealth",
className: "GREAT-SupremeHealth",
learnMoreUrl: "/sg/en/personal-insurance/our-products/health-insurance/great-supremehealth.html",
buyOrTalkToUsLink: "/sg/en/personal-insurance/our-products/health-insurance/great-supremehealth.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]
}
];
// 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" }
];
// 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";
// ----- System config: HTML structure-----
const htmlTitle = `
The Common Reporting Standard (CRS) requires financial institutions around the world to determine where their customers are tax resident and report that information to the government.
CRS may affect you as an individual or business customer if you purchase or hold a policy that is within the CRS scope.
We will contact you to make a declaration regarding your tax residency if you are affected.
The following information regarding CRS terms may be useful.
CRS Terms
Reportable information
The following will be reported to the local tax authority:
Personal information on the reportable person, i.e. name, address, Tax Identification Number (TIN), date of birth.
Financial account information, i.e. account number, balance, interest, dividends, other income and gross proceeds.
Legal enforcement of Automatic Exchange Of Information (AEOI)
Each jurisdiction is able to decide whether it will implement AEOI or not. Consequently, AEOI is implemented on a country-by-country basis.
In addition, in order for two jurisdictions to be able to exchange information, they must have an intergovernmental agreement – a so-called Competent Authority Agreement (CAA) – in place.
Status of commitments
More than 100 jurisdictions have committed to the implementation of AEOI. However, the enforcement is subject to local law and needs to be enacted by every single jurisdiction.
The list with current status of commitments can be found here.
Effective date
Jurisdictions committed to undertake first exchanges by 2017 (early adopter jurisdictions) are expected to implement the due diligence procedures as of 1 January 2016.
Jurisdictions committed to undertake first exchanges by 2018 (late adopter jurisdictions) are expected to implement the due diligence procedures as of 1 January 2017.
For more information on CRS, please refer to the FAQs below.
The Foreign Account Tax Compliance Act (FATCA) requires all financial institutions (FIs) outside of the United States (U.S.) to report account information belonging to U.S. persons to the U.S. Internal Revenue Service (U.S. IRS).
FATCA may affect you as an Individual or Entity Account Holder if you purchase or hold a policy with Great Eastern that falls within the scope of FATCA requirements. We will contact you to obtain the necessary self-certification form, U.S. IRS W series form and supporting documents (where applicable) if you are affected.
For more information on FATCA, please refer to the FAQs below.
You can also refer to the IRAS FAQs. Additional information is also available via the IRAS website.
How to submit tax declaration
Great Eastern App
How to submit tax declaration
Great Eastern App
Email and post
Great Eastern App
1
Sign in to the Great Eastern App using your Great ID or Singpass.
2
Tap Services from the navigation bar.
3
Tap Personal particulars.
4
Tap Update tax residency.
5
Check that your personal information is up to date and tap Yes. Otherwise, tap No, update with Singpass Myinfo.
6
Select the Country(ies), key in the corresponding Tax Identification Number (TIN), and tap Next.
7
If TIN is not available, indicate reasons and tap Next.
8
Provide additional details and supporting documentation if required, then tap Next.
9
Confirm that the information is correct and tap Next.
10
Check the box after you have read and agreed to the declaration and terms and conditions, then tap Submit.
11
You will be notified when your request has been processed.
Download the Great Eastern App today!
1. Download Documents
To make tax declaration, we'll require you to complete and submit the relevant form:
You can visit any of our Customer Service Centres, or send the completed application form and supporting documents to us by post.
Attention to: Customer Service Department
The Great Eastern Life Assurance Company Limited
1 Pickering Street
Great Eastern Centre #01-01
Singapore 048659
Questions and Answers
Common Reporting Standard (CRS)
CRS is designed to mitigate offshore tax evasion. It provides participating countries transparency on the financial assets held offshore by their tax residents. CRS is a reporting regime and is not designed with the objective of imposing additional taxes.
CRS requires financial institutions based in CRS participating countries to identify customer tax residencies and report financial accounts held directly or indirectly by foreign tax residents to the local tax authorities in the jurisdiction where the financial institutions are based. The local tax authorities (in participating countries) are expected to exchange this information with the relevant tax authority in a participating country.
We will request that impacted customers to complete a self-certification form that includes a declaration of their tax residency.
Under the CRS requirements, we will be asking for these information:
Name
Address
Place of birth* (for Individual and Controlling Persons)
Date of birth*(for Individual and Controlling Persons)
Country(ies) of tax residence
Taxpayer identification number(s)*
Place of registration/incorporation (for Entities)
Entity Type (for Entities)
Controlling Person Type for certain Entity Types (for Controlling Persons)* this does not apply in all participating countries and is subject to local law requirements
Tax residency refers to where you are resident for tax purposes and each country has its own criteria to determine it. Please consult your tax advisor or the OECD website for more information.
If you do not provide the requested information / certification, regardless of you being an existing customer of Great Eastern or not, Great Eastern may not be able to issue certain policies to you.
If there is any change in the information provided to Great Eastern, you are required to inform Great Eastern immediately so that we can advise you of further documentation required, if any.
Regretfully, Great Eastern is unable to provide professional tax advice. Please refer to the OECD website or seek advice from a tax advisor.
By regulation, there are only 2 circumstances in which a TIN is not required to be collected or reported:
a TIN is not issued by the relevant Reportable Jurisdiction; or
the domestic law of the relevant Reportable Jurisdiction does not require the collection of the TIN issued by such Reportable Jurisdiction.
However, in certain circumstances, you might not have a TIN temporarily or due to personal circumstances. In such instances, you would need to justify the absence of TIN.
No, all financial institutions in CRS participating countries are required to collect and report account holder information.
Your data and privacy are important to us. For more information please view our Privacy Statement to find out how we collect and handle your personal data.
Additional information for the CRS is still required to be provided even if you have already provided information under the United States government's Foreign Account Tax Compliance Act (FATCA) as these are different regulations with different requirements.
Foreign Account Tax Compliance Act (FATCA)
FATCA is a regulation enacted by the U.S. in March 2010 to deter and detect U.S. tax evasion by U.S. persons through the use of foreign financial accounts. FATCA requires all FIs outside the U.S. to report, on a regular basis, information about financial accounts held by U.S. persons to the U.S. IRS.
In 2014, Singapore entered into a Model 1 Intergovernmental Agreement (IGA) with the U.S. to facilitate compliance with the U.S. FATCA by Singapore-based Financial Institutions (SGFIs). Under the IGA, reporting SGFIs are required to perform due diligence to identify financial accounts held by Specified U.S. persons and report such financial account information to the Inland Revenue Authority of Singapore (IRAS). IRAS will in turn share this information with the U.S. IRS.
As a reporting Singapore FI, Great Eastern is required to collect and submit information on financial accounts held by Specified U.S. persons to IRAS.
FATCA was established to deter and combat U.S. tax evasion by U.S. persons whereas the CRS is intended to deter and combat tax invasion on a global level.
While the FATCA only requires SGFIs to identify and report account information of specified U.S. persons to IRAS, the CRS will require SGFIs to establish the tax residence(s) of all their customers and report to IRAS the financial account information of customers who are tax residents of jurisdictions where Singapore has a Competent Authority Agreement (CAA) based on CRS to exchange the information with.
A U.S. person refers to:
a. an individual who is a U.S. citizen or U.S resident (including U.S green card holder); or
b. a partnership or corporation organised in the U.S. or under the laws of the U.S. or any State thereof, a trust if:
a court within the U.S. would have authority under applicable law to render orders or judgments concerning substantially all issues regarding administration of the trust; and
one or more U.S. persons have the authority to control all substantial decisions of the trust, or an estate of a decedent that is a citizen or resident of the U.S.
We may not be able to issue certain policies to you. For existing policyholders, we may need to report your account information to the IRAS.
If there is any change to the information provided to us previously, please update your information immediately with us and submit the relevant forms. We may approach you for further requirements or clarifications, if any.
Your data and privacy is important to us. Customer details are secured by a strict protocol. For more information, please view our Privacy Statement to find out how we collect and handle your personal data. We safeguard your personal data in accordance with our guidelines.
Yes. You will need to submit a CRS self-certification form and FATCA W series form (if applicable) which can be found on the Great Eastern website. We may reach out to you for supporting documents, if required.
Generally, personal information such as name, address, date of birth, country(ies) of tax residence, U.S. TIN, and financial account information such as account balance will be submitted to IRAS.
For general questions on FATCA, please feel free to contact your agent or refer to the IRAS website for more information. However, we are unable to provide any tax advice. For questions on your tax residency, please refer to the IRAS website or seek advice from your tax advisor.
In general, customers should provide the details by the stipulated date as indicated in our notification requests such as email, SMS, or letter.