zip code GA event

zip code GA event at get damage-options
This commit is contained in:
hiteshkumar87 2023-08-01 16:18:21 +05:30
parent 5c67a0859e
commit 22cee7a5e9
2 changed files with 5 additions and 20 deletions

View file

@ -11,8 +11,7 @@ const GaEvents = {
const GaCategories = { const GaCategories = {
API_RESPONSE: "Api_Response", API_RESPONSE: "Api_Response",
EVOX: "Evox", EVOX: "Evox",
FUNNEL_ENTRY: "funnel_entry",
}; };
const GaActions = { const GaActions = {
@ -20,8 +19,7 @@ const GaActions = {
CLICKED: "Clicked", CLICKED: "Clicked",
VIF: "vif", VIF: "vif",
SUBMITTED: "Submitted", SUBMITTED: "Submitted",
DISPLAYED: "Displayed", DISPLAYED: "Displayed",
ZIP_CODE_PROVIDED: "zip_code_provided",
}; };
const GaLabels = { const GaLabels = {

View file

@ -145,8 +145,7 @@ export default {
selectedPassengerSideReplaceOptions: this.getPassengerSideReplaceOptionsFromStore(), selectedPassengerSideReplaceOptions: this.getPassengerSideReplaceOptionsFromStore(),
}, },
selectedWindshieldOptions: this.getWindshieldOptionsFromStore(), selectedWindshieldOptions: this.getWindshieldOptionsFromStore(),
selectedRearReplaceOptions: this.getRearReplaceOptionsFromStore(), selectedRearReplaceOptions: this.getRearReplaceOptionsFromStore(),
serviceZipCode: this.getZipFromStore() ?? this.$route.query.zipcode,
}; };
}, },
mounted() { mounted() {
@ -168,21 +167,9 @@ export default {
this.$store.getters.vehicle.carId, this.$store.getters.vehicle.carId,
true true
); );
} }
if (this.serviceZipCode) {
this.pushEventToGA(
this.GaCategories.FUNNEL_ENTRY,
this.GaActions.ZIP_CODE_PROVIDED,
this.serviceZipCode,
true
);
}
}, },
getZipFromStore() {
return this.$store.getters.order.serviceLocation.zipCode;
},
backButtonAction() { backButtonAction() {
// route to move backwards // route to move backwards
this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route); this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);