mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
chore(analytics): various updates to analytics tracking
This commit is contained in:
@@ -11,7 +11,7 @@ function markNotificationAsRead (user) {
|
||||
if (index !== -1) user.notifications.splice(index, 1);
|
||||
}
|
||||
|
||||
export default function openMysteryItem (user, req = {}, analytics) {
|
||||
export default function openMysteryItem (user, req = {}) {
|
||||
const { mysteryItems } = user.purchased.plan;
|
||||
let item = mysteryItems.shift();
|
||||
|
||||
@@ -33,17 +33,6 @@ export default function openMysteryItem (user, req = {}, analytics) {
|
||||
user.markModified('items.gear.owned');
|
||||
}
|
||||
|
||||
if (analytics) {
|
||||
analytics.track('open mystery item', {
|
||||
uuid: user._id,
|
||||
itemKey: item,
|
||||
itemType: 'Subscriber Gear',
|
||||
acquireMethod: 'Subscriber',
|
||||
category: 'behavior',
|
||||
headers: req.headers,
|
||||
});
|
||||
}
|
||||
|
||||
return [
|
||||
item,
|
||||
i18n.t('mysteryItemOpened', req.language),
|
||||
|
||||
Reference in New Issue
Block a user