mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 11:40:25 +00:00
chore(analytics): add tracking for task mirroring preference
This commit is contained in:
parent
9453b1269e
commit
7b067de4b9
1 changed files with 11 additions and 0 deletions
|
|
@ -176,6 +176,7 @@ import dailyIcon from '@/assets/svg/daily.svg';
|
|||
import todoIcon from '@/assets/svg/todo.svg';
|
||||
import rewardIcon from '@/assets/svg/reward.svg';
|
||||
|
||||
import * as Analytics from '@/libs/analytics';
|
||||
import { mapState } from '@/libs/store';
|
||||
|
||||
export default {
|
||||
|
|
@ -410,6 +411,16 @@ export default {
|
|||
return false;
|
||||
},
|
||||
changeMirrorPreference (newVal) {
|
||||
Analytics.track({
|
||||
eventName: 'mirror tasks',
|
||||
eventAction: 'mirror tasks',
|
||||
eventCategory: 'behavior',
|
||||
hitType: 'event',
|
||||
mirror: newVal,
|
||||
}, { trackOnClient: true });
|
||||
Analytics.updateUser({
|
||||
mirrorTasks: newVal,
|
||||
});
|
||||
this.$store.dispatch('user:set', {
|
||||
'preferences.tasks.mirrorGroupTasks': newVal,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue