Skip to content

Commit

Permalink
fix: missing tracking information
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Bedon committed Sep 7, 2024
1 parent dca5a80 commit 6ad1d97
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/components/Thanks/Badges/DetailSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ export default {
const index = this.currentBadgeIndex > 1 ? this.currentBadgeIndex - 1 : 0;
return this.badges[index] ?? null;
},
currentBadgeTracking() {
return this.currentBadge?.tracking ?? '';
},
selectedName() {
return this.currentBadge?.name ?? '';
},
Expand Down Expand Up @@ -177,6 +180,13 @@ export default {
handleChange() {
const badgeIndex = this.$refs.badgeCarousel.currentIndex + 1;
this.currentBadgeIndex = badgeIndex;
this.$kvTrackEvent(
'thanks',
'view',
'view-badge-details',
this.currentBadgeTracking,
this.currentBadge.count
);
},
hideBadgeName(badgeId) {
return badgeId !== this.currentBadge?.id;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Thanks/Badges/DiscoverSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ export default {
};
},
mounted() {
const badgesNames = this.badges.map(badge => badge.name).join(', ');
const badgesTracking = this.badges.map(badge => badge.tracking).join(', ');
this.$kvTrackEvent(
'thanks',
'view',
'view-all-badges',
badgesNames
badgesTracking
);
},
methods: {
Expand Down

0 comments on commit 6ad1d97

Please sign in to comment.