From 4ba714940dd257faa90f8c0aa0105fb99628be7b Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Fri, 22 Jul 2016 21:35:44 -0300 Subject: [PATCH] Close #1086. Add User-Agent to Google Analytics --- src/beautifiers/index.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/beautifiers/index.coffee b/src/beautifiers/index.coffee index 784ffec..0d29b66 100644 --- a/src/beautifiers/index.coffee +++ b/src/beautifiers/index.coffee @@ -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)