diff --git a/node_modules/c9/skip-analytics.js b/node_modules/c9/skip-analytics.js index 12e2757b..4a64d0d6 100644 --- a/node_modules/c9/skip-analytics.js +++ b/node_modules/c9/skip-analytics.js @@ -10,16 +10,21 @@ define(function(require, exports, module) { var hasInternalDomain = require("c9/has-internal-domain"); var hasInternalTestName = require("c9/has-internal-test-name"); - function skipAnalytics(user) { + function skipAnalytics(user, allowUnauthorized) { if (!user) return true; - if (user.id === -1) return true; - if (!user.id && user.uid === -1) return true; + if (!allowUnauthorized && hasUnauthorizedId(user)) return true; if (hasInternalTestName(user)) return true; if (hasInternalDomain(user.email)) return true; return false; } + function hasUnauthorizedId(user) { + if (user.id === -1) return true; + + if (!user.id && user.uid === -1) return true; + } + module.exports = skipAnalytics; }); \ No newline at end of file