chore(analytics): various updates to analytics tracking

This commit is contained in:
Sabe Jones
2021-08-30 16:21:05 -05:00
parent 722770354d
commit 40bf664f20
44 changed files with 76 additions and 775 deletions
@@ -725,7 +725,6 @@ body.modal-open #habitica-menu {
<script>
import { mapState, mapGetters } from '@/libs/store';
import * as Analytics from '@/libs/analytics';
import { goToModForm } from '@/libs/modform';
import gemIcon from '@/assets/svg/gem.svg';
@@ -804,13 +803,6 @@ export default {
this.$root.$emit('bv::show::modal', 'create-party-modal');
},
showBuyGemsModal () {
Analytics.track({
hitType: 'event',
eventCategory: 'button',
eventAction: 'click',
eventLabel: 'Gems > Toolbar',
});
this.$root.$emit('bv::show::modal', 'buy-gems', { alreadyTracked: true });
},
dropdownDesktop (hover) {
@@ -1,43 +0,0 @@
<template>
<base-notification
:can-remove="canRemove"
:has-icon="false"
:notification="notification"
:read-after-click="true"
@click="action"
>
<div
slot="content"
class="notification-bold-blue"
>
{{ $t('dropCapReached') }}
</div>
</base-notification>
</template>
<script>
import BaseNotification from './base';
import * as Analytics from '@/libs/analytics';
export default {
components: {
BaseNotification,
},
props: {
notification: { type: Object, required: true },
canRemove: { type: Boolean, required: true },
},
methods: {
action () {
this.$root.$emit('habitica:drop-cap-reached', this.notification);
Analytics.track({
hitType: 'event',
eventCategory: 'drop-cap-reached',
eventAction: 'click',
eventLabel: 'Drop Cap Reached > Notification Click',
});
},
},
};
</script>
@@ -146,7 +146,6 @@ import ACHIEVEMENT_MIND_OVER_MATTER from './notifications/mindOverMatter';
import ONBOARDING_COMPLETE from './notifications/onboardingComplete';
import GIFT_ONE_GET_ONE from './notifications/g1g1';
import OnboardingGuide from './onboardingGuide';
import DROP_CAP_REACHED from './notifications/dropCapReached';
export default {
components: {
@@ -176,7 +175,6 @@ export default {
OnboardingGuide,
ONBOARDING_COMPLETE,
GIFT_ONE_GET_ONE,
DROP_CAP_REACHED,
},
data () {
return {
@@ -202,7 +200,7 @@ export default {
'GROUP_TASK_CLAIMED', 'NEW_MYSTERY_ITEMS', 'CARD_RECEIVED',
'NEW_INBOX_MESSAGE', 'NEW_CHAT_MESSAGE', 'UNALLOCATED_STATS_POINTS',
'ACHIEVEMENT_JUST_ADD_WATER', 'ACHIEVEMENT_LOST_MASTERCLASSER', 'ACHIEVEMENT_MIND_OVER_MATTER',
'VERIFY_USERNAME', 'ONBOARDING_COMPLETE', 'DROP_CAP_REACHED',
'VERIFY_USERNAME', 'ONBOARDING_COMPLETE',
],
};
},
@@ -139,7 +139,6 @@
<script>
import { mapState } from '@/libs/store';
import * as Analytics from '@/libs/analytics';
import userIcon from '@/assets/svg/user.svg';
import MenuDropdown from '../ui/customMenuDropdown';
import MessageCount from './messageCount';
@@ -178,13 +177,6 @@ export default {
this.$router.push({ name: startingPage });
},
toLearnMore () {
Analytics.track({
hitType: 'event',
eventCategory: 'button',
eventAction: 'click',
eventLabel: 'User Dropdown > Subscriptions',
});
this.$router.push({ name: 'subscription' });
},
logout () {