Some additional fixes.

This commit is contained in:
Jeremy-Z 2026-05-04 15:22:58 -04:00
parent b6b03e876a
commit 0e06dce78c
3 changed files with 13 additions and 7 deletions

View file

@ -53,10 +53,10 @@ export default {
}
return '';
},
validateSession() {
async validateSession() {
if (this.noSession()) {
this.initSession();
await this.initSession();
}
updateSessionIdCookie();
@ -64,7 +64,7 @@ export default {
async logPageView(pageEvent) {
const store = useMainStore();
const currentPageName = this.getPageNameByQueryString();
this.validateSession();
//await this.validateSession();
const payload = {
userId: getUserIdValue(),
@ -85,7 +85,7 @@ export default {
async logCustomEvent(category, action, label, value) {
const store = useMainStore();
const currentPageName = this.getPageNameByQueryString();
this.validateSession();
//await this.validateSession();
const payload = {
userId: getUserIdValue(),
@ -543,7 +543,7 @@ export default {
store.logIssSessionData(sessionData);
},
initSession() {
async initSession() {
regenerateDeviceId();
regenerateUserId();
@ -561,7 +561,7 @@ export default {
userAgent: navigator.userAgent
};
const response = useMainStore().initializeSession(payload);
const response = await useMainStore().initializeSession(payload);
if (response?.data) {
if (response?.data.sessionKey) {

View file

@ -35,6 +35,12 @@ const routes = [
return await GoToAccessIsDenied(next);
}
if (analyticsMixin.methods.noSession()) {
await analyticsMixin.methods.initSession();
} else {
updateSessionIdCookie();
}
// Do not run these for the main entry page - as it is not part of the user flow.
if (issPageToUse !== issPageValues.ENTRY_PAGE) {
try {

View file

@ -2625,7 +2625,7 @@ export const useMainStore = defineStore({
this.logExperimentIfExists(issPage, experimentUniverses.ISS_FEATURETOGGLE_AREFEES_HIDDEN);
this.logExperimentIfExists(issPage, experimentUniverses.ISS_FEATURETOGGLE_AREFEES_OVERRIDDEN);
},
initializeSession({ userId, sessionId, userAgent, referrer }) {
async initializeSession({ userId, sessionId, userAgent, referrer }) {
const payload = {
applicationName: applicationConfig.APPLICATION_NAME,
userId,