From e168a25787dba51bd9874813dfd5b405a4116012 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 21 Apr 2026 14:35:43 -0400 Subject: [PATCH 1/2] capture bailout dataLayer event Includes Reason and Page from --- src/constants/analytics.js | 1 + src/layouts/bailout-page/bailout-page.vue | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/constants/analytics.js b/src/constants/analytics.js index dc023b15..ef128f13 100644 --- a/src/constants/analytics.js +++ b/src/constants/analytics.js @@ -14,6 +14,7 @@ const GaEvents = Object.freeze({ const GaCategories = Object.freeze({ API_RESPONSE: 'Api_Response', + BAILOUT: 'Bailout', CONFIRMATION_CLICKED: "confirmation clicked", CONFIRMATION_CLICKED_INSHOP: "inshop confirmation clicked", CONFIRMATION_CLICKED_MOBILE: "mobile confirmation clicked", diff --git a/src/layouts/bailout-page/bailout-page.vue b/src/layouts/bailout-page/bailout-page.vue index 8617ce77..dbd250d4 100644 --- a/src/layouts/bailout-page/bailout-page.vue +++ b/src/layouts/bailout-page/bailout-page.vue @@ -88,8 +88,10 @@ import siteFooter from '@/iss-components/site-footer/site-footer.vue'; import textboxQuestion from '@/digital-components/textbox-question/textbox-question.vue'; import textBlock from '@/digital-components/text-block/text-block.vue'; // Supporting files +import analyticsMixIn from '@/mixins/analytics-mixin.js'; import BaseFormMixin from '@/mixins/base-form-mixin.js'; import { fetchCmsContentForPage } from '@/helpers/cms-content-helper'; +import { GaCategories } from '@/constants/analytics'; import globalRules from '@/constants/global-rules'; import settleAllPromises from '@/helpers/layout-helper'; import { useMainStore } from '@/store'; @@ -111,8 +113,17 @@ export default { Form, textBlock }, - mixins: [BaseFormMixin], + mixins: [BaseFormMixin, analyticsMixIn], async beforeRouteEnter(to, from, next) { + const fromPage = from?.query?.issPage || 'external'; + // Only log bailout event if user is coming from a different page. + // This ensures that we cannot get stuck in a loop, if the bailout-page ever bails out. + if (fromPage !== issPageValues.BAILOUT_PAGE) { + const bailoutCode = useMainStore().pageData(issPageValues.BAILOUT_PAGE).bailoutCode; + const bailoutString = Object.keys(BailoutCode).find(key => BailoutCode[key] === bailoutCode); + analyticsMixIn.methods.pushEventToGA(GaCategories.BAILOUT, bailoutString, fromPage, true, null, null); + } + // Call APIs const cmsContentPromise = fetchCmsContentForPage(to.query.issPage); // Settle promises and get results From 70f80affec34530f889d5bbee0c81522048e7201 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 21 Apr 2026 14:46:45 -0400 Subject: [PATCH 2/2] Update Title --- src/router/router-constants/router-titles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/router-constants/router-titles.js b/src/router/router-constants/router-titles.js index e6b8d0a6..09697588 100644 --- a/src/router/router-constants/router-titles.js +++ b/src/router/router-constants/router-titles.js @@ -9,7 +9,7 @@ const routerTitles = Object.freeze({ [issPageValues.ADDRESS_LOOKUP]: `Address Lookup ${titleSuffix}`, [issPageValues.ADDRESS_VEHICLES]: `Address Vehicles ${titleSuffix}`, - [issPageValues.BAILOUT_PAGE]: `Bailout Page ${titleSuffix}`, + [issPageValues.BAILOUT_PAGE]: `Need Help ${titleSuffix}`, [issPageValues.CAPABILITY_QUESTIONS]: `Capability Questions ${titleSuffix}`, [issPageValues.CONTACT_CONFIRMATION]: `Contact Confirmation ${titleSuffix}`, [issPageValues.CONTACT_DETAILS]: `Contact Details ${titleSuffix}`,