Merge pull request +11738 from c9/add-extra-guards-analytics

Add extra guards for users without id or with old uid
pull/242/head
Dana Ivan 2016-01-21 10:48:19 +01:00
commit 01e3259677
1 zmienionych plików z 2 dodań i 0 usunięć

2
node_modules/c9/skip-analytics.js wygenerowano vendored
Wyświetl plik

@ -13,6 +13,8 @@ define(function(require, exports, module) {
function skipAnalytics(user, allowUnauthorized) {
if (!user) return true;
if (!user.id && !user.uid) return true; // users without an id should never reach the Segment library
if (!allowUnauthorized && hasUnauthorizedId(user)) return true;
if (hasInternalTestName(user)) return true;