Ensure session state is valid before logging
This commit is contained in:
parent
53aed87e1d
commit
c2996187bb
1 changed files with 5 additions and 2 deletions
|
|
@ -32,8 +32,10 @@ export default {
|
||||||
return getPageNameByQueryString();
|
return getPageNameByQueryString();
|
||||||
},
|
},
|
||||||
|
|
||||||
logPageView(pageEvent) {
|
async logPageView(pageEvent) {
|
||||||
const currentPageName = getPageNameByQueryString();
|
const currentPageName = getPageNameByQueryString();
|
||||||
|
await this.validateSession();
|
||||||
|
|
||||||
var payload = {
|
var payload = {
|
||||||
userId: getUserIdValue(),
|
userId: getUserIdValue(),
|
||||||
sessionKey: getSessionKeyValue(),
|
sessionKey: getSessionKeyValue(),
|
||||||
|
|
@ -50,8 +52,9 @@ export default {
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.LOG_PAGE_VIEW, payload, false);
|
baseMixin.methods.dispatchStoreAction(storeActions.LOG_PAGE_VIEW, payload, false);
|
||||||
},
|
},
|
||||||
|
|
||||||
logCustomEvent(category, action, label, value) {
|
async logCustomEvent(category, action, label, value) {
|
||||||
const currentPageName = getPageNameByQueryString();
|
const currentPageName = getPageNameByQueryString();
|
||||||
|
await this.validateSession();
|
||||||
|
|
||||||
var payload = {
|
var payload = {
|
||||||
userId: getUserIdValue(),
|
userId: getUserIdValue(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue