From 2e3b4512b27e0246e2026b555f67f89cca5d9ee2 Mon Sep 17 00:00:00 2001 From: Dana Date: Mon, 25 Jan 2016 13:30:55 +0000 Subject: [PATCH] Force skip of analytics if no id --- node_modules/c9/skip-analytics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node_modules/c9/skip-analytics.js b/node_modules/c9/skip-analytics.js index 6c5fa421..3c75c62d 100644 --- a/node_modules/c9/skip-analytics.js +++ b/node_modules/c9/skip-analytics.js @@ -16,10 +16,10 @@ define(function(require, exports, module) { var user = userId; return skipAnalytics(user.id, user.name || user.username, user.email, name); // make it backwards compatible for the client } + + if (!userId) return true; // users without an id should never reach the Segment library if (!allowUnauthorized && userId === -1) return true; - - if (!userId) return true; if (hasInternalTestName(name)) return true; if (hasInternalDomain(email)) return true;