Skip to content

Commit

Permalink
feat: thanks view tracking MP-921
Browse files Browse the repository at this point in the history
  • Loading branch information
emuvente committed Oct 9, 2024
1 parent c706da3 commit b675655
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Thanks/ThanksLayoutV2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,12 @@ export default {
}, 200));
this.determineIfMobile();
this.$kvTrackEvent(
'thanks',
'view',
`${this.visibleSection} v2 view`,
this.showGuestUpsell ? 'guest' : 'signed-in'
);
},
};
</script>
Expand Down
5 changes: 5 additions & 0 deletions src/components/Thanks/ThanksPageCommentAndShare.vue
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,11 @@ export default {
if (this.receipt) {
this.handleFacebookResponse('post-checkout');
}
if (this.askForComments) {
this.$kvTrackEvent('thanks', 'view', 'Loan commenting view', this.isGuest ? 'guest' : 'signed-in');
} else {
this.$kvTrackEvent('thanks', 'view', 'Share this loan view', this.isGuest ? 'guest' : 'signed-in');
}
},
};
Expand Down
1 change: 1 addition & 0 deletions src/components/Thanks/ThanksPageDonationOnly.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export default {
this.$showTipMsg(msg, 'confirmation', true);
}
this.gatherCurrentUserData();
this.$kvTrackEvent('thanks', 'view', 'Donations only view', this.isGuest ? 'guest' : 'signed-in');
}
};
</script>
Expand Down
10 changes: 10 additions & 0 deletions src/pages/Thanks/ThanksPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,16 @@ export default {
this.badgesCustomExpEnabled = true;
}
}
// Track may challenge page view
if (this.activeView === MAY_CHALLENGE_VIEW) {
this.$kvTrackEvent('thanks', 'view', 'May challenge view', this.isGuest ? 'guest' : 'signed-in');
}
// Track login required view
if (this.activeView === LOGIN_REQUIRED_VIEW) {
this.$kvTrackEvent('thanks', 'view', 'Need to login view', this.isGuest ? 'guest' : 'signed-in');
}
},
methods: {
createGuestAccount() {
Expand Down

0 comments on commit b675655

Please sign in to comment.