diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index d52ce93b6..a77fe930a 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -958,6 +958,8 @@ function getPageNameFromRouter() { ) { return router.currentRoute.value.name; } + + return window.location.href.replace(/\/$/, "").split("/").pop(); } function getValueToLog(value, valueToLogType) { diff --git a/src/router/methods/route-logic/error.js b/src/router/methods/route-logic/error.js index d82080f88..fb9dd2cbc 100644 --- a/src/router/methods/route-logic/error.js +++ b/src/router/methods/route-logic/error.js @@ -6,6 +6,7 @@ import router from "@/router"; import { routeData, FUNNEL_START_PAGE } from "@/router/constants/routes"; import store from "@/store"; import { handleHardError } from "@/router/methods/error"; +import analyticsMixin from "@/mixins/analytics-mixin"; export async function errorBeforeEnter(to, from) { // Check if `hasAlreadyTriggeredErrror` is available. @@ -18,6 +19,7 @@ export async function errorBeforeEnter(to, from) { nextPage: to?.name, }; + analyticsMixin.methods.logDigitalConsumer(); await handleHardError(errorPayload); return; } @@ -31,6 +33,7 @@ export async function errorBeforeEnter(to, from) { nextPage: to?.name, }; + analyticsMixin.methods.logDigitalConsumer(); await handleHardError(errorPayload); return; } else {