From 7ac5b229578c722c485ddbca6a5723eb267e54c1 Mon Sep 17 00:00:00 2001 From: Ian Bicking Date: Tue, 11 Oct 2016 16:00:44 -0500 Subject: [PATCH] Fix #1722, include the add-on version with all GA events --- addon/lib/req.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addon/lib/req.js b/addon/lib/req.js index 00522e005b..6052040399 100644 --- a/addon/lib/req.js +++ b/addon/lib/req.js @@ -1,5 +1,6 @@ const { Request } = require("sdk/request"); const user = require("./user"); +const self = require("sdk/self"); exports.request = function (url, options) { options.method = options.method || "get"; @@ -60,6 +61,9 @@ exports.sendEvent = function (action, label, options) { } } } + options = options || {}; + options.applicationName = "firefox"; + options.applicationVersion = self.version; console.info(`sendEvent ${event}/${action}/${label || 'none'} ${options ? JSON.stringify(options) : ""}`); exports.request(`${main.getBackend()}/event`, { method: "POST",