CSR-216 do not send to logapp if missing sid

This commit is contained in:
CarlNation 2022-05-20 13:20:49 -04:00
parent 955fb2f840
commit cc2d127530

View file

@ -9,12 +9,18 @@ import baseMixin from "@/mixins/base-mixin";
export default { export default {
methods: { methods: {
logPageView(pageEvent) { logPageView(pageEvent) {
// if the user does not have a session id from the content site, do not log.
const sid = getSessionIdValue();
if (sid === '00000000-0000-0000-0000-000000000000') {
return;
}
const currentPageName = getPageNameByQueryString(); const currentPageName = getPageNameByQueryString();
var payload = { var payload = {
userId: getDeviceIdValue(), userId: getDeviceIdValue(),
sessionKey: getSessionKeyValue(), sessionKey: getSessionKeyValue(),
pageName: currentPageName, pageName: currentPageName,
sessionId: getSessionIdValue(), sessionId: sid,
action: '', action: '',
event: pageEvent, event: pageEvent,
shouldUseSessionId: true, shouldUseSessionId: true,
@ -24,6 +30,12 @@ export default {
}, },
logCustomEvent(category, action, label, value) { logCustomEvent(category, action, label, value) {
// if the user does not have a session id from the content site, do not log.
const sid = getSessionIdValue();
if (sid === '00000000-0000-0000-0000-000000000000') {
return;
}
const currentPageName = getPageNameByQueryString(); const currentPageName = getPageNameByQueryString();
var payload = { var payload = {
userId: getDeviceIdValue(), userId: getDeviceIdValue(),