mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
fix(analytics): remove spurious click tracking (#10469)
This commit is contained in:
committed by
Matteo Pagliazzi
parent
0062e5b1f1
commit
8969b755a6
@@ -58,7 +58,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import Avatar from '../avatar';
|
import Avatar from '../avatar';
|
||||||
import { mapState } from 'client/libs/store';
|
import { mapState } from 'client/libs/store';
|
||||||
import * as Analytics from 'client/libs/analytics';
|
|
||||||
import percent from '../../../common/script/libs/percent';
|
import percent from '../../../common/script/libs/percent';
|
||||||
import {maxHealth} from '../../../common/script/index';
|
import {maxHealth} from '../../../common/script/index';
|
||||||
|
|
||||||
@@ -82,14 +81,6 @@ export default {
|
|||||||
return `${Math.ceil(this.user.stats.hp)} / ${this.maxHealth}`;
|
return `${Math.ceil(this.user.stats.hp)} / ${this.maxHealth}`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted () {
|
|
||||||
Analytics.track({
|
|
||||||
hitType: 'event',
|
|
||||||
eventCategory: 'button',
|
|
||||||
eventAction: 'click',
|
|
||||||
eventLabel: 'Health Warning',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
close () {
|
close () {
|
||||||
this.$root.$emit('bv::hide::modal', 'low-health');
|
this.$root.$emit('bv::hide::modal', 'low-health');
|
||||||
|
|||||||
@@ -164,12 +164,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
shareUserId () {
|
shareUserId () {
|
||||||
Analytics.track({
|
|
||||||
hitType: 'event',
|
|
||||||
eventCategory: 'button',
|
|
||||||
eventAction: 'click',
|
|
||||||
eventLabel: 'Health Warning',
|
|
||||||
});
|
|
||||||
this.shareUserIdShown = !this.shareUserIdShown;
|
this.shareUserIdShown = !this.shareUserIdShown;
|
||||||
},
|
},
|
||||||
async createParty () {
|
async createParty () {
|
||||||
|
|||||||
@@ -365,13 +365,6 @@ export default {
|
|||||||
alert(this.$t('notEnoughGems'));
|
alert(this.$t('notEnoughGems'));
|
||||||
return;
|
return;
|
||||||
// @TODO return $rootScope.openModal('buyGems', {track:"Gems > Gems > Create Group"});
|
// @TODO return $rootScope.openModal('buyGems', {track:"Gems > Gems > Create Group"});
|
||||||
// @TODO when modal is implemented, enable analytics
|
|
||||||
/* Analytics.track({
|
|
||||||
hitType: 'event',
|
|
||||||
eventCategory: 'button',
|
|
||||||
eventAction: 'click',
|
|
||||||
eventLabel: 'Health Warning',
|
|
||||||
}); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let errors = [];
|
let errors = [];
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ import { mapState } from 'client/libs/store';
|
|||||||
import filter from 'lodash/filter';
|
import filter from 'lodash/filter';
|
||||||
import map from 'lodash/map';
|
import map from 'lodash/map';
|
||||||
import notifications from 'client/mixins/notifications';
|
import notifications from 'client/mixins/notifications';
|
||||||
import * as Analytics from 'client/libs/analytics';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [notifications],
|
mixins: [notifications],
|
||||||
@@ -65,14 +64,6 @@ export default {
|
|||||||
emails: [],
|
emails: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted () {
|
|
||||||
Analytics.track({
|
|
||||||
hitType: 'event',
|
|
||||||
eventCategory: 'button',
|
|
||||||
eventAction: 'click',
|
|
||||||
eventLabel: 'Invite Friends',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({user: 'user.data'}),
|
...mapState({user: 'user.data'}),
|
||||||
inviter () {
|
inviter () {
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ export default {
|
|||||||
// @TODO: {keyboard:false, backdrop:'static'}
|
// @TODO: {keyboard:false, backdrop:'static'}
|
||||||
} else if (after <= 30 && !this.user.flags.warnedLowHealth) {
|
} else if (after <= 30 && !this.user.flags.warnedLowHealth) {
|
||||||
this.$root.$emit('bv::show::modal', 'low-health');
|
this.$root.$emit('bv::show::modal', 'low-health');
|
||||||
// @TODO: {keyboard:false, backdrop:'static', controller:'UserCtrl', track:'Health Warning'}
|
// @TODO: {keyboard:false, backdrop:'static', controller:'UserCtrl'}
|
||||||
}
|
}
|
||||||
if (after === before) return;
|
if (after === before) return;
|
||||||
if (this.user.stats.lvl === 0) return;
|
if (this.user.stats.lvl === 0) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user