Initial list of additional events.

This commit is contained in:
Jeremy-Z 2026-04-20 10:59:21 -04:00
parent 4f6fb62909
commit fff491d0ad
6 changed files with 14 additions and 19 deletions

View file

@ -197,12 +197,16 @@ export default {
policyVehicleId: vehicle.id,
vin: this.selectedVehicleVin
});
useMainStore().updateVehicleCoverage({
noCoverage: this.noCoverageForSelectedVehicle,
deductible: this.deductibleForSelectedVehicle,
repairWaived: this.repairWaivedForSelectedVehicle,
endorsements: this.endorsementsForSelectedVehicle
});
this.pushEventToGA("policy_vehicle", "submitted", vehicle.vehicleMake + "_" + vehicle.vehicleModel + " " + vehicle.carId, true);
this.navigateForward();
} catch (e) {
if (e.isAxiosError && e.status === 404) {
@ -218,6 +222,9 @@ export default {
vin: vehicle.vin
});
this.policyVinFound = false;
this.pushEventToGA("policy_vehicle", "submitted", vehicle.vehicleMake + "_" + vehicle.vehicleModel + " " + vehicle.carId, true);
this.navigateForward();
return;
}

View file

@ -961,12 +961,9 @@ export default {
}
this.pushEventToGA('appointment', 'availability_mobile', `days_out_${dateDiffString}`, true, null, null);
},
pushServiceTypeEvent() {
pushServiceTypeEvent() {
if (this.selectedAppointmentType) {
const gaScheduleType = {
['service_type']: this.selectedAppointmentType.toLowerCase()
};
this.pushGenericObjectToGA(gaScheduleType);
this.pushEventToGA('appointment', 'service_type', this.selectedAppointmentType.toLowerCase(), true, null, null);
}
},
async refreshDatePicker() {

View file

@ -270,7 +270,7 @@ export default {
this.mainStore.applicationUser.firstHit = false;
}
// TODO: Check if we're coming from SFA
// TODO: Check if we're coming from SFA - site does not support SFA yet, add this back when it is enabled.
// eslint-disable-next-line
if (false) {
this.pushEventToGA("co_branded", "welcome_clicked_cta", "yes_clicked", 0);
@ -358,6 +358,9 @@ export default {
}
promises.push(this.mainStore.getCoveragePolicyInfo());
await Promise.all(promises);
this.pushEventToGA("policy_search", "policy_found", this.mainStore.isPolicyLookupSuccessful ? "Yes" : "No", true);
await saveSession({ shouldAwaitSaveSessionQueue: true, bailoutOnError: true })
this.navigateForward();
},

View file

@ -128,15 +128,6 @@ export default {
this.logPageView(analyticsPageEvents.ENTRY);
},
pushValueToGA() {
const gaServiceType = {
['service_type']: useMainStore().order?.serviceLocation?.appointmentType?.toLowerCase()
};
if (gaServiceType && gaServiceType['service_type']) {
this.pushGenericObjectToGA(gaServiceType);
}
},
pushOrderToDataLayer() {
// helper check for if an object is defined (but maybe falsey)
const isDefined = (x) => x !== null && x !== undefined;

View file

@ -190,9 +190,6 @@ router.afterEach(async (to, from) => {
// Push experiments to Data Layer
analyticsMixin.methods.pushExperimentsToDataLayer();
// Push values to GA
analyticsMixin.methods.pushValueToGA();
// Push current order status to Data Layer
analyticsMixin.methods.pushOrderToDataLayer();
}

View file

@ -449,7 +449,7 @@ export const useMainStore = defineStore({
.reduce((r, c) => Object.assign(r, c), {}) ?? {},
originalDeductible: (state) => (state.order.damage.isRepair ? state.order.originalDeductible.repair : state.order.originalDeductible.replace),
currentDeductible: (state) => (state.order.damage.isRepair ? state.order.currentDeductible.repair : state.order.currentDeductible.replace),
accountNameForEvents: (state) => state.issConfig.clientName.replaceAll(" ", "").replaceAll("&", "amp")
accountNameForEvents: (state) => state.issConfig.clientName
},
actions:
{