CSR-1339
Allow site to function when analytic service calls fail
This commit is contained in:
parent
38e44915bb
commit
43954352a0
2 changed files with 26 additions and 8 deletions
|
|
@ -146,18 +146,18 @@ export default {
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.data) {
|
if (response?.data) {
|
||||||
if (response.data.sessionKey && skey === 0) {
|
if (response?.data.sessionKey && skey === 0) {
|
||||||
setCookieProperties(
|
setCookieProperties(
|
||||||
{ [cookieNames.SESSION_KEY]: response.data.sessionKey },
|
{ [cookieNames.SESSION_KEY]: response?.data.sessionKey },
|
||||||
{
|
{
|
||||||
useDefaultFunnelCookieAttributes: false,
|
useDefaultFunnelCookieAttributes: false,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (response.data.sessionId && sid === "00000000-0000-0000-0000-000000000000") {
|
if (response?.data.sessionId && sid === "00000000-0000-0000-0000-000000000000") {
|
||||||
setCookieProperties(
|
setCookieProperties(
|
||||||
{ [cookieNames.SESSION_ID]: response.data.sessionId },
|
{ [cookieNames.SESSION_ID]: response?.data.sessionId },
|
||||||
{
|
{
|
||||||
maxAge: 60 * 30, // 30 minutes
|
maxAge: 60 * 30, // 30 minutes
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -720,7 +720,13 @@ export const actions = {
|
||||||
endpoint: endpoints.LogPageView.url,
|
endpoint: endpoints.LogPageView.url,
|
||||||
payload: payload,
|
payload: payload,
|
||||||
logApiCall: false,
|
logApiCall: false,
|
||||||
});
|
}).then((response) => {
|
||||||
|
return response;
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
console.log("Analytics Service Error: " + error.data);
|
||||||
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
logCustomEvent(
|
logCustomEvent(
|
||||||
context,
|
context,
|
||||||
|
|
@ -756,7 +762,13 @@ export const actions = {
|
||||||
endpoint: endpoints.LogCustomEvent.url,
|
endpoint: endpoints.LogCustomEvent.url,
|
||||||
payload: payload,
|
payload: payload,
|
||||||
logApiCall: false,
|
logApiCall: false,
|
||||||
});
|
}).then((response) => {
|
||||||
|
return response;
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
console.log("Analytics Service Error: " + error.data);
|
||||||
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
initializeSession(context, { userId, sessionId, userAgent, referrer }) {
|
initializeSession(context, { userId, sessionId, userAgent, referrer }) {
|
||||||
var payload = {
|
var payload = {
|
||||||
|
|
@ -775,7 +787,13 @@ export const actions = {
|
||||||
endpoint: endpoints.InitializeSession.url,
|
endpoint: endpoints.InitializeSession.url,
|
||||||
payload: payload,
|
payload: payload,
|
||||||
logApiCall: false,
|
logApiCall: false,
|
||||||
});
|
}).then((response) => {
|
||||||
|
return response;
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
console.log("Analytics Service Error: " + error.data);
|
||||||
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
// Misc Actions
|
// Misc Actions
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue