This repository has been archived by the owner on Jan 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathfirefox-ios-homepage-experiment-sponsored-shortcuts.TOML
121 lines (98 loc) · 3.99 KB
/
firefox-ios-homepage-experiment-sponsored-shortcuts.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
# experiment: firefox-ios-homepage-experiment-sponsored-shortcuts
[experiment]
end_date = "2022-08-09"
# interested in users who are eligible for treatment in both branches: those that open homescreen
# these users also need to be in the countries where advertisements are live
# at first, this will just be the US
segments = ["opened_homescreen_in_US"]
[segments.data_sources.metrics]
from_expression = """(
SELECT
p.client_info.client_id as client_id,
CAST(p.submission_timestamp as DATE) as submission_date,
CASE WHEN metrics.labeled_counter.firefox_home_page_firefox_homepage_origin IS NOT NULL
AND metadata.geo.country IN ('US')
THEN 1 ELSE 0 END as inUS
FROM `mozdata.firefox_ios.metrics` p
)"""
[segments.opened_homescreen_in_US]
select_expression = """
COALESCE(CAST(MAX(inUS) AS BOOL), FALSE)
"""
data_source = "metrics"
[metrics]
daily = ["new_profile_retention",
"spoc_tiles_impressions", "spoc_tiles_clicks", "spoc_tiles_preference_toggled",
"pocket_section_impressions", "pocket_story_clicks"]
weekly = ["new_profile_retention",
"spoc_tiles_impressions", "spoc_tiles_clicks", "spoc_tiles_preference_toggled",
"pocket_section_impressions", "pocket_story_clicks"]
overall = ["spoc_tiles_impressions", "spoc_tiles_clicks", "spoc_tiles_preference_toggled",
"pocket_section_impressions", "pocket_story_clicks"]
### New Profile Retention
[metrics.new_profile_retention]
friendly_name = "New Profile Retention"
description = "New profiles defined as those first seen during the first week (enrollment period) of the experiment."
select_expression = """COALESCE(COUNT(
CASE WHEN PARSE_DATETIME('%Y %m %d %H:%M', REPLACE(REPLACE(client_info.first_run_date, '+', ' '), '-', ' ')) between '2022-06-07' and '2022-06-13'
THEN document_id ELSE NULL END), 0) > 0
"""
data_source = "baseline"
[metrics.new_profile_retention.statistics.binomial]
#### Copied rest of metrics from files in jetstream-config/outcomes/fenix
#### Metrics are not set to render for all experiments by default
[metrics.spoc_tiles_impressions]
friendly_name = "Sponsored Tiles Impressions"
description = "Number of times Contile Sponsored Tiles are shown."
select_expression = """
COALESCE(COUNTIF(
event.category like 'top_site%'
AND event.name = 'contile_impression'
),0)
"""
data_source = "events"
statistics = { bootstrap_mean = {}, deciles = {} }
[metrics.spoc_tiles_clicks]
friendly_name = "Sponsored Tiles Clicks"
description = "Number of times user clicked a Contile Sponsored Tile."
select_expression = """
COALESCE(COUNTIF(
event.category like 'top_site%'
AND event.name = 'contile_click'
),0)
"""
data_source = "events"
statistics = { bootstrap_mean = {}, deciles = {} }
[metrics.spoc_tiles_preference_toggled]
select_expression = """
COALESCE(SUM(CASE WHEN
event.category = 'preferences'
AND event.name = 'changed'
AND `mozfun.map.get_key`(event.extra, 'preference') = 'sponsoredTiles'
THEN 1 ELSE 0 END
),0)
"""
data_source = "events"
bigger_is_better = false
friendly_name = "Sponsored Tiles Preference Toggled"
description = "Number of times Contile Sponsored Tiles setting is flipped."
statistics = { bootstrap_mean = {}, deciles = {} }
[metrics.pocket_section_impressions]
friendly_name = "Pocket Impressions"
description = "Number of times Pocket content is shown on the home screen."
select_expression = """
COALESCE(SUM(
metrics.counter.pocket_section_impressions
),0)
"""
data_source = "metrics"
statistics = { bootstrap_mean = {}, deciles = {} }
[metrics.pocket_story_clicks]
friendly_name = "Pocket Story Clicks"
description = "Number of times user clicked on a Pocket story."
select_expression = """
SUM(COALESCE(`mozfun.map.get_key`(metrics.labeled_counter.pocket_open_story_origin, 'zero-search'),0) +
COALESCE(`mozfun.map.get_key`(metrics.labeled_counter.pocket_open_story_origin, 'origin-other'),0))
"""
data_source = "metrics"
statistics = { bootstrap_mean = {}, deciles = {} }