From cc2d127530ff7b2225b0578738774465844f1844 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 20 May 2022 13:20:49 -0400 Subject: [PATCH] CSR-216 do not send to logapp if missing sid --- src/mixins/analytics-mixin.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index 133187797..05a23a1e2 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -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(),