CASH-1637
CASH-1637 add useragent
This commit is contained in:
parent
e65a6ca96d
commit
e278bcc878
3 changed files with 21 additions and 1 deletions
|
|
@ -125,6 +125,17 @@ export function getSessionKeyValue() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
export function getskeyValue() {
|
||||
const cookieValue = getCookieValueByName(cookieNames.SESSION_KEY);
|
||||
|
||||
if (cookieValue) {
|
||||
return cookieValue;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
export function setSessionKeyIfUnset(value) {
|
||||
if (!isCookieSet(cookieNames.FUNNEL_SESSION_KEY)) {
|
||||
setCookieProperties(
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import {
|
|||
areAllSessionCookiesSet,
|
||||
setSessionIdIfUnset,
|
||||
setSessionKeyIfUnset,
|
||||
getskeyValue,
|
||||
} from "@/helpers/heritage-integration/cookie-helper";
|
||||
import { queryStrings } from "@/constants/query-strings";
|
||||
import { experimentSettings, experimentUniverses } from "@/constants/experiments";
|
||||
|
|
@ -231,11 +232,14 @@ export default {
|
|||
(part) => `${part.glassLocation}-${part.glassName}`
|
||||
);
|
||||
|
||||
var appointment = `${order?.schedule?.date ?? ""} ${order?.schedule?.startTime ?? ""}`;
|
||||
|
||||
var sessionData = {};
|
||||
sessionData.currentPage = getPageNameFromRouter();
|
||||
sessionData.sid = getSessionIdValue();
|
||||
sessionData.deviceId = getDeviceIdValue();
|
||||
sessionData.fmgSessionId = applicationUser?.savedSessionId;
|
||||
sessionData.skey = getskeyValue().toString();
|
||||
sessionData.userId = getUserIdValue();
|
||||
sessionData.carId = order?.vehicle?.carId;
|
||||
sessionData.vehicleYear = order?.vehicle?.year;
|
||||
|
|
@ -266,7 +270,7 @@ export default {
|
|||
sessionData.providerCtu = order?.serviceLocation?.provider?.address?.zipCodeCtu
|
||||
? order?.serviceLocation?.provider?.address?.zipCodeCtu
|
||||
: order?.serviceLocation?.zipCodeCtu;
|
||||
sessionData.appointmentDate = `${order?.schedule?.date} ${order?.schedule?.startTime}`;
|
||||
sessionData.appointmentDate = appointment;
|
||||
sessionData.serviceType = order?.serviceLocation?.appointmentType;
|
||||
sessionData.promoCodes = promoCodes;
|
||||
sessionData.hasTechnicianNotes = order?.serviceLocation?.techNotes ? true : false;
|
||||
|
|
@ -280,6 +284,7 @@ export default {
|
|||
sessionData.isItac = order?.policy?.isItac;
|
||||
sessionData.subTotalPrice = getSubTotal(order?.lineItems);
|
||||
sessionData.totalPrice = getAmountDue(order?.lineItems, true);
|
||||
sessionData.userAgent = navigator.userAgent;
|
||||
|
||||
await baseMixin.methods.dispatchStoreAction(
|
||||
storeActions.LOG_FMG_SESSION_DATA,
|
||||
|
|
|
|||
|
|
@ -1601,6 +1601,7 @@ export const actions = {
|
|||
sid,
|
||||
deviceId,
|
||||
fmgSessionId,
|
||||
skey,
|
||||
userId,
|
||||
carId,
|
||||
vehicleYear,
|
||||
|
|
@ -1639,6 +1640,7 @@ export const actions = {
|
|||
isItac,
|
||||
subTotalPrice,
|
||||
totalPrice,
|
||||
userAgent,
|
||||
}
|
||||
) {
|
||||
var payload = {
|
||||
|
|
@ -1646,6 +1648,7 @@ export const actions = {
|
|||
sid: sid,
|
||||
deviceId: deviceId,
|
||||
fmgSessionId: fmgSessionId,
|
||||
skey: skey,
|
||||
userId: userId,
|
||||
carId: carId,
|
||||
vehicleYear: vehicleYear,
|
||||
|
|
@ -1684,6 +1687,7 @@ export const actions = {
|
|||
isItac: isItac,
|
||||
subTotalPrice: subTotalPrice,
|
||||
totalPrice: totalPrice,
|
||||
userAgent,
|
||||
};
|
||||
|
||||
return globalMethods.callHttpClient({
|
||||
|
|
|
|||
Loading…
Reference in a new issue