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 {
methods: {
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();
var payload = {
userId: getDeviceIdValue(),
sessionKey: getSessionKeyValue(),
pageName: currentPageName,
sessionId: getSessionIdValue(),
sessionId: sid,
action: '',
event: pageEvent,
shouldUseSessionId: true,
@ -24,6 +30,12 @@ export default {
},
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();
var payload = {
userId: getDeviceIdValue(),