Skip to content

Commit

Permalink
Closes #1179. Replace atom-beautify.general.analytics option with con…
Browse files Browse the repository at this point in the history
…figuration option
  • Loading branch information
Glavin001 committed Apr 20, 2017
1 parent 06dcea0 commit 45a9345
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
5 changes: 4 additions & 1 deletion src/beautifiers/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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)

Expand Down
10 changes: 0 additions & 10 deletions src/config.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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](https://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'
Expand Down

0 comments on commit 45a9345

Please sign in to comment.