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',
|
||||
LICENSE_PLATE_LOOKUP: 'License_Plate_Look_Up',
|
||||
VIN_LOOKUP: 'Vin_Look_Up',
|
||||
ADDRESS_LOOKUP: 'Address_Look_up',
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -152,6 +152,17 @@ export default {
|
|||
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() {
|
||||
return store.getters.vehicle.registration.address;
|
||||
},
|
||||
|
|
@ -337,6 +348,9 @@ export default {
|
|||
},
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.attachCustomEvents();
|
||||
},
|
||||
computed: {
|
||||
AlertNonServiceableZipHeader(){
|
||||
const zipCode = this.serviceZipCode ? this.serviceZipCode : this.customerQuestions.addressQuestions.zipCode;
|
||||
|
|
|
|||
|
|
@ -187,14 +187,15 @@ export default {
|
|||
store.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||
},
|
||||
attachCustomEvents() {
|
||||
this.prependActionToMethod(this, this.forwardButtonAction, () => {
|
||||
this.pushEventToGA(
|
||||
this.prependActionToMethod(this, this.forwardButtonAction, this.logGAEventForVin());
|
||||
},
|
||||
logGAEventForVin(){
|
||||
this.pushEventToGA(
|
||||
this.$route.query[this.queryStrings.FMG_PAGE],
|
||||
this.GaActions.SUBMITTED,
|
||||
this.GaLabels.LICENSE_PLATE_LOOKUP,
|
||||
true
|
||||
);
|
||||
});
|
||||
},
|
||||
getLicensePlateFromStore() {
|
||||
return store.getters.vehicle.registration.licensePlate;
|
||||
|
|
|
|||
|
|
@ -192,6 +192,9 @@ export default {
|
|||
vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.attachCustomEvents();
|
||||
},
|
||||
computed: {
|
||||
perfectMatchNewVinAlert() {
|
||||
return this.vinPopulatedOnPageLoad && this.vin === this.getVinFromStore();
|
||||
|
|
@ -255,15 +258,16 @@ export default {
|
|||
getZipFromStore(){
|
||||
return store.getters.order.serviceLocation.zipCode;
|
||||
},
|
||||
attachCustomEvents() {
|
||||
this.prependActionToMethod(this, this.forwardButtonAction, () => {
|
||||
this.pushEventToGA(
|
||||
attachCustomEvents() {
|
||||
this.prependActionToMethod(this, this.forwardButtonAction, this.logGAEventForVin());
|
||||
},
|
||||
logGAEventForVin(){
|
||||
this.pushEventToGA(
|
||||
this.$route.query[this.queryStrings.FMG_PAGE],
|
||||
this.GaActions.SUBMITTED,
|
||||
this.GaLabels.VINLOOKUP,
|
||||
this.GaLabels.VIN_LOOKUP,
|
||||
true
|
||||
);
|
||||
});
|
||||
},
|
||||
backButtonAction() {
|
||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||
|
|
|
|||
Loading…
Reference in a new issue