diff --git a/src/constants/analytics.js b/src/constants/analytics.js index c3416edea..fe43be06d 100644 --- a/src/constants/analytics.js +++ b/src/constants/analytics.js @@ -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 = { diff --git a/src/layouts/confirmation/confirmation.vue b/src/layouts/confirmation/confirmation.vue index bfe369588..72ee038db 100644 --- a/src/layouts/confirmation/confirmation.vue +++ b/src/layouts/confirmation/confirmation.vue @@ -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() { diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 19b7cf261..3c8d23502 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -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() { diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index d53215a60..62c941f90 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -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() { diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 022fa1183..1922d098a 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -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, diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index 1b4d7dea8..d77a7eb04 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -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 {