mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
fix(analytics): correct formatting for client events
Also corrects end date in Bird Buddies string
This commit is contained in:
@@ -89,7 +89,6 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import * as Analytics from '@/libs/analytics';
|
||||
import { mapState } from '@/libs/store';
|
||||
import BaseBanner from './base';
|
||||
|
||||
@@ -118,14 +117,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
openGemsModal () {
|
||||
Analytics.track({
|
||||
hitType: 'event',
|
||||
eventCategory: 'button',
|
||||
eventAction: 'click',
|
||||
eventLabel: 'Gems Promo Banner',
|
||||
});
|
||||
|
||||
this.$root.$emit('bv::show::modal', 'buy-gems', { alreadyTracked: true });
|
||||
this.$root.$emit('bv::show::modal', 'buy-gems');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import * as Analytics from '@/libs/analytics';
|
||||
import { mapState } from '@/libs/store';
|
||||
import BaseBanner from './base';
|
||||
|
||||
@@ -95,13 +94,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
showSelectUser () {
|
||||
Analytics.track({
|
||||
hitType: 'event',
|
||||
eventCategory: 'button',
|
||||
eventAction: 'click',
|
||||
eventLabel: 'Gift Promo Banner',
|
||||
});
|
||||
|
||||
this.$root.$emit('bv::show::modal', 'select-user-modal');
|
||||
},
|
||||
},
|
||||
|
||||
@@ -74,17 +74,19 @@ export default {
|
||||
|
||||
const tasksScoredCount = getLocalSetting(CONSTANTS.keyConstants.TASKS_SCORED_COUNT);
|
||||
if (!tasksScoredCount || tasksScoredCount < 2) {
|
||||
Analytics.track('task scored', {
|
||||
uuid: user._id,
|
||||
Analytics.track({
|
||||
eventName: 'task scored',
|
||||
eventAction: 'click',
|
||||
eventCategory: 'behavior',
|
||||
hitType: 'event',
|
||||
category: 'behavior',
|
||||
uuid: user._id,
|
||||
taskType: task.type,
|
||||
direction,
|
||||
});
|
||||
if (!tasksScoredCount) {
|
||||
setLocalSetting(CONSTANTS.keyConstants.TASKS_SCORED_COUNT, 1);
|
||||
} else {
|
||||
setLocalSetting(CONSTANTS.keyConstants.TASKS_SCORED_COUNT, tasksScoredCount + 1);
|
||||
setLocalSetting(CONSTANTS.keyConstants.TASKS_SCORED_COUNT, Number(tasksScoredCount) + 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -113,16 +113,18 @@ export async function create (store, createdTask) {
|
||||
const tasksCreatedCount = getLocalSetting(CONSTANTS.keyConstants.TASKS_CREATED_COUNT);
|
||||
if (!tasksCreatedCount || tasksCreatedCount < 2) {
|
||||
const uuid = store.state.user.data._id;
|
||||
Analytics.track('task created', {
|
||||
uuid,
|
||||
Analytics.track({
|
||||
eventName: 'task created',
|
||||
eventAction: 'click',
|
||||
eventCategory: 'behavior',
|
||||
hitType: 'event',
|
||||
category: 'behavior',
|
||||
uuid,
|
||||
taskType: taskRes.type,
|
||||
});
|
||||
if (!tasksCreatedCount) {
|
||||
setLocalSetting(CONSTANTS.keyConstants.TASKS_CREATED_COUNT, 1);
|
||||
} else {
|
||||
setLocalSetting(CONSTANTS.keyConstants.TASKS_CREATED_COUNT, tasksCreatedCount + 1);
|
||||
setLocalSetting(CONSTANTS.keyConstants.TASKS_CREATED_COUNT, Number(tasksCreatedCount) + 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -732,7 +732,7 @@
|
||||
"oddballsNotes": "Contains 'The Jelly Regent,' 'Escape the Cave Creature,' and 'A Tangled Yarn.' Available until April 30.",
|
||||
|
||||
"birdBuddiesText": "Bird Buddies Quest Bundle",
|
||||
"birdBuddiesNotes": "Contains 'The Fowl Frost,' 'Rooster Rampage,' and 'The Push-and-Pull Peacock.' Available until December 31.",
|
||||
"birdBuddiesNotes": "Contains 'The Fowl Frost,' 'Rooster Rampage,' and 'The Push-and-Pull Peacock.' Available until September 30.",
|
||||
|
||||
"questVelociraptorText": "The Veloci-Rapper",
|
||||
"questVelociraptorNotes": "You’re sharing honey cakes with @*~Seraphina~*, @Procyon P, and @Lilith of Alfheim by a lake in the Stoïkalm Steppes. Suddenly, a mournful voice interrupts your picnic.<br><br><em>My Habits took a hit, I missed my Dailies,<br>I’m losing it, sinking with doubt and maybes,<br>At the top of my game I used to be so fly,<br>But now I just let my Due Dates go by.</em><br><br>@*~Seraphina~* peers behind a stand of grass. “It’s the Veloci-Rapper. It seems... distraught?”<br><br>You pump a fist in determination. “There's only one thing to do. Rap battle time!”",
|
||||
|
||||
Reference in New Issue
Block a user