ga event defect
This commit is contained in:
parent
8c6ded0c24
commit
89d32b6a5b
4 changed files with 28 additions and 8 deletions
|
|
@ -26,6 +26,7 @@ const GaLabels = {
|
||||||
ERROR: 'Error',
|
ERROR: 'Error',
|
||||||
LICENSE_PLATE_LOOKUP: 'License_Plate_Look_Up',
|
LICENSE_PLATE_LOOKUP: 'License_Plate_Look_Up',
|
||||||
VIN_LOOKUP: 'Vin_Look_Up',
|
VIN_LOOKUP: 'Vin_Look_Up',
|
||||||
|
ADDRESS_LOOKUP: 'Address_Look_up',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,17 @@ export default {
|
||||||
this.$route
|
this.$route
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
attachCustomEvents() {
|
||||||
|
this.prependActionToMethod(this, this.forwardButtonAction, this.logGAEventForVin());
|
||||||
|
},
|
||||||
|
logGAEventForVin(){
|
||||||
|
this.pushEventToGA(
|
||||||
|
this.$route.query[this.queryStrings.FMG_PAGE],
|
||||||
|
this.GaActions.SUBMITTED,
|
||||||
|
this.GaLabels.ADDRESS_LOOKUP,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
},
|
||||||
getRegistrationAddressFromStore() {
|
getRegistrationAddressFromStore() {
|
||||||
return store.getters.vehicle.registration.address;
|
return store.getters.vehicle.registration.address;
|
||||||
},
|
},
|
||||||
|
|
@ -337,6 +348,9 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.attachCustomEvents();
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
AlertNonServiceableZipHeader(){
|
AlertNonServiceableZipHeader(){
|
||||||
const zipCode = this.serviceZipCode ? this.serviceZipCode : this.customerQuestions.addressQuestions.zipCode;
|
const zipCode = this.serviceZipCode ? this.serviceZipCode : this.customerQuestions.addressQuestions.zipCode;
|
||||||
|
|
|
||||||
|
|
@ -187,14 +187,15 @@ export default {
|
||||||
store.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
store.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||||
},
|
},
|
||||||
attachCustomEvents() {
|
attachCustomEvents() {
|
||||||
this.prependActionToMethod(this, this.forwardButtonAction, () => {
|
this.prependActionToMethod(this, this.forwardButtonAction, this.logGAEventForVin());
|
||||||
this.pushEventToGA(
|
},
|
||||||
|
logGAEventForVin(){
|
||||||
|
this.pushEventToGA(
|
||||||
this.$route.query[this.queryStrings.FMG_PAGE],
|
this.$route.query[this.queryStrings.FMG_PAGE],
|
||||||
this.GaActions.SUBMITTED,
|
this.GaActions.SUBMITTED,
|
||||||
this.GaLabels.LICENSE_PLATE_LOOKUP,
|
this.GaLabels.LICENSE_PLATE_LOOKUP,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
});
|
|
||||||
},
|
},
|
||||||
getLicensePlateFromStore() {
|
getLicensePlateFromStore() {
|
||||||
return store.getters.vehicle.registration.licensePlate;
|
return store.getters.vehicle.registration.licensePlate;
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,9 @@ export default {
|
||||||
vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0,
|
vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.attachCustomEvents();
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
perfectMatchNewVinAlert() {
|
perfectMatchNewVinAlert() {
|
||||||
return this.vinPopulatedOnPageLoad && this.vin === this.getVinFromStore();
|
return this.vinPopulatedOnPageLoad && this.vin === this.getVinFromStore();
|
||||||
|
|
@ -255,15 +258,16 @@ export default {
|
||||||
getZipFromStore(){
|
getZipFromStore(){
|
||||||
return store.getters.order.serviceLocation.zipCode;
|
return store.getters.order.serviceLocation.zipCode;
|
||||||
},
|
},
|
||||||
attachCustomEvents() {
|
attachCustomEvents() {
|
||||||
this.prependActionToMethod(this, this.forwardButtonAction, () => {
|
this.prependActionToMethod(this, this.forwardButtonAction, this.logGAEventForVin());
|
||||||
this.pushEventToGA(
|
},
|
||||||
|
logGAEventForVin(){
|
||||||
|
this.pushEventToGA(
|
||||||
this.$route.query[this.queryStrings.FMG_PAGE],
|
this.$route.query[this.queryStrings.FMG_PAGE],
|
||||||
this.GaActions.SUBMITTED,
|
this.GaActions.SUBMITTED,
|
||||||
this.GaLabels.VINLOOKUP,
|
this.GaLabels.VIN_LOOKUP,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
});
|
|
||||||
},
|
},
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue