forked from mozilla/jetstream-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom-messaging-in-aboutwelcome-for-chrome-users-to-import.toml
136 lines (121 loc) · 5.03 KB
/
custom-messaging-in-aboutwelcome-for-chrome-users-to-import.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
[metrics]
# Most of these metrics "should" only increment on the first day the brower's used.
# Report them weekly so that we get an early readout.
# This gives us a bit of time to receive all of the telemetry from our onboarders
# (expecting to receive every ping on day 0 is probably a losing game)
# without making us wait a month for numbers.
weekly = [
"opened_migration_wizard",
"imported_from_chrome",
"imported_from_any_browser",
"import_impression",
"import_button_clicks",
"theme_impression",
"exposed_treatment_a",
"exposed_treatment_b",
"exposed_control",
]
overall = [
"opened_migration_wizard",
"imported_from_chrome",
"imported_from_any_browser",
"import_impression",
"import_button_clicks",
"theme_impression",
"exposed_treatment_a",
"exposed_treatment_b",
"exposed_control",
]
# Key outcomes
[metrics.opened_migration_wizard]
select_expression = """COALESCE(SUM(
(SELECT SUM(value) FROM UNNEST(mozfun.hist.extract(payload.histograms.fx_migration_entry_point).values))
), 0) > 0"""
data_source = "main"
statistics = { binomial = {} }
friendly_name = "Opened import wizard"
description = "Fraction of clients that opened the import wizard"
[metrics.imported_from_chrome]
select_expression = "COALESCE(SUM(IF(browser = 'chrome', items, 0)), 0) > 0"
data_source = "imports"
statistics = { binomial = {} }
friendly_name = "Chrome importers"
description = "Fraction of clients that imported at least one item from Chrome."
[metrics.imported_from_any_browser]
select_expression = "COALESCE(SUM(IF(browser != 'firefox', items, 0)), 0) > 0"
data_source = "imports"
statistics = { binomial = {} }
friendly_name = "Importers"
description = "Fraction of clients that imported at least one item from a non-Firefox browser."
# Funnel
[metrics.import_impression]
select_expression = "COALESCE(LOGICAL_OR(event = 'IMPRESSION' AND ENDS_WITH(message_id, 'AW_IMPORT_SETTINGS')), FALSE)"
data_source = "onboarding"
statistics = { binomial = {} }
friendly_name = "Saw import screen (screen 2)"
description = "Fraction of clients that advanced to the import settings screen. Should go to zero after week 0."
[metrics.import_button_clicks]
select_expression = """COALESCE(LOGICAL_OR(
event = 'CLICK_BUTTON'
AND ENDS_WITH(message_id, 'AW_IMPORT_SETTINGS')
AND JSON_EXTRACT_SCALAR(event_context, '$.source') = 'primary_button')
, FALSE)"""
data_source = "onboarding"
statistics = { binomial = {} }
friendly_name = "Opened import wizard from AW prompt"
description = "Fraction of clients that opened the import wizard from the about:welcome prompt. Should go to zero after week 0."
[metrics.theme_impression]
select_expression = "COALESCE(LOGICAL_OR(event = 'IMPRESSION' AND ENDS_WITH(message_id, 'AW_CHOOSE_THEME')), FALSE)"
data_source = "onboarding"
statistics = { binomial = {} }
friendly_name = "Saw theme chooser screen (screen 3)"
description = "Fraction of clients that advanced to the theme chooser screen. Should go to zero after week 0."
# Some simple consistency metrics. These should all be ~zeroes after the first week.
# Is there a simpler way to write these?
[metrics.exposed_treatment_a]
select_expression = "COALESCE(LOGICAL_OR(event = 'IMPRESSION' AND message_id = 'MSW-CHROME-A'), FALSE)"
data_source = "onboarding"
statistics = { binomial = {} }
friendly_name = "Saw Treatment A"
description = "Fraction of clients that saw Treatment A. Should go to zero after week 0."
[metrics.exposed_treatment_b]
select_expression = "COALESCE(LOGICAL_OR(event = 'IMPRESSION' AND message_id = 'MSW-CHROME-B'), FALSE)"
data_source = "onboarding"
statistics = { binomial = {} }
friendly_name = "Saw Treatment B"
description = "Fraction of clients that saw Treatment B. Should go to zero after week 0."
[metrics.exposed_control]
select_expression = "COALESCE(LOGICAL_OR(event = 'IMPRESSION' AND message_id = 'MSW-DEFAULT'), FALSE)"
data_source = "onboarding"
statistics = { binomial = {} }
friendly_name = "Saw control treatment"
description = "Fraction of clients that saw the default about:welcome cards. Should go to zero after week 0."
[data_sources.imports]
from_expression = """
(
SELECT
DATE(submission_timestamp) AS submission_date,
client_id,
environment.experiments,
stretch.entity,
kh.key AS browser,
mozfun.hist.extract(kh.value).sum AS items
FROM mozdata.telemetry.main
CROSS JOIN UNNEST([
STRUCT(payload.keyed_histograms.fx_migration_bookmarks_quantity AS histogram, "bookmarks" AS entity),
(payload.keyed_histograms.fx_migration_logins_quantity, "logins"),
(payload.keyed_histograms.fx_migration_history_quantity, "history")
]) AS stretch
CROSS JOIN UNNEST(stretch.histogram) AS kh
)
"""
experiments_column_type = "native"
[data_sources.onboarding]
from_expression = """
(
SELECT
*,
DATE(submission_timestamp) AS submission_date
FROM mozdata.messaging_system.onboarding
)"""
experiments_column_type = "native"