ga event defect
This commit is contained in:
parent
1c4d609959
commit
b1e14f80df
4 changed files with 17 additions and 15 deletions
|
|
@ -153,16 +153,15 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
attachCustomEvents() {
|
attachCustomEvents() {
|
||||||
this.prependActionToMethod(this, this.forwardButtonAction, this.logGAEventForVin());
|
this.prependActionToMethod(this, this.forwardButtonAction, () => {
|
||||||
},
|
|
||||||
logGAEventForVin(){
|
|
||||||
this.pushEventToGA(
|
this.pushEventToGA(
|
||||||
this.$route.query[this.queryStrings.FMG_PAGE],
|
this.$route.query[this.queryStrings.FMG_PAGE],
|
||||||
this.GaActions.SUBMITTED,
|
this.GaActions.SUBMITTED,
|
||||||
this.GaLabels.ADDRESS_LOOKUP,
|
this.GaLabels.ADDRESS_LOOKUP,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
},
|
});
|
||||||
|
},
|
||||||
getRegistrationAddressFromStore() {
|
getRegistrationAddressFromStore() {
|
||||||
return store.getters.vehicle.registration.address;
|
return store.getters.vehicle.registration.address;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -187,15 +187,14 @@ 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.logGAEventForVin());
|
this.prependActionToMethod(this, this.forwardButtonAction, () => {
|
||||||
},
|
|
||||||
logGAEventForVin(){
|
|
||||||
this.pushEventToGA(
|
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;
|
||||||
|
|
|
||||||
|
|
@ -259,15 +259,14 @@ export default {
|
||||||
return store.getters.order.serviceLocation.zipCode;
|
return store.getters.order.serviceLocation.zipCode;
|
||||||
},
|
},
|
||||||
attachCustomEvents() {
|
attachCustomEvents() {
|
||||||
this.prependActionToMethod(this, this.forwardButtonAction, this.logGAEventForVin());
|
this.prependActionToMethod(this, this.forwardButtonAction, () => {
|
||||||
},
|
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.VIN_LOOKUP,
|
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);
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,13 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
prependActionToMethod(object, method, actionToPrepend) {
|
prependActionToMethod(object, method, actionToPrepend) {
|
||||||
const baseMethod = object[method.name];
|
var baseMethod = object[method.name];
|
||||||
object[method.name] = function () {
|
if(method.name.startsWith('bound ')){
|
||||||
|
baseMethod = method.name.substring(6);
|
||||||
|
}else{
|
||||||
|
baseMethod = object[method.name];
|
||||||
|
}
|
||||||
|
object[method.name.substring(6)] = function () {
|
||||||
actionToPrepend.apply(this, arguments);
|
actionToPrepend.apply(this, arguments);
|
||||||
return baseMethod.apply(object, arguments);
|
return baseMethod.apply(object, arguments);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue