Merge pull request #5353 from gisikw/only-mixpanel-prod

Server-side mixpanel should only load in a production env
This commit is contained in:
Blade Barringer
2015-06-10 08:52:08 -05:00
+5 -2
View File
@@ -179,8 +179,11 @@ module.exports.setupConfig = function(){
baseUrl = nconf.get('BASE_URL');
module.exports.ga = require('universal-analytics')(nconf.get('GA_ID'));
var mixpanel = require('mixpanel')
module.exports.mixpanel = mixpanel.init(nconf.get('MP_ID'));
var mixpanel = isProd && require('mixpanel');
module.exports.mixpanel = mixpanel
? mixpanel.init(nconf.get('MP_ID'))
: { track: function() {} };
};
var algorithm = 'aes-256-ctr';