INSR-8883: Add events to provider-preference

This commit is contained in:
Alex Humphries 2026-04-16 09:50:47 -04:00
parent e5318a947b
commit 6e5a6411ab
4 changed files with 23 additions and 0 deletions

View file

@ -158,11 +158,13 @@ export default {
scheduleWithSafelite() {
this.mainStore.updateIsSafeliteProvider(true);
const scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE;
this.pushEventToGA('prefered_provider', 'Safelite', this.mainStore.accountNameForEvents, true);
this.navigateForward(scenario);
},
scheduleWithTPA() {
this.mainStore.updateIsSafeliteProvider(false);
const scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_TPA_ENABLED;
this.pushEventToGA('prefered_provider', 'TPA', this.mainStore.accountNameForEvents, true);
this.navigateForward(scenario);
},
findAnotherShopClicked() {

View file

@ -62,6 +62,7 @@ export default {
},
methods: {
openModal() {
this.pushEventToGA('prefered_provider', 'display_modal', 'right_to_choose', true);
this.$refs[this.ModalName].openModal();
},

View file

@ -6,6 +6,7 @@
:footerButtonText="ModalCloseButtonText"
:isButtonDisabled="isButtonDisabled"
@footerButtonEvent="footerButtonClick"
@isModalOpened="handleModelOpenedEvent"
:displayCloseButton="false"
:displayCloseLink="true">
<div class="form-test-invalid">
@ -137,11 +138,14 @@ export default {
},
methods: {
openModal() {
this.pushEventToGA('ADAS_self_service', 'acknowledge_recal', 'TPA_displayed_message', true);
this.$refs[this.ModalName].openModal();
},
footerButtonClick() {
if (this.tpaRecalAnswer && (!this.showAcknowledgementCheckbox || this.acknowledged)) {
const eventLabel = this.tpaRecalAnswer === PROVIDER_PREFERENCE_OPTIONS.SAFELITE === 'yes' ? 'TPA_schedule_with_safelite' : 'TPA_accept';
this.pushEventToGA('ADAS_self_service', 'acknowledge_recal', eventLabel, true);
this.$refs[this.ModalName]?.closeModal();
this.$emit('buttonClick', this.tpaRecalAnswer);
} else if (!this.tpaRecalAnswer) {
@ -151,6 +155,11 @@ export default {
this.showAcknowledgementError = true;
this.showNoSelectionError = false;
}
},
handleModelOpenedEvent(isOpened) {
if (!isOpened) {
this.pushEventToGA('ADAS_self_service', 'acknowledge_recal', 'TPA_decline', true);
}
}
}
};

View file

@ -51,6 +51,17 @@ export default {
},
methods: {
handleClickToggle() {
let coverageType = '';
if (this.mainStore.isItac) {
coverageType = 'ITAC';
} else if (this.mainStore.isNoComp) {
coverageType = 'no_comp';
} else if (this.mainStore.isVerified) {
coverageType = 'verified';
} else {
coverageType = 'unverified';
}
this.pushEventToGA('ADAS_self_service', 'WSN_learn_more_clicked', coverageType, true);
this.isDetailVisible = !this.isDetailVisible;
}
}