Merge pull request #1999 from Safelite/feature/CSR-1928

Feature/csr 1928
This commit is contained in:
CarlNation 2024-09-24 13:41:38 -04:00 committed by GitHub
commit 3c10354230
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 50 additions and 7 deletions

View file

@ -12,6 +12,8 @@ const GaEvents = {
const GaCategories = {
API_RESPONSE: "Api_Response",
EVOX: "Evox",
APPOINTMENT: "Appointment",
SERVICE_LOCATION: "service-location",
};
const GaActions = {
@ -21,6 +23,9 @@ const GaActions = {
SUBMITTED: "Submitted",
DISPLAYED: "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 = {
@ -29,6 +34,8 @@ const GaLabels = {
LICENSE_PLATE_LOOKUP: "License_Plate_Look_Up",
VIN_LOOKUP: "Vin_Look_Up",
ADDRESS_LOOKUP: "Address_Look_up",
YES: "yes",
NO: "no",
};
const ValueToLogTypes = {

View file

@ -177,8 +177,8 @@ export default {
},
shouldHideRecalibration() {
return (
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() === "true" &&
this.isRecalibrationOnOrder
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() ===
"true" && this.isRecalibrationOnOrder
);
},
ShowCart() {

View file

@ -593,8 +593,8 @@ export default {
},
shouldHideRecalibration() {
return (
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() === "true" &&
this.isRecalibrationOnOrder
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() ===
"true" && this.isRecalibrationOnOrder
);
},
showApplePay() {

View file

@ -403,8 +403,8 @@ export default {
},
shouldHideRecalibration() {
return (
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() === "true" &&
this.isRecalibrationOnOrder
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() ===
"true" && this.isRecalibrationOnOrder
);
},
showAfterpayBanner() {

View file

@ -433,6 +433,18 @@ export default {
if (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) {
if (this.zipContainsMilitaryBase !== val) {
@ -607,7 +619,7 @@ export default {
},
false
);
console.log(this.billToAccountNumber);
if (this.billToAccountNumber) {
this.dispatchStoreAction(
this.storeActions.SAVE_BILL_TO_ACCOUNT_NUMBER,

View file

@ -52,6 +52,7 @@ import { nextTick } from "vue";
import { getAvailabilityRating } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
import { Provider } from "@/layouts/service-location/classes/provider";
import { AppointmentTypeStrings } from "@/constants/schedule-constants";
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
@ -125,6 +126,8 @@ export default {
},
methods: {
async getNextShopsFromList(numberToGet = 3) {
const logFirstShopsDisplayed = this.shopIndex == 0;
const shopIterator = (array, n) => {
const l = array.length;
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) {
this.answers = mappedData;
} else {