Skip to content

Instantly share code, notes, and snippets.

@rviscomi
Created June 17, 2019 17:10
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rviscomi/821daa5f088094c9046e0d8d171fca42 to your computer and use it in GitHub Desktop.
Save rviscomi/821daa5f088094c9046e0d8d171fca42 to your computer and use it in GitHub Desktop.
Query for cumulative layout shifts in the Chrome UX Report
SELECT
form_factor.name AS form_factor,
cls.start,
ROUND(SUM(cls.density), 4) AS density
FROM
`chrome-ux-report.all.201905`,
UNNEST(experimental.cumulative_layout_shift.histogram.bin) AS cls
WHERE
origin = 'https://www.nytimes.com'
GROUP BY
form_factor,
start
ORDER BY
form_factor,
start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment