diff --git a/src/components/Forms/GuestAccountCreation.vue b/src/components/Forms/GuestAccountCreation.vue index 65fdd38941..012a27a234 100644 --- a/src/components/Forms/GuestAccountCreation.vue +++ b/src/components/Forms/GuestAccountCreation.vue @@ -79,6 +79,14 @@ export default { type: String, default: 'create-guest-account' }, + eventProperty: { + type: String, + default: '' + }, + eventValue: { + type: Number, + default: 0 + } }, data() { return { @@ -93,7 +101,13 @@ export default { this.serverError = false; this.v$.$touch(); if (!this.v$.$invalid) { - this.$kvTrackEvent(this.eventCategory, 'click', this.eventLabel); + this.$kvTrackEvent( + this.eventCategory, + 'click', + this.eventLabel, + this.eventProperty, + this.eventValue ? this.eventValue : null + ); // will end up redirecting to password reset page. this.apollo.mutate({ diff --git a/src/components/Thanks/MyKiva/OptInModule.vue b/src/components/Thanks/MyKiva/OptInModule.vue index 89dff51d53..47a46de01f 100644 --- a/src/components/Thanks/MyKiva/OptInModule.vue +++ b/src/components/Thanks/MyKiva/OptInModule.vue @@ -28,11 +28,6 @@ Yes, keep me updated @@ -40,11 +35,6 @@ @click="() => updateOptIn(false)" variant="ghost" class="tw-w-full btn ghost" - v-kv-track-event="[ - 'thanks', - 'click', - 'reject-opt-in-request', - ]" > No, I don’t want to receive updates @@ -82,10 +72,19 @@ const props = defineProps({ optedIn: { type: Boolean, default: false + }, + isGuest: { + type: Boolean, + default: false, + }, + numberOfBadgesEarned: { + type: Number, + default: 0, } }); const apollo = inject('apollo'); +const $kvTrackEvent = inject('$kvTrackEvent'); const newConsentAnswered = ref(false); const receiveNews = ref(false); @@ -140,6 +139,14 @@ const getMarginLeft = index => { }; const updateOptIn = value => { + $kvTrackEvent( + 'post-checkout', + 'click', + `${value ? 'accept' : 'reject'}-opt-in-request`, + props.isGuest ? 'guest' : 'signed-in', + props.numberOfBadgesEarned, + ); + if (value) { try { apollo.mutate({ diff --git a/src/components/Thanks/MyKiva/ThanksBadges.vue b/src/components/Thanks/MyKiva/ThanksBadges.vue index 36d7b9efc8..afcb1e81a2 100644 --- a/src/components/Thanks/MyKiva/ThanksBadges.vue +++ b/src/components/Thanks/MyKiva/ThanksBadges.vue @@ -3,7 +3,6 @@ @@ -36,7 +35,16 @@

{{ badgeLevelName }} unlocked

{{ badgeFunFact }}{{ badgeFunFactFootnote ? '*' : '' }}

- + {{ continueButtonText }} @@ -50,7 +58,7 @@

Create your account @@ -70,8 +78,10 @@

Finish setting up your account to track and relend your money as you are paid back.

@@ -80,7 +90,7 @@

Show confirmation @@ -133,13 +143,19 @@ title="Finish creating your account to see what's next" @lightbox-closed="showGuestAccountModal = false" > - +