Merge pull request #1403 from realm/tg/skip-analytics-modules
Check for REALM_DISABLE_ANALYTICS earlier in submit-analytics.js
This commit is contained in:
commit
6bc5a45272
|
@ -25,6 +25,11 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
if ('REALM_DISABLE_ANALYTICS' in process.env) {
|
||||||
|
module.exports = function(){};
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const os = require('os');
|
const os = require('os');
|
||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
@ -69,9 +74,6 @@ function getAnonymizedMachineIdentifier() {
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function(eventName) {
|
module.exports = function(eventName) {
|
||||||
if ('REALM_DISABLE_ANALYTICS' in process.env)
|
|
||||||
return;
|
|
||||||
|
|
||||||
const identifier = getAnonymizedMachineIdentifier();
|
const identifier = getAnonymizedMachineIdentifier();
|
||||||
const payload = {
|
const payload = {
|
||||||
'event': eventName,
|
'event': eventName,
|
||||||
|
|
Loading…
Reference in New Issue