This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH web_vitals_events AS ( | |
SELECT | |
event_name as metric_name, * EXCEPT(event_name, is_last_received_value) FROM ( | |
SELECT *, IF (ROW_NUMBER() OVER ( | |
PARTITION BY (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'metric_id') | |
ORDER BY (SELECT COALESCE(value.double_value, value.int_value) FROM UNNEST(event_params) WHERE key = 'metric_value') DESC | |
) = 1, true, false) AS is_last_received_value | |
FROM `ilaria-food-and-home.analytics_317802288.events_20240519` | |
WHERE event_name in ('INP') | |
) WHERE is_last_received_value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
if (PerformanceObserver.supportedEntryTypes.includes('long-animation-frame')) { | |
window.longestINPtoLoAFScript = null; | |
function process(eventEntry) { | |
let matchingLoafs = []; | |
for (const event_entry of eventEntry.entries) { | |
if (event_entry.entryType == "first-input") | |
continue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( | |
good / (good + needs_improvement + poor) >= 0.75 | |
); | |
WITH WIX_ORIGINS AS ( | |
SELECT | |
origin, | |
fast_inp, | |
good_inp | |
FROM ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Warning: This Query will process 57GB approx, consider BigQuery API costs. | |
WITH dates AS | |
(SELECT | |
yyyymm | |
FROM | |
`chrome-ux-report.materialized.device_summary` | |
GROUP BY yyyymm | |
ORDER BY yyyymm DESC | |
LIMIT 13) |