diff --git a/plugins/c9.vfs.server/vfs.server.js b/plugins/c9.vfs.server/vfs.server.js index b4ad74ba..538d5498 100644 --- a/plugins/c9.vfs.server/vfs.server.js +++ b/plugins/c9.vfs.server/vfs.server.js @@ -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)