Closes #1179. Replace atom-beautify.general.analytics option with configuration option
This commit is contained in:
parent
06dcea04e9
commit
45a93451b6
|
@ -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)
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue