@@ -503,8 +503,8 @@ data_source = "fenix_engagement_view"
503503select_expression = " SUM(dau) / SUM(mau)"
504504type = " scalar"
505505description = """
506- The Engagement Rate is calculated as the ratio between DAU and MAU. For each day, we use the single-day DAU number and divide
507- it by the MAU corresponding to the 28-day period ending on that day. For OKR reporting, we then calculate a
506+ The Engagement Rate is calculated as the ratio between DAU and MAU. For each day, we use the single-day DAU number and divide
507+ it by the MAU corresponding to the 28-day period ending on that day. For OKR reporting, we then calculate a
508508 28-day moving average of this number. More information is provided on the
509509 [New Profiles, Retention and Engagement Rate Confluence Page](https://mozilla-hub.atlassian.net/wiki/spaces/DATA/pages/814481685/Firefox+New+Profiles+Retention+and+Engagement#Engagement-Rate).
510510"""
@@ -528,7 +528,7 @@ data_source = "fenix_retention_view"
528528select_expression = " SUM(retained_week_4_new_profiles) / SUM(new_profiles_metric_date)"
529529type = " scalar"
530530description = """
531- The New Profile Retention Rate is calculated as the proportion of new profiles that are active on the 4th week after the metric date.
531+ The New Profile Retention Rate is calculated as the proportion of new profiles that are active on the 4th week after the metric date.
532532 More information is provided on the
533533 [New Profiles, Retention and Engagement Rate Confluence Page](https://mozilla-hub.atlassian.net/wiki/spaces/DATA/pages/814481685/Firefox+New+Profiles+Retention+and+Engagement#New-Profile-Retention).
534534"""
@@ -596,6 +596,27 @@ description = "Events Ping"
596596build_id_column = " REPLACE(CAST(DATE(mozfun.norm.fenix_build_to_datetime(client_info.app_build)) AS STRING), '-', '')"
597597
598598
599+ [data_sources .sponsored_tiles_events_stream ]
600+ from_expression = """ (
601+ SELECT
602+ p.client_id,
603+ p.event_category,
604+ p.event_name,
605+ p.experiments,
606+ p.event_extra,
607+ DATE(p.submission_timestamp) AS submission_date
608+ FROM
609+ `moz-fx-data-shared-prod.{dataset}.events_stream` p
610+ WHERE p.event_category in ('customize_home', 'top_sites')
611+ )"""
612+ client_id_column = " client_id"
613+ experiments_column_type = " events_stream"
614+ default_dataset = " fenix"
615+ friendly_name = " Sponsored Tiles Events Stream"
616+ description = " Sponsored tiles Events pings from events stream"
617+ build_id_column = " REPLACE(CAST(DATE(mozfun.norm.fenix_build_to_datetime(client_info.app_build)) AS STRING), '-', '')"
618+
619+
599620[data_sources .events_stream_awesomebar ]
600621from_expression = """ (
601622 SELECT
@@ -730,7 +751,7 @@ LEFT JOIN (
730751 FROM
731752 `mozdata.org_mozilla_firefox.events_stream` tm
732753
733- WHERE event_category = "onboarding"
754+ WHERE event_category = "onboarding"
734755 AND JSON_QUERY(event_extra, "$.action") IS NOT NULL
735756 AND event_name in ("set_to_default", "turn_on_notifications", "sign_in")
736757 AND DATE(submission_timestamp) >= "2023-01-01"
0 commit comments