From 45a93451b638b08d9c234d75a269ce0033955609 Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Thu, 20 Apr 2017 02:46:07 -0300 Subject: [PATCH] Closes #1179. Replace atom-beautify.general.analytics option with configuration option --- src/beautifiers/index.coffee | 5 ++++- src/config.coffee | 10 ---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/beautifiers/index.coffee b/src/beautifiers/index.coffee index 8d6d227..3c3f06d 100644 --- a/src/beautifiers/index.coffee +++ b/src/beautifiers/index.coffee @@ -254,7 +254,8 @@ module.exports = class Beautifiers extends EventEmitter track : (type, payload) -> try # Check if Analytics is enabled - if atom.config.get("atom-beautify.general.analytics") + if atom.config.get("core.telemetryConsent") is "limited" + logger.info("Analytics is enabled.") # Setup Analytics unless atom.config.get("atom-beautify.general._analyticsUserId") uuid = require("node-uuid") @@ -267,6 +268,8 @@ module.exports = class Beautifiers extends EventEmitter } }) @analytics[type](payload).send() + else + logger.info("Analytics is disabled.") catch error logger.error(error) diff --git a/src/config.coffee b/src/config.coffee index 5c6ceaf..2b00226 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -6,16 +6,6 @@ module.exports = { order: -1 description: 'General options for Atom Beautify' properties: - analytics : - title: 'Anonymous Analytics' - type : 'boolean' - default : true - description : "[Google - Analytics](http://www.google.com/analytics/) is used to track what languages are being - used the most and causing the most errors, as well as other stats such as performance. - Everything is anonymized and no personal - information, such as source code, is sent. - See https://github.com/Glavin001/atom-beautify/issues/47 for more details." _analyticsUserId : title: 'Analytics User Id' type : 'string'