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) ->
|
track : (type, payload) ->
|
||||||
try
|
try
|
||||||
# Check if Analytics is enabled
|
# 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
|
# Setup Analytics
|
||||||
unless atom.config.get("atom-beautify.general._analyticsUserId")
|
unless atom.config.get("atom-beautify.general._analyticsUserId")
|
||||||
uuid = require("node-uuid")
|
uuid = require("node-uuid")
|
||||||
|
@ -267,6 +268,8 @@ module.exports = class Beautifiers extends EventEmitter
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@analytics[type](payload).send()
|
@analytics[type](payload).send()
|
||||||
|
else
|
||||||
|
logger.info("Analytics is disabled.")
|
||||||
catch error
|
catch error
|
||||||
logger.error(error)
|
logger.error(error)
|
||||||
|
|
||||||
|
|
|
@ -6,16 +6,6 @@ module.exports = {
|
||||||
order: -1
|
order: -1
|
||||||
description: 'General options for Atom Beautify'
|
description: 'General options for Atom Beautify'
|
||||||
properties:
|
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 :
|
_analyticsUserId :
|
||||||
title: 'Analytics User Id'
|
title: 'Analytics User Id'
|
||||||
type : 'string'
|
type : 'string'
|
||||||
|
|
Loading…
Reference in New Issue