Some additional fixes.
This commit is contained in:
parent
b6b03e876a
commit
0e06dce78c
3 changed files with 13 additions and 7 deletions
|
|
@ -53,10 +53,10 @@ export default {
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
validateSession() {
|
async validateSession() {
|
||||||
|
|
||||||
if (this.noSession()) {
|
if (this.noSession()) {
|
||||||
this.initSession();
|
await this.initSession();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSessionIdCookie();
|
updateSessionIdCookie();
|
||||||
|
|
@ -64,7 +64,7 @@ export default {
|
||||||
async logPageView(pageEvent) {
|
async logPageView(pageEvent) {
|
||||||
const store = useMainStore();
|
const store = useMainStore();
|
||||||
const currentPageName = this.getPageNameByQueryString();
|
const currentPageName = this.getPageNameByQueryString();
|
||||||
this.validateSession();
|
//await this.validateSession();
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
userId: getUserIdValue(),
|
userId: getUserIdValue(),
|
||||||
|
|
@ -85,7 +85,7 @@ export default {
|
||||||
async logCustomEvent(category, action, label, value) {
|
async logCustomEvent(category, action, label, value) {
|
||||||
const store = useMainStore();
|
const store = useMainStore();
|
||||||
const currentPageName = this.getPageNameByQueryString();
|
const currentPageName = this.getPageNameByQueryString();
|
||||||
this.validateSession();
|
//await this.validateSession();
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
userId: getUserIdValue(),
|
userId: getUserIdValue(),
|
||||||
|
|
@ -543,7 +543,7 @@ export default {
|
||||||
store.logIssSessionData(sessionData);
|
store.logIssSessionData(sessionData);
|
||||||
},
|
},
|
||||||
|
|
||||||
initSession() {
|
async initSession() {
|
||||||
|
|
||||||
regenerateDeviceId();
|
regenerateDeviceId();
|
||||||
regenerateUserId();
|
regenerateUserId();
|
||||||
|
|
@ -561,7 +561,7 @@ export default {
|
||||||
userAgent: navigator.userAgent
|
userAgent: navigator.userAgent
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = useMainStore().initializeSession(payload);
|
const response = await useMainStore().initializeSession(payload);
|
||||||
|
|
||||||
if (response?.data) {
|
if (response?.data) {
|
||||||
if (response?.data.sessionKey) {
|
if (response?.data.sessionKey) {
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,12 @@ const routes = [
|
||||||
return await GoToAccessIsDenied(next);
|
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.
|
// Do not run these for the main entry page - as it is not part of the user flow.
|
||||||
if (issPageToUse !== issPageValues.ENTRY_PAGE) {
|
if (issPageToUse !== issPageValues.ENTRY_PAGE) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -2625,7 +2625,7 @@ export const useMainStore = defineStore({
|
||||||
this.logExperimentIfExists(issPage, experimentUniverses.ISS_FEATURETOGGLE_AREFEES_HIDDEN);
|
this.logExperimentIfExists(issPage, experimentUniverses.ISS_FEATURETOGGLE_AREFEES_HIDDEN);
|
||||||
this.logExperimentIfExists(issPage, experimentUniverses.ISS_FEATURETOGGLE_AREFEES_OVERRIDDEN);
|
this.logExperimentIfExists(issPage, experimentUniverses.ISS_FEATURETOGGLE_AREFEES_OVERRIDDEN);
|
||||||
},
|
},
|
||||||
initializeSession({ userId, sessionId, userAgent, referrer }) {
|
async initializeSession({ userId, sessionId, userAgent, referrer }) {
|
||||||
const payload = {
|
const payload = {
|
||||||
applicationName: applicationConfig.APPLICATION_NAME,
|
applicationName: applicationConfig.APPLICATION_NAME,
|
||||||
userId,
|
userId,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue