diff --git a/src/constants/analytics.js b/src/constants/analytics.js index b5b24660d..c3416edea 100644 --- a/src/constants/analytics.js +++ b/src/constants/analytics.js @@ -20,6 +20,7 @@ const GaActions = { VIF: "vif", SUBMITTED: "Submitted", DISPLAYED: "Displayed", + CASH_QUOTE_DISPLAYED: "Cash quote displayed", }; const GaLabels = { diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 3eb513ba5..d3553dfb4 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -126,6 +126,7 @@ import { experimentSettings } from "@/constants/experiments"; import { partTypeStrings } from "@/constants/part-type-strings"; import { containsLineItemWithPartType } from "@/helpers/service-package-helper"; import { nextTick } from "vue"; +import { packageNames } from "@/constants/package-names"; defineRule("option-required", required(errorMessages.OPTION_REQUIRED)); export default { @@ -422,6 +423,30 @@ export default { ); } }, + attachCustomEvents() { + this.prependActionToMethod(this, this.forwardButtonAction, () => { + if (!this.isInsuranceSelected && this.lineItems.vaps?.length == 0) { + const tierOnePrice = + this.lineItems.promos?.length > 0 + ? this.$refs.servicePackage.getDiscountedPackagePriceString( + packageNames.TIER_ONE, + false + ) + : this.$refs.servicePackage.getPackagePriceString( + packageNames.TIER_ONE + ); + this.pushEventToGA( + this.$route.query[this.queryStrings.FMG_PAGE], + this.GaActions.CASH_QUOTE_DISPLAYED, + tierOnePrice, + true + ); + } + }); + }, + }, + mounted() { + this.attachCustomEvents(); }, watch: { lineItemsCloneForWatcher: {