diff --git a/src/router/index.js b/src/router/index.js index 231db1e3c..d82c13ac9 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -159,8 +159,9 @@ const router = createRouter({ }); //---------------------------------------------------------- Router Functions ---------------------------------------------------------- + router.beforeEach(async (to, from, next) => { - router.lastNavigationPage = to.name; + router.lastNavigationPage = to.name == "root" ? analyticsMixin.methods.getPageName() : to.name; next(); }); @@ -168,8 +169,6 @@ router.afterEach(async (to, from) => { // Update lastPageVisited in the store store.commit(storeMutations.UPDATE_LAST_PAGE_VISITED, to.name); - // router.lastNavigationPage = to.name; - // If saving on navigation is requested, check for saved SessionId or EmailAddress to determine if saving is appropriate if (eval(to.params.isSavingNavigation)) { if (