From 21708d5be665b9c51c5e6148c59a7ec4914722ba Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Thu, 10 Mar 2022 11:17:25 -0800 Subject: [PATCH 1/4] Sync facebook-pixel-hunt data with latest from study-remote-settings https://github.com/mozilla-rally/study-remote-settings/commit/9d4ed6c7eae0ff5a1dec406d9b8ed5b9592d4ffe --- functions/src/studies.ts | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/functions/src/studies.ts b/functions/src/studies.ts index 881baa2e..b2e3b118 100644 --- a/functions/src/studies.ts +++ b/functions/src/studies.ts @@ -1,20 +1,33 @@ export const studies = { - exampleStudy1: { - name: "Rally Test", - icons: {}, + facebookPixelHunt: { + name: "Facebook Pixel Hunt", + icons: { + "32": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-32.png", + "64": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-64.png", + "128": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-128.png" + }, authors: { - name: "Rally Devs", + name: "Mozilla Rally and the Markup", }, - version: "0.0.1", - addonId: "abc123", - studyId: "exampleStudy1", - downloadLink: "http://example.com", - endDate: "2021-10-27", + version: "0.2.0", + firefoxAddonId: "facebook-pixel-hunt@rally.mozilla.org", + chromeExtensionId: "pbeklachfkbjddmglcccopmknmpfchdm", + studyId: "facebookPixelHunt ", + downloadLink: "https://chrome.google.com/webstore/detail/facebook-pixel-hunt/pbeklachfkbjddmglcccopmknmpfchdm", + endDate: "2022-07-13", studyEnded: false, studyPaused: false, - description: "Test", - studyDetailsLink: "http://example.com", - dataCollectionDetails: ["Nothing"], - tags: ["test"], + description: "According to its own policy, Facebook may collect information about you across the web even if you don\u2019t have a Facebook account. One way Facebook performs this tracking is through a network of \u201Cpixels\u201D that may be installed on many of the sites you visit. By joining this study, you will help Rally and The Markup investigate and report on where Facebook is tracking you and what kind of information they are collecting.", + studyDetailsLink: "https://rally.mozilla.org/current-studies/facebook-pixel-hunt/index.html", + dataCollectionDetails: [ + "The data sent to Facebook through Facebook Pixels", + "The URLs of the web pages you browse", + "The time you spend browsing pages", + "The presence of Facebook login cookies in your browser", + "A study survey that the user completes" + ], + tags: [ + "social media" + ], }, }; From 7cab5e46f25620b2e36dd353cb4c7faa49b4339b Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Thu, 10 Mar 2022 14:28:24 -0800 Subject: [PATCH 2/4] add dev/stage/prod structure --- functions/src/studies.ts | 62 +++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/functions/src/studies.ts b/functions/src/studies.ts index b2e3b118..2af241f8 100644 --- a/functions/src/studies.ts +++ b/functions/src/studies.ts @@ -1,33 +1,37 @@ export const studies = { - facebookPixelHunt: { - name: "Facebook Pixel Hunt", - icons: { - "32": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-32.png", - "64": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-64.png", - "128": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-128.png" + dev: {}, + stage: { + facebookPixelHunt: { + name: "Facebook Pixel Hunt", + icons: { + "32": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-32.png", + "64": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-64.png", + "128": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-128.png" + }, + authors: { + name: "Mozilla Rally and the Markup", + }, + version: "0.2.0", + firefoxAddonId: "facebook-pixel-hunt@rally.mozilla.org", + chromeExtensionId: "pbeklachfkbjddmglcccopmknmpfchdm", + studyId: "facebookPixelHunt ", + downloadLink: "https://chrome.google.com/webstore/detail/facebook-pixel-hunt/pbeklachfkbjddmglcccopmknmpfchdm", + endDate: "2022-07-13", + studyEnded: false, + studyPaused: false, + description: "According to its own policy, Facebook may collect information about you across the web even if you don\u2019t have a Facebook account. One way Facebook performs this tracking is through a network of \u201Cpixels\u201D that may be installed on many of the sites you visit. By joining this study, you will help Rally and The Markup investigate and report on where Facebook is tracking you and what kind of information they are collecting.", + studyDetailsLink: "https://rally.mozilla.org/current-studies/facebook-pixel-hunt/index.html", + dataCollectionDetails: [ + "The data sent to Facebook through Facebook Pixels", + "The URLs of the web pages you browse", + "The time you spend browsing pages", + "The presence of Facebook login cookies in your browser", + "A study survey that the user completes" + ], + tags: [ + "social media" + ], }, - authors: { - name: "Mozilla Rally and the Markup", - }, - version: "0.2.0", - firefoxAddonId: "facebook-pixel-hunt@rally.mozilla.org", - chromeExtensionId: "pbeklachfkbjddmglcccopmknmpfchdm", - studyId: "facebookPixelHunt ", - downloadLink: "https://chrome.google.com/webstore/detail/facebook-pixel-hunt/pbeklachfkbjddmglcccopmknmpfchdm", - endDate: "2022-07-13", - studyEnded: false, - studyPaused: false, - description: "According to its own policy, Facebook may collect information about you across the web even if you don\u2019t have a Facebook account. One way Facebook performs this tracking is through a network of \u201Cpixels\u201D that may be installed on many of the sites you visit. By joining this study, you will help Rally and The Markup investigate and report on where Facebook is tracking you and what kind of information they are collecting.", - studyDetailsLink: "https://rally.mozilla.org/current-studies/facebook-pixel-hunt/index.html", - dataCollectionDetails: [ - "The data sent to Facebook through Facebook Pixels", - "The URLs of the web pages you browse", - "The time you spend browsing pages", - "The presence of Facebook login cookies in your browser", - "A study survey that the user completes" - ], - tags: [ - "social media" - ], }, + prod: {} }; From 2f787770d5bcba0998c46079eea52490e0bd3d9e Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Wed, 11 May 2022 09:12:22 -0700 Subject: [PATCH 3/4] use facebookPixelHunt ID for tests --- functions/src/__tests__/index.test.ts | 2 +- functions/src/studies.ts | 62 +++++++++---------- tests/integration/extension/src/background.ts | 2 +- 3 files changed, 31 insertions(+), 35 deletions(-) diff --git a/functions/src/__tests__/index.test.ts b/functions/src/__tests__/index.test.ts index 29b9dc3a..115cf606 100644 --- a/functions/src/__tests__/index.test.ts +++ b/functions/src/__tests__/index.test.ts @@ -69,7 +69,7 @@ describe("loadFirestore", () => { expect(userStudyDocs.docs.length).toBe(1); - expect(userStudyDocs.docs[0].data()).toEqual(studies.exampleStudy1); + expect(userStudyDocs.docs[0].data()).toEqual(studies.facebookPixelHunt); }); }); diff --git a/functions/src/studies.ts b/functions/src/studies.ts index 2af241f8..b2e3b118 100644 --- a/functions/src/studies.ts +++ b/functions/src/studies.ts @@ -1,37 +1,33 @@ export const studies = { - dev: {}, - stage: { - facebookPixelHunt: { - name: "Facebook Pixel Hunt", - icons: { - "32": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-32.png", - "64": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-64.png", - "128": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-128.png" - }, - authors: { - name: "Mozilla Rally and the Markup", - }, - version: "0.2.0", - firefoxAddonId: "facebook-pixel-hunt@rally.mozilla.org", - chromeExtensionId: "pbeklachfkbjddmglcccopmknmpfchdm", - studyId: "facebookPixelHunt ", - downloadLink: "https://chrome.google.com/webstore/detail/facebook-pixel-hunt/pbeklachfkbjddmglcccopmknmpfchdm", - endDate: "2022-07-13", - studyEnded: false, - studyPaused: false, - description: "According to its own policy, Facebook may collect information about you across the web even if you don\u2019t have a Facebook account. One way Facebook performs this tracking is through a network of \u201Cpixels\u201D that may be installed on many of the sites you visit. By joining this study, you will help Rally and The Markup investigate and report on where Facebook is tracking you and what kind of information they are collecting.", - studyDetailsLink: "https://rally.mozilla.org/current-studies/facebook-pixel-hunt/index.html", - dataCollectionDetails: [ - "The data sent to Facebook through Facebook Pixels", - "The URLs of the web pages you browse", - "The time you spend browsing pages", - "The presence of Facebook login cookies in your browser", - "A study survey that the user completes" - ], - tags: [ - "social media" - ], + facebookPixelHunt: { + name: "Facebook Pixel Hunt", + icons: { + "32": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-32.png", + "64": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-64.png", + "128": "https://addons.mozilla.org/user-media/addon_icons/2732/2732005-128.png" }, + authors: { + name: "Mozilla Rally and the Markup", + }, + version: "0.2.0", + firefoxAddonId: "facebook-pixel-hunt@rally.mozilla.org", + chromeExtensionId: "pbeklachfkbjddmglcccopmknmpfchdm", + studyId: "facebookPixelHunt ", + downloadLink: "https://chrome.google.com/webstore/detail/facebook-pixel-hunt/pbeklachfkbjddmglcccopmknmpfchdm", + endDate: "2022-07-13", + studyEnded: false, + studyPaused: false, + description: "According to its own policy, Facebook may collect information about you across the web even if you don\u2019t have a Facebook account. One way Facebook performs this tracking is through a network of \u201Cpixels\u201D that may be installed on many of the sites you visit. By joining this study, you will help Rally and The Markup investigate and report on where Facebook is tracking you and what kind of information they are collecting.", + studyDetailsLink: "https://rally.mozilla.org/current-studies/facebook-pixel-hunt/index.html", + dataCollectionDetails: [ + "The data sent to Facebook through Facebook Pixels", + "The URLs of the web pages you browse", + "The time you spend browsing pages", + "The presence of Facebook login cookies in your browser", + "A study survey that the user completes" + ], + tags: [ + "social media" + ], }, - prod: {} }; diff --git a/tests/integration/extension/src/background.ts b/tests/integration/extension/src/background.ts index ec086049..fdb53abd 100644 --- a/tests/integration/extension/src/background.ts +++ b/tests/integration/extension/src/background.ts @@ -2,7 +2,7 @@ import { Rally, RunStates } from "@mozilla/rally-sdk"; const enableDevMode = false; const rallySite = "http://localhost:5000"; -const studyId = "exampleStudy1"; +const studyId = "facebookPixelHunt"; // TODO load from JSON file in /config/ const firebaseConfig = { From b6ed6152d3e86f62b1f8134a639e3d15f8680ba1 Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Wed, 11 May 2022 09:58:49 -0700 Subject: [PATCH 4/4] correct studyId --- functions/src/studies.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/src/studies.ts b/functions/src/studies.ts index b2e3b118..5bf5842d 100644 --- a/functions/src/studies.ts +++ b/functions/src/studies.ts @@ -12,7 +12,7 @@ export const studies = { version: "0.2.0", firefoxAddonId: "facebook-pixel-hunt@rally.mozilla.org", chromeExtensionId: "pbeklachfkbjddmglcccopmknmpfchdm", - studyId: "facebookPixelHunt ", + studyId: "facebookPixelHunt", downloadLink: "https://chrome.google.com/webstore/detail/facebook-pixel-hunt/pbeklachfkbjddmglcccopmknmpfchdm", endDate: "2022-07-13", studyEnded: false,