Add old tracking for now

This commit is contained in:
Nikolai Onken 2015-09-15 01:22:26 +00:00
parent ed4f39990e
commit b2d1acdc1e

View File

@ -328,6 +328,15 @@ function plugin(options, imports, register) {
if (new Date(user.lastVfsAccess).getDate() != new Date().getDate() ||
Date.now() > user.lastVfsAccess + VFS_ACTIVITY_WINDOW) {
// Keeping this temporarily to be replaced by API request only
async.series([
analytics.aliasClean.bind(analytics, req.cookies.mixpanelAnonymousId, user.id),
analytics.identifyClean.bind(analytics, user, {}),
analytics.trackClean.bind(analytics, user, "VFS is active", { uid: user.id }),
], function(err) {
if (err) return console.log("Error logging activity", err.stack || err);
});
superagent
.post(options.apiBaseUrl + "/metric/usage/" + req.params.pid + "?access_token=" + req.query.access_token)