update telemetry for list cards (#6445)

* update telemetry for list cards

* update test yaml

* fix incorrect bool

---------

Co-authored-by: Chelsey Beck <64881557+chelseybeck@users.noreply.github.com>
This commit is contained in:
m-d-bowerman 2024-11-05 15:37:50 -08:00 коммит произвёл GitHub
Родитель 4ad4c6b9d4
Коммит 221f44ca00
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 83 добавлений и 4 удалений

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

@ -153,6 +153,18 @@ pocket_data AS (
SUM(pocket_thumbs_up) AS pocket_thumbs_up,
SUM(pocket_thumbs_down) AS pocket_thumbs_down,
SUM(pocket_thumbs_down) + SUM(pocket_thumbs_up) AS pocket_thumb_voting_events,
SUM(list_card_clicks) AS list_card_clicks,
SUM(organic_list_card_clicks) AS organic_list_card_clicks,
SUM(sponsored_list_card_clicks) AS sponsored_list_card_clicks,
SUM(list_card_impressions) AS list_card_impressions,
SUM(organic_list_card_impressions) AS organic_list_card_impressions,
SUM(sponsored_list_card_impressions) AS sponsored_list_card_impressions,
SUM(list_card_saves) AS list_card_saves,
SUM(organic_list_card_saves) AS organic_list_card_saves,
SUM(sponsored_list_card_saves) AS sponsored_list_card_saves,
SUM(list_card_dismissals) AS list_card_dismissals,
SUM(organic_list_card_dismissals) AS organic_list_card_dismissals,
SUM(sponsored_list_card_dismissals) AS sponsored_list_card_dismissals,
FROM
visits_data_base
CROSS JOIN
@ -314,7 +326,19 @@ joined AS (
COALESCE(topic_selection_data.topic_selection_opened, 0) AS topic_selection_opened,
COALESCE(topic_selection_data.topic_selection_dismissals, 0) AS topic_selection_dismissals,
visits_data.profile_group_id AS profile_group_id,
visits_data.topsites_sponsored_tiles_configured AS topsites_sponsored_tiles_configured
visits_data.topsites_sponsored_tiles_configured AS topsites_sponsored_tiles_configured,
COALESCE(pocket_data.list_card_clicks, 0) AS list_card_clicks,
COALESCE(pocket_data.organic_list_card_clicks, 0) AS organic_list_card_clicks,
COALESCE(pocket_data.sponsored_list_card_clicks, 0) AS sponsored_list_card_clicks,
COALESCE(pocket_data.list_card_impressions, 0) AS list_card_impressions,
COALESCE(pocket_data.organic_list_card_impressions, 0) AS organic_list_card_impressions,
COALESCE(pocket_data.sponsored_list_card_impressions, 0) AS sponsored_list_card_impressions,
COALESCE(pocket_data.list_card_saves, 0) AS list_card_saves,
COALESCE(pocket_data.organic_list_card_saves, 0) AS organic_list_card_saves,
COALESCE(pocket_data.sponsored_list_card_saves, 0) AS sponsored_list_card_saves,
COALESCE(pocket_data.list_card_dismissals, 0) AS list_card_dismissals,
COALESCE(pocket_data.organic_list_card_dismissals, 0) AS organic_list_card_dismissals,
COALESCE(pocket_data.sponsored_list_card_dismissals, 0) AS sponsored_list_card_dismissals,
FROM
visits_data
LEFT JOIN

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

@ -269,3 +269,39 @@ fields:
- name: newtab_dismissal_count
type: INTEGER
mode: NULLABLE
- name: list_card_clicks
type: INTEGER
mode: NULLABLE
- name: organic_list_card_clicks
type: INTEGER
mode: NULLABLE
- name: sponsored_list_card_clicks
type: INTEGER
mode: NULLABLE
- name: list_card_impressions
type: INTEGER
mode: NULLABLE
- name: organic_list_card_impressions
type: INTEGER
mode: NULLABLE
- name: sponsored_list_card_impressions
type: INTEGER
mode: NULLABLE
- name: list_card_saves
type: INTEGER
mode: NULLABLE
- name: organic_list_card_saves
type: INTEGER
mode: NULLABLE
- name: sponsored_list_card_saves
type: INTEGER
mode: NULLABLE
- name: list_card_dismissals
type: INTEGER
mode: NULLABLE
- name: organic_list_card_dismissals
type: INTEGER
mode: NULLABLE
- name: sponsored_list_card_dismissals
type: INTEGER
mode: NULLABLE

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

@ -232,40 +232,57 @@ pocket_events AS (
SAFE_CAST(mozfun.map.get_key(event_details, "position") AS INT64) AS pocket_story_position,
mozfun.map.get_key(event_details, "tile_id") AS pocket_tile_id,
mozfun.map.get_key(event_details, "recommendation_id") AS pocket_recommendation_id,
COUNTIF(event_name = 'save') AS pocket_saves,
COUNTIF(event_name = 'click') AS pocket_clicks,
COUNTIF(event_name = 'impression') AS pocket_impressions,
COUNTIF(
event_name = 'save'
AND mozfun.map.get_key(event_details, "is_list_card") != "true"
) AS pocket_saves,
COUNTIF(
event_name = 'click'
AND mozfun.map.get_key(event_details, "is_list_card") != "true"
) AS pocket_clicks,
COUNTIF(
event_name = 'impression'
AND mozfun.map.get_key(event_details, "is_list_card") != "true"
) AS pocket_impressions,
COUNTIF(
event_name = 'click'
AND mozfun.map.get_key(event_details, "is_sponsored") = "true"
AND mozfun.map.get_key(event_details, "is_list_card") != "true"
) AS sponsored_pocket_clicks,
COUNTIF(
event_name = 'click'
AND mozfun.map.get_key(event_details, "is_sponsored") != "true"
AND mozfun.map.get_key(event_details, "is_list_card") != "true"
) AS organic_pocket_clicks,
COUNTIF(
event_name = 'impression'
AND mozfun.map.get_key(event_details, "is_sponsored") = "true"
AND mozfun.map.get_key(event_details, "is_list_card") != "true"
) AS sponsored_pocket_impressions,
COUNTIF(
event_name = 'impression'
AND mozfun.map.get_key(event_details, "is_sponsored") != "true"
AND mozfun.map.get_key(event_details, "is_list_card") != "true"
) AS organic_pocket_impressions,
COUNTIF(
event_name = 'save'
AND mozfun.map.get_key(event_details, "is_sponsored") = "true"
AND mozfun.map.get_key(event_details, "is_list_card") != "true"
) AS sponsored_pocket_saves,
COUNTIF(
event_name = 'save'
AND mozfun.map.get_key(event_details, "is_sponsored") != "true"
AND mozfun.map.get_key(event_details, "is_list_card") != "true"
) AS organic_pocket_saves,
COUNTIF(
event_name = 'dismiss'
AND mozfun.map.get_key(event_details, "is_sponsored") = "true"
AND mozfun.map.get_key(event_details, "is_list_card") != "true"
) AS sponsored_pocket_dismissals,
COUNTIF(
event_name = 'dismiss'
AND mozfun.map.get_key(event_details, "is_sponsored") != "true"
AND mozfun.map.get_key(event_details, "is_list_card") != "true"
) AS organic_pocket_dismissals,
COUNTIF(
event_name = 'thumb_voting_interaction'

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

@ -62,6 +62,8 @@
value: 1
- key: is_sponsored
value: false
- key: is_list_card
value: false
- category: newtab
name: wallpaper_click
extra: