From bdd0996401367b1c9b9a69c5325c774298b19abd Mon Sep 17 00:00:00 2001 From: groovecoder Date: Wed, 26 Jul 2017 14:48:48 -0500 Subject: [PATCH] restore study.name payload property --- docs/metrics.md | 6 ++++++ lib/index.js | 3 +++ lib/study.js | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/metrics.md b/docs/metrics.md index b2da364..4dcc66a 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -32,6 +32,7 @@ portion of a `shield-study` telemetry ping for each scenario. ```js { + "study": "@shield-study-privacy", "branch": "thirdPartyCookiesOnlyFromVisited", "event": "page-works", "originDomain": "www.redditmedia.com", @@ -44,6 +45,7 @@ portion of a `shield-study` telemetry ping for each scenario. ```js { + "study": "@shield-study-privacy", "branch": "thirdPartyCookiesOnlyFromVisited", "event": "page-problem", "originDomain": "www.redditmedia.com", @@ -56,6 +58,7 @@ portion of a `shield-study` telemetry ping for each scenario. ```js { + "study": "@shield-study-privacy", "branch": "thirdPartyCookiesOnlyFromVisited", "event": "breakage", "originDomain": "redditmedia.com", @@ -68,6 +71,7 @@ portion of a `shield-study` telemetry ping for each scenario. ```js { + "study": "@shield-study-privacy", "branch": "thirdPartyCookiesOnlyFromVisited", "event": "notes", "originDomain": "redditmedia.com", @@ -80,6 +84,7 @@ portion of a `shield-study` telemetry ping for each scenario. ``` { + "study": "@shield-study-privacy", "branch": "thirdPartyCookiesOnlyFromVisited", "originDomain": "redditmedia.com", "event": "disable", @@ -93,6 +98,7 @@ portion of a `shield-study` telemetry ping for each scenario. ```lua local schema = { -- column name field type length attributes field name + {"study", "VARCHAR", 255, nil, "Fields[payload.study]"}, {"branch", "VARCHAR", 255, nil, "Fields[payload.branch]"}, {"event", "VARCHAR", 255, nil, "Fields[payload.event]"}, {"originDomain", "VARCHAR", 255, nil, "Fields[payload.originDomain]"}, diff --git a/lib/index.js b/lib/index.js index 634d391..ee0d008 100644 --- a/lib/index.js +++ b/lib/index.js @@ -87,6 +87,7 @@ let panel = Panel({ panel.port.on('hostReport', function (message) { let telemetryPingMessage = { + study: study.config.name, branch: study.variation, originDomain: getDomainFromActiveTabUrl(), event: message.feedback, @@ -103,6 +104,7 @@ function getDomainFromActiveTabUrl () { function reportBreakageOrNotes (message) { let notesSubmission = message.hasOwnProperty('notes'); let telemetryPingMessage = { + study: study.config.name, branch: study.variation, originDomain: getDomainFromActiveTabUrl(), event: 'breakage', @@ -130,6 +132,7 @@ function handleHide () { async function disableAddon () { const addon = await AddonManager.getAddonByID(self.id) let telemetryPingMessage = { + study: study.config.name, branch: study.variation, originDomain: getDomainFromActiveTabUrl(), event: 'disable', diff --git a/lib/study.js b/lib/study.js index cdf5706..ff3ee5a 100644 --- a/lib/study.js +++ b/lib/study.js @@ -9,7 +9,7 @@ const feature = require('./feature'); const surveyUrl = 'https://qsurvey.mozilla.com/s3/shield-privset-1'; const studyConfig = { - name: self.addonId, + name: self.id, days: 28, surveyUrls: { 'end-of-study': surveyUrl,