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

View File

@@ -7,7 +7,7 @@ import {
import { toNextLevel } from '../statHelpers';
import autoAllocate from './autoAllocate';
export default function updateStats (user, stats, req = {}, analytics) {
export default function updateStats (user, stats) {
let allocatedStatPoints;
let totalStatPoints;
let experienceToNextLevel;
@@ -88,15 +88,6 @@ export default function updateStats (user, stats, req = {}, analytics) {
};
if (user.markModified) user.markModified('items.quests');
if (analytics) {
analytics.track('acquire item', {
uuid: user._id,
itemKey: k,
acquireMethod: 'Level Drop',
category: 'behavior',
headers: req.headers,
});
}
user._tmp.drop = {
type: 'Quest',
key: k,