Close #1086. Add User-Agent to Google Analytics

This commit is contained in:
Glavin Wiechert 2016-07-22 21:35:44 -03:00
parent fd1a5cba50
commit 4ba714940d
1 changed files with 5 additions and 1 deletions

View File

@ -218,7 +218,11 @@ module.exports = class Beautifiers extends EventEmitter
atom.config.set "atom-beautify.general._analyticsUserId", uuid.v4()
# Setup Analytics User Id
userId = atom.config.get("atom-beautify.general._analyticsUserId")
@analytics ?= new ua(trackingId, userId)
@analytics ?= new ua(trackingId, userId, {
headers: {
"User-Agent": navigator.userAgent
}
})
@analytics[type](payload).send()
catch error
logger.error(error)