Adding spons tiles configured telemetry to newtab clients and visits (#6380)

* Adding spons tiles configured telemetry to newtab clients and visits

* ran bqetl format

* Adding new field to tests

* Adding new field to tests

* fix tests

---------

Co-authored-by: m-d-bowerman <mbowerman@mozilla.com>
This commit is contained in:
Sergio E. Betancourt 2024-10-23 13:36:34 -05:00 коммит произвёл GitHub
Родитель b68024f314
Коммит 000a50831a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
7 изменённых файлов: 27 добавлений и 3 удалений

Просмотреть файл

@ -35,7 +35,8 @@ WITH visits_data_base AS (
topic_selection_interactions, topic_selection_interactions,
newtab_default_ui, newtab_default_ui,
newtab_selected_topics, newtab_selected_topics,
profile_group_id profile_group_id,
topsites_sponsored_tiles_configured
FROM FROM
`moz-fx-data-shared-prod.telemetry_derived.newtab_visits_v1` `moz-fx-data-shared-prod.telemetry_derived.newtab_visits_v1`
WHERE WHERE
@ -81,7 +82,8 @@ visits_data AS (
COUNTIF(newtab_default_ui = "non-default") AS visits_with_non_default_ui, COUNTIF(newtab_default_ui = "non-default") AS visits_with_non_default_ui,
LOGICAL_OR(is_new_profile) AS is_new_profile, LOGICAL_OR(is_new_profile) AS is_new_profile,
ANY_VALUE(activity_segment) AS activity_segment, ANY_VALUE(activity_segment) AS activity_segment,
LOGICAL_OR(ARRAY_LENGTH(newtab_selected_topics) > 0) AS topic_preferences_set LOGICAL_OR(ARRAY_LENGTH(newtab_selected_topics) > 0) AS topic_preferences_set,
ANY_VALUE(topsites_sponsored_tiles_configured) AS topsites_sponsored_tiles_configured
FROM FROM
visits_data_base visits_data_base
GROUP BY GROUP BY
@ -297,7 +299,8 @@ SELECT
COALESCE(topic_selection_data.topic_selection_updates, 0) AS topic_selection_updates, COALESCE(topic_selection_data.topic_selection_updates, 0) AS topic_selection_updates,
COALESCE(topic_selection_data.topic_selection_opened, 0) AS topic_selection_opened, COALESCE(topic_selection_data.topic_selection_opened, 0) AS topic_selection_opened,
COALESCE(topic_selection_data.topic_selection_dismissals, 0) AS topic_selection_dismissals, COALESCE(topic_selection_data.topic_selection_dismissals, 0) AS topic_selection_dismissals,
visits_data.profile_group_id AS profile_group_id visits_data.profile_group_id AS profile_group_id,
visits_data.topsites_sponsored_tiles_configured AS topsites_sponsored_tiles_configured
FROM FROM
visits_data visits_data
LEFT JOIN LEFT JOIN

Просмотреть файл

@ -257,3 +257,8 @@ fields:
- name: profile_group_id - name: profile_group_id
type: STRING type: STRING
mode: NULLABLE mode: NULLABLE
- name: topsites_sponsored_tiles_configured
type: INTEGER
mode: NULLABLE
description: An integer from client configuration that determines how many tiles the client can see.
This telemetry released in Fx123 (2024/02/20), so it should only be considered for clients with Fx123+.

Просмотреть файл

@ -42,6 +42,9 @@ visit_metadata AS (
ANY_VALUE(metrics.boolean.pocket_sponsored_stories_enabled) AS pocket_sponsored_stories_enabled, ANY_VALUE(metrics.boolean.pocket_sponsored_stories_enabled) AS pocket_sponsored_stories_enabled,
ANY_VALUE(metrics.boolean.topsites_enabled) AS topsites_enabled, ANY_VALUE(metrics.boolean.topsites_enabled) AS topsites_enabled,
ANY_VALUE(metrics.boolean.topsites_sponsored_enabled) AS topsites_sponsored_enabled, ANY_VALUE(metrics.boolean.topsites_sponsored_enabled) AS topsites_sponsored_enabled,
ANY_VALUE(
metrics.quantity.topsites_sponsored_tiles_configured
) AS topsites_sponsored_tiles_configured,
ANY_VALUE(metrics.string.newtab_homepage_category) AS newtab_homepage_category, ANY_VALUE(metrics.string.newtab_homepage_category) AS newtab_homepage_category,
ANY_VALUE(metrics.string.newtab_newtab_category) AS newtab_newtab_category, ANY_VALUE(metrics.string.newtab_newtab_category) AS newtab_newtab_category,
ANY_VALUE(metrics.boolean.newtab_search_enabled) AS newtab_search_enabled, ANY_VALUE(metrics.boolean.newtab_search_enabled) AS newtab_search_enabled,

Просмотреть файл

@ -379,3 +379,8 @@ fields:
- name: newtab_window_inner_width - name: newtab_window_inner_width
type: INTEGER type: INTEGER
mode: NULLABLE mode: NULLABLE
- mode: NULLABLE
name: topsites_sponsored_tiles_configured
type: INTEGER
description: An integer from client configuration that determines how many tiles the client can see.
This telemetry released in Fx123 (2024/02/20), so it should only be considered for clients with Fx123+.

Просмотреть файл

@ -440,6 +440,11 @@
"name": "topsites_rows", "name": "topsites_rows",
"type": "INTEGER", "type": "INTEGER",
"mode": "NULLABLE" "mode": "NULLABLE"
},
{
"name": "topsites_sponsored_tiles_configured",
"type": "INTEGER",
"mode": "NULLABLE"
} }
] ]
}, },

Просмотреть файл

@ -15,6 +15,7 @@
newtab_default_ui: default newtab_default_ui: default
newtab_newtab_category: enabled newtab_newtab_category: enabled
profile_group_id: profile_group_id_1 profile_group_id: profile_group_id_1
topsites_sponsored_tiles_configured: 2
search_interactions: search_interactions:
- search_engine: Engine1 - search_engine: Engine1
search_access_point: urlbar search_access_point: urlbar

Просмотреть файл

@ -8,6 +8,8 @@
legacy_telemetry_profile_group_id: profile_group_id_1 legacy_telemetry_profile_group_id: profile_group_id_1
string: string:
newtab_newtab_category: enabled newtab_newtab_category: enabled
quantity:
topsites_sponsored_tiles_configured: 2
events: events:
- category: newtab - category: newtab
name: opened name: opened