Merge pull request #1179 from Safelite/feature/humphries/INSR-8879.1

INSR-9225: Update vin-lookup events to match what actually fires in Heritage
This commit is contained in:
AHumphriesSL 2026-04-10 10:07:16 -04:00 committed by GitHub
commit e5318a947b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -179,7 +179,7 @@ export default {
if (this.needToLookupVehicle) {
try {
const vehicleLookupResponse = await this.lookupVehicleByVin(this.vin);
this.pushEventToGA("VIN", "TEXT", "SUCCESS", true, null, '1');
this.pushEventToGA("policy_vehicle", "VIN_lookup", "SUCCESS", true, null, '1');
if (!vehicleLookupResponse.data.canSafeliteService) {
this.mainStore.setBailout(bailoutMessage.HeavyTruckVehicle(vehicleLookupResponse.data.carId));
@ -196,6 +196,7 @@ export default {
}
);
} catch (e) {
this.pushEventToGA("policy_vehicle", "VIN_lookup", "FAIL", true, null, '0');
if (e.status === 404) {
this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.NOT_FOUND;
this.resetVehicleFromLookup();
@ -203,7 +204,6 @@ export default {
// because the form itself actually passes its client-side validation.
// SSR-189 Scenario #4.
this.$refs.siteFooter.enableForwardAction();
this.pushEventToGA("VIN", "TEXT", "NO VEHICLE FOUND", true, null, '0');
showIssLoadingModal(false);
return;
}