CASH-109
CASH-109 do not use the funnel session cookie as it will be deleted when the browser closes. instead, look at vuex and make sure they at least have a vehicle year to determine if they have visited the site before.
This commit is contained in:
parent
9920371d35
commit
c5ad651546
5 changed files with 16 additions and 25 deletions
|
|
@ -97,16 +97,16 @@ export default {
|
||||||
document.onkeydown = function (e) {
|
document.onkeydown = function (e) {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
// check session expired and initSession to recreate cookies
|
// check session expired and initSession to recreate cookies
|
||||||
if (analyticsMixin.methods.sessionExpired()) {
|
if (analyticsMixin.methods.sessionExpired()) {
|
||||||
this.routeReturnUser();
|
this.routeReturnUser();
|
||||||
} else {
|
} else {
|
||||||
this.$emit("ForwardClicked");
|
this.$emit("ForwardClicked");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
linkClick() {
|
linkClick() {
|
||||||
// check session expired and initSession to recreate cookies
|
// check session expired and initSession to recreate cookies
|
||||||
if (analyticsMixin.methods.sessionExpired()) {
|
if (analyticsMixin.methods.sessionExpired()) {
|
||||||
this.routeReturnUser();
|
this.routeReturnUser();
|
||||||
} else {
|
} else {
|
||||||
this.$emit("BackClicked");
|
this.$emit("BackClicked");
|
||||||
|
|
|
||||||
|
|
@ -298,7 +298,7 @@ export default {
|
||||||
// to restore, uncomment the 2 lines below
|
// to restore, uncomment the 2 lines below
|
||||||
// vm.showSaveProgressPopup = showSaveProgressPopup;
|
// vm.showSaveProgressPopup = showSaveProgressPopup;
|
||||||
// vm.showSaveProgressModal = showSaveProgressModal;
|
// vm.showSaveProgressModal = showSaveProgressModal;
|
||||||
|
|
||||||
vm.addableVaps = addableVaps;
|
vm.addableVaps = addableVaps;
|
||||||
vm.lineItems = lineItems;
|
vm.lineItems = lineItems;
|
||||||
vm.availableLineItems = pricingResults;
|
vm.availableLineItems = pricingResults;
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ export default {
|
||||||
// turned off Save Your Progress for 1/23/25 release
|
// turned off Save Your Progress for 1/23/25 release
|
||||||
// to restore, uncomment line below
|
// to restore, uncomment line below
|
||||||
// vm.showSaveProgressModal = !(emailFromStore?.length > 0);
|
// vm.showSaveProgressModal = !(emailFromStore?.length > 0);
|
||||||
|
|
||||||
// Glass Part Question dynamic component
|
// Glass Part Question dynamic component
|
||||||
Object.keys(vm.$refs)
|
Object.keys(vm.$refs)
|
||||||
.filter((r) => r.includes(vm.RefPrefix) && vm.$refs[r][0] !== undefined)
|
.filter((r) => r.includes(vm.RefPrefix) && vm.$refs[r][0] !== undefined)
|
||||||
|
|
|
||||||
|
|
@ -712,16 +712,10 @@ export default {
|
||||||
return !areAllSessionCookiesSet();
|
return !areAllSessionCookiesSet();
|
||||||
},
|
},
|
||||||
|
|
||||||
// sessionExpired is true when one of the analytics cookies(sid, dxdev) has expired but we still have the funnelSessionInfo cookie
|
// sessionExpired is true when one of the analytics cookies(sid, dxdev) has expired but we still have the vehicle year in vuex
|
||||||
sessionExpired() {
|
sessionExpired() {
|
||||||
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
|
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
|
||||||
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
if (this.noSession() && !fromHeritage && store.getters.order.vehicle?.year > 0) {
|
||||||
if (
|
|
||||||
this.noSession() &&
|
|
||||||
!fromHeritage &&
|
|
||||||
funnelCookieLastTouched !== null &&
|
|
||||||
funnelCookieLastTouched !== undefined
|
|
||||||
) {
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ const routes = [
|
||||||
log(` --from.redirectedFrom:>${JSON.stringify(from.redirectedFrom)}<`, "");
|
log(` --from.redirectedFrom:>${JSON.stringify(from.redirectedFrom)}<`, "");
|
||||||
|
|
||||||
await analyticsMixin.methods.validateSession();
|
await analyticsMixin.methods.validateSession();
|
||||||
|
|
||||||
// after session is validated, remove the fromHeritage querystring if it exists so session expiration works
|
// after session is validated, remove the fromHeritage querystring if it exists so session expiration works
|
||||||
if (to.query) {
|
if (to.query) {
|
||||||
delete to.query[queryStrings.FROM_HERITAGE];
|
delete to.query[queryStrings.FROM_HERITAGE];
|
||||||
|
|
@ -100,14 +100,12 @@ const routes = [
|
||||||
}
|
}
|
||||||
// On entering the funnel "fresh", read cookie information, decide what to do next.
|
// On entering the funnel "fresh", read cookie information, decide what to do next.
|
||||||
else if (from.redirectedFrom === undefined || fromReturnUser) {
|
else if (from.redirectedFrom === undefined || fromReturnUser) {
|
||||||
// if entering the funnel from the content site, check and see if there is already a funnel cookie.
|
// if entering the funnel from the content site, check and see if there is already a vehicle year in vuex.
|
||||||
// if so, send them to return-user page.
|
// if so, send them to return-user page.
|
||||||
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
|
||||||
if (
|
if (
|
||||||
fromContentSite &&
|
fromContentSite &&
|
||||||
funnelCookieLastTouched !== null &&
|
!toReturnUserPage &&
|
||||||
funnelCookieLastTouched !== undefined &&
|
store.getters.order.vehicle?.year > 0
|
||||||
!toReturnUserPage
|
|
||||||
) {
|
) {
|
||||||
log(" --from content site navigate to return user");
|
log(" --from content site navigate to return user");
|
||||||
var qso = {
|
var qso = {
|
||||||
|
|
@ -178,8 +176,7 @@ const routes = [
|
||||||
// clear part related state because heritage selected a new vehicle
|
// clear part related state because heritage selected a new vehicle
|
||||||
if (
|
if (
|
||||||
to.query.fmgPage === fmgPageValues.VEHICLE &&
|
to.query.fmgPage === fmgPageValues.VEHICLE &&
|
||||||
eval(getFunnelCookie()?.HasDelayedClaimRegistration &&
|
eval(getFunnelCookie()?.HasDelayedClaimRegistration && !fromReturnUser)
|
||||||
!fromReturnUser)
|
|
||||||
) {
|
) {
|
||||||
store.commit(storeMutations.RESET_GLASS_PARTS_STATE);
|
store.commit(storeMutations.RESET_GLASS_PARTS_STATE);
|
||||||
}
|
}
|
||||||
|
|
@ -187,7 +184,7 @@ const routes = [
|
||||||
// if coming from the return user page, clear the destination page so implicit navigation runs
|
// if coming from the return user page, clear the destination page so implicit navigation runs
|
||||||
log(" --to.query ", JSON.stringify(to.query));
|
log(" --to.query ", JSON.stringify(to.query));
|
||||||
if (fromReturnUser && to.query) {
|
if (fromReturnUser && to.query) {
|
||||||
log( " --clear to.query");
|
log(" --clear to.query");
|
||||||
delete to.query[queryStrings.FMG_PAGE];
|
delete to.query[queryStrings.FMG_PAGE];
|
||||||
|
|
||||||
//to.query[queryStrings.FMG_PAGE] = "";
|
//to.query[queryStrings.FMG_PAGE] = "";
|
||||||
|
|
@ -571,7 +568,7 @@ async function navigate(
|
||||||
const pageError = getQuerystringParameter(queryStrings.PAGE_ERROR);
|
const pageError = getQuerystringParameter(queryStrings.PAGE_ERROR);
|
||||||
const logQs = getQuerystringParameter(queryStrings.LOG);
|
const logQs = getQuerystringParameter(queryStrings.LOG);
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_LOGGING_OPTION, logQs, false);
|
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_LOGGING_OPTION, logQs, false);
|
||||||
|
|
||||||
log("------------- router index.js navigate start -----------------");
|
log("------------- router index.js navigate start -----------------");
|
||||||
log(" --scenario: ", scenario);
|
log(" --scenario: ", scenario);
|
||||||
log(" --isSavingNavigation: ", isSavingNavigation);
|
log(" --isSavingNavigation: ", isSavingNavigation);
|
||||||
|
|
@ -636,7 +633,7 @@ function getNavigationMap(scenario, currentRoute) {
|
||||||
function log(message, data) {
|
function log(message, data) {
|
||||||
const log = getQuerystringParameter(queryStrings.LOG);
|
const log = getQuerystringParameter(queryStrings.LOG);
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_LOGGING_OPTION, log, false);
|
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_LOGGING_OPTION, log, false);
|
||||||
|
|
||||||
data = data ?? "";
|
data = data ?? "";
|
||||||
const outData = typeof data === "object" ? JSON.stringify(data) : data;
|
const outData = typeof data === "object" ? JSON.stringify(data) : data;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue