Skip to content

Commit 27955f6

Browse files
committed
Bug 1877788 - Record reach for all messaging experiment features r=omc-reviewers,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D203829
1 parent e727b07 commit 27955f6

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

browser/components/asrouter/modules/ASRouter.sys.mjs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,10 @@ const TOPIC_EXPERIMENT_ENROLLMENT_CHANGED = "nimbus:enrollments-updated";
106106
const USE_REMOTE_L10N_PREF =
107107
"browser.newtabpage.activity-stream.asrouter.useRemoteL10n";
108108

109-
// Experiment groups that need to report the reach event in Messaging-Experiments.
110-
// If you're adding new groups to it, make sure they're also added in the
111-
// `messaging_experiments.reach.objects` defined in "toolkit/components/telemetry/Events.yaml"
112-
const REACH_EVENT_GROUPS = [
113-
"cfr",
114-
"moments-page",
115-
"infobar",
116-
"spotlight",
117-
"featureCallout",
118-
];
119109
const REACH_EVENT_CATEGORY = "messaging_experiments";
120110
const REACH_EVENT_METHOD = "reach";
111+
// Reach for the pbNewtab feature will be added in bug 1755401
112+
const NO_REACH_EVENT_GROUPS = ["pbNewtab"];
121113

122114
export const MessageLoaderUtils = {
123115
STARTPAGE_VERSION,
@@ -405,7 +397,11 @@ export const MessageLoaderUtils = {
405397
// Add Reach messages from unenrolled sibling branches, provided we are
406398
// recording Reach events for this feature. If we are in a rollout, we do
407399
// not have sibling branches.
408-
if (!REACH_EVENT_GROUPS.includes(featureId) || !experimentData) {
400+
if (
401+
NO_REACH_EVENT_GROUPS.includes(featureId) ||
402+
!MESSAGING_EXPERIMENTS_DEFAULT_FEATURES.includes(featureId) ||
403+
!experimentData
404+
) {
409405
continue;
410406
}
411407

browser/components/asrouter/modules/MessagingExperimentConstants.sys.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
* FeatureManifest.yaml. Conversely, messaging experiment features contain
1616
* actual messages, with the usual message keys like `template` and `targeting`.
1717
* @see FeatureManifest.yaml
18+
* Messages delivered through these feature IDs record reach events, with the
19+
* exception of "pbNewtab". If you're adding new features to this list, make
20+
* sure they're also added in the `messaging_experiments.reach.objects` defined
21+
* in "toolkit/components/telemetry/Events.yaml"
1822
*/
1923
export const MESSAGING_EXPERIMENTS_DEFAULT_FEATURES = [
2024
"cfr",

toolkit/components/telemetry/Events.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,18 @@ messaging_experiments:
15501550
"moments_page",
15511551
"infobar",
15521552
"spotlight",
1553-
"featureCallout"
1553+
"featureCallout",
1554+
"fxms_message_1",
1555+
"fxms_message_2",
1556+
"fxms_message_3",
1557+
"fxms_message_4",
1558+
"fxms_message_5",
1559+
"fxms_message_6",
1560+
"fxms_message_7",
1561+
"fxms_message_8",
1562+
"fxms_message_9",
1563+
"fxms_message_10",
1564+
"fxms_message_11"
15541565
]
15551566
methods: ["reach"]
15561567
release_channel_collection: opt-out

0 commit comments

Comments
 (0)