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

View file

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

View file

@ -270,7 +270,7 @@ export default {
this.mainStore.applicationUser.firstHit = false; 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 // eslint-disable-next-line
if (false) { if (false) {
this.pushEventToGA("co_branded", "welcome_clicked_cta", "yes_clicked", 0); this.pushEventToGA("co_branded", "welcome_clicked_cta", "yes_clicked", 0);
@ -358,6 +358,9 @@ export default {
} }
promises.push(this.mainStore.getCoveragePolicyInfo()); promises.push(this.mainStore.getCoveragePolicyInfo());
await Promise.all(promises); await Promise.all(promises);
this.pushEventToGA("policy_search", "policy_found", this.mainStore.isPolicyLookupSuccessful ? "Yes" : "No", true);
await saveSession({ shouldAwaitSaveSessionQueue: true, bailoutOnError: true }) await saveSession({ shouldAwaitSaveSessionQueue: true, bailoutOnError: true })
this.navigateForward(); this.navigateForward();
}, },

View file

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

View file

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

View file

@ -449,7 +449,7 @@ export const useMainStore = defineStore({
.reduce((r, c) => Object.assign(r, c), {}) ?? {}, .reduce((r, c) => Object.assign(r, c), {}) ?? {},
originalDeductible: (state) => (state.order.damage.isRepair ? state.order.originalDeductible.repair : state.order.originalDeductible.replace), 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), 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: actions:
{ {