Merge pull request #1999 from Safelite/feature/CSR-1928
Feature/csr 1928
This commit is contained in:
commit
3c10354230
6 changed files with 50 additions and 7 deletions
|
|
@ -12,6 +12,8 @@ const GaEvents = {
|
||||||
const GaCategories = {
|
const GaCategories = {
|
||||||
API_RESPONSE: "Api_Response",
|
API_RESPONSE: "Api_Response",
|
||||||
EVOX: "Evox",
|
EVOX: "Evox",
|
||||||
|
APPOINTMENT: "Appointment",
|
||||||
|
SERVICE_LOCATION: "service-location",
|
||||||
};
|
};
|
||||||
|
|
||||||
const GaActions = {
|
const GaActions = {
|
||||||
|
|
@ -21,6 +23,9 @@ const GaActions = {
|
||||||
SUBMITTED: "Submitted",
|
SUBMITTED: "Submitted",
|
||||||
DISPLAYED: "Displayed",
|
DISPLAYED: "Displayed",
|
||||||
CASH_QUOTE_DISPLAYED: "Cash quote displayed",
|
CASH_QUOTE_DISPLAYED: "Cash quote displayed",
|
||||||
|
MOBILE_AVAILABLE: "mobile_available",
|
||||||
|
SHOPS_FIRST_DISPLAYED: "shops_first_displayed",
|
||||||
|
MORE_LOCATIONS_CLICKED: "more_locations_clicked",
|
||||||
};
|
};
|
||||||
|
|
||||||
const GaLabels = {
|
const GaLabels = {
|
||||||
|
|
@ -29,6 +34,8 @@ const GaLabels = {
|
||||||
LICENSE_PLATE_LOOKUP: "License_Plate_Look_Up",
|
LICENSE_PLATE_LOOKUP: "License_Plate_Look_Up",
|
||||||
VIN_LOOKUP: "Vin_Look_Up",
|
VIN_LOOKUP: "Vin_Look_Up",
|
||||||
ADDRESS_LOOKUP: "Address_Look_up",
|
ADDRESS_LOOKUP: "Address_Look_up",
|
||||||
|
YES: "yes",
|
||||||
|
NO: "no",
|
||||||
};
|
};
|
||||||
|
|
||||||
const ValueToLogTypes = {
|
const ValueToLogTypes = {
|
||||||
|
|
|
||||||
|
|
@ -177,8 +177,8 @@ export default {
|
||||||
},
|
},
|
||||||
shouldHideRecalibration() {
|
shouldHideRecalibration() {
|
||||||
return (
|
return (
|
||||||
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() === "true" &&
|
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() ===
|
||||||
this.isRecalibrationOnOrder
|
"true" && this.isRecalibrationOnOrder
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
ShowCart() {
|
ShowCart() {
|
||||||
|
|
|
||||||
|
|
@ -593,8 +593,8 @@ export default {
|
||||||
},
|
},
|
||||||
shouldHideRecalibration() {
|
shouldHideRecalibration() {
|
||||||
return (
|
return (
|
||||||
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() === "true" &&
|
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() ===
|
||||||
this.isRecalibrationOnOrder
|
"true" && this.isRecalibrationOnOrder
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
showApplePay() {
|
showApplePay() {
|
||||||
|
|
|
||||||
|
|
@ -403,8 +403,8 @@ export default {
|
||||||
},
|
},
|
||||||
shouldHideRecalibration() {
|
shouldHideRecalibration() {
|
||||||
return (
|
return (
|
||||||
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() === "true" &&
|
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() ===
|
||||||
this.isRecalibrationOnOrder
|
"true" && this.isRecalibrationOnOrder
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
showAfterpayBanner() {
|
showAfterpayBanner() {
|
||||||
|
|
|
||||||
|
|
@ -433,6 +433,18 @@ export default {
|
||||||
if (shopProviderData) {
|
if (shopProviderData) {
|
||||||
this.shopProviderData = shopProviderData;
|
this.shopProviderData = shopProviderData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var gaLabel = this.GaLabels.NO;
|
||||||
|
if (this.isServiceableMobile) {
|
||||||
|
gaLabel = this.GaLabels.YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.pushEventToGA(
|
||||||
|
this.GaCategories.APPOINTMENT,
|
||||||
|
this.GaActions.MOBILE_AVAILABLE,
|
||||||
|
gaLabel,
|
||||||
|
true
|
||||||
|
);
|
||||||
},
|
},
|
||||||
setContainsMilitaryBase(val) {
|
setContainsMilitaryBase(val) {
|
||||||
if (this.zipContainsMilitaryBase !== val) {
|
if (this.zipContainsMilitaryBase !== val) {
|
||||||
|
|
@ -607,7 +619,7 @@ export default {
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
console.log(this.billToAccountNumber);
|
|
||||||
if (this.billToAccountNumber) {
|
if (this.billToAccountNumber) {
|
||||||
this.dispatchStoreAction(
|
this.dispatchStoreAction(
|
||||||
this.storeActions.SAVE_BILL_TO_ACCOUNT_NUMBER,
|
this.storeActions.SAVE_BILL_TO_ACCOUNT_NUMBER,
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ import { nextTick } from "vue";
|
||||||
import { getAvailabilityRating } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
|
import { getAvailabilityRating } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
|
||||||
|
|
||||||
import { Provider } from "@/layouts/service-location/classes/provider";
|
import { Provider } from "@/layouts/service-location/classes/provider";
|
||||||
|
import { AppointmentTypeStrings } from "@/constants/schedule-constants";
|
||||||
|
|
||||||
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
|
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
|
||||||
|
|
||||||
|
|
@ -125,6 +126,8 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getNextShopsFromList(numberToGet = 3) {
|
async getNextShopsFromList(numberToGet = 3) {
|
||||||
|
const logFirstShopsDisplayed = this.shopIndex == 0;
|
||||||
|
|
||||||
const shopIterator = (array, n) => {
|
const shopIterator = (array, n) => {
|
||||||
const l = array.length;
|
const l = array.length;
|
||||||
return () => {
|
return () => {
|
||||||
|
|
@ -160,6 +163,27 @@ export default {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var gaAction = this.GaActions.MORE_LOCATIONS_CLICKED;
|
||||||
|
if (logFirstShopsDisplayed) {
|
||||||
|
gaAction = this.GaActions.SHOPS_FIRST_DISPLAYED;
|
||||||
|
}
|
||||||
|
if (this.selectedAppointmentType === AppointmentTypeStrings.IN_SHOP) {
|
||||||
|
var shops = mappedData.map((shop) => {
|
||||||
|
if (shop.value.length > 5 && shop.value.startsWith("00")) {
|
||||||
|
return shop.value.substring(1);
|
||||||
|
} else {
|
||||||
|
return shop.value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.pushEventToGA(
|
||||||
|
this.GaCategories.SERVICE_LOCATION,
|
||||||
|
gaAction,
|
||||||
|
shops.join("/"),
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.answers.length === 0) {
|
if (this.answers.length === 0) {
|
||||||
this.answers = mappedData;
|
this.answers = mappedData;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue