Load session before updating funnel cookie

This commit is contained in:
Chloe Herd 2025-05-13 12:27:28 -04:00
parent de73de51b3
commit 73ec3ce9ee

View file

@ -52,6 +52,12 @@ export async function beforeEach(to, from) {
}
}
// If sent from heritage, need to load session.
const fromHeritageFlag = consumeQueryFromStash(queryStrings.FROM_HERITAGE);
if (fromHeritageFlag) {
await loadSessionIfPresent(true, routeData.SERVICE_LOCATION.name);
}
// Process funnel cookie.
updateOrCreateFunnelCookie();
@ -61,12 +67,6 @@ export async function beforeEach(to, from) {
debugLog(" funnel cookie after: ", getFunnelCookie());
}
// If sent from heritage, need to load session.
const fromHeritageFlag = consumeQueryFromStash(queryStrings.FROM_HERITAGE);
if (fromHeritageFlag) {
await loadSessionIfPresent(true, routeData.SERVICE_LOCATION.name);
}
// Update if logging is enabled.
checkLogParam();