-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
413 lines (391 loc) · 25.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CrUX Tool: Analyze and Compare Core Web Vitals | Chrome UX Report</title>
<link rel="preconnect" href="//chromeuxreport.googleapis.com">
<link rel="preconnect" href="//cdnjs.cloudflare.com">
<link rel="preconnect" href="//fonts.googleapis.com">
<link rel="preconnect" href="//fonts.gstatic.com" crossorigin="">
<style>
body{font-family: 'Open Sans', sans-serif;margin: 0;}.navbar-nav {display: flex;list-style: none;margin: 0;padding: 0;}main {padding: 20px;}
h1 {font-size: 2.5em;margin-bottom: 20px;}.container {max-width: 1200px;margin: 0 auto;}.light .info {border: black;border-style: dashed;}.light header nav {background-color: #ffffff !important;}
</style>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&display=swap">
<link rel="stylesheet" type="text/css" href="./css/init.css" media="screen,projection">
<link rel="stylesheet" type="text/css" href="./css/init2.css" media="screen,projection">
<link rel="stylesheet" type="text/css" href="./css/histo.css" media="screen,projection">
<link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" as="style">
<link rel="preload" href="./css/init.css" as="style">
<link rel="preload" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&display=swap" as="style">
<meta name="description" content="Use the CrUX Tool to analyze and compare Core Web Vitals metrics (CLS, LCP, FID, FCP) across multiple origins or URLs. Leverage Chrome UX Report data to improve your website's performance and user experience.">
<meta name="author" content="Alejandro Loaiza">
<meta name="keywords" content="Core Web Vitals, CrUX API, Google CWV, CLS, LCP, FID, FCP, web performance, user experience, SEO, Chrome User Experience Report, real user metrics, website speed optimization">
<link rel="canonical" href="https://core-web-vitals.now.sh/">
<meta property="og:type" content="website">
<meta property="og:url" content="https://core-web-vitals.now.sh/">
<meta property="og:title" content="CrUX Tool: Analyze and Compare Core Web Vitals">
<meta property="og:description" content="Use the CrUX Tool to analyze and compare Core Web Vitals metrics across multiple origins or URLs. Improve your website's performance with Chrome UX Report data.">
<meta property="og:image" content="https://core-web-vitals.now.sh/img/CruxTool.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="https://core-web-vitals.now.sh/">
<meta name="twitter:title" content="CrUX Tool: Analyze and Compare Core Web Vitals">
<meta name="twitter:description" content="Use the CrUX Tool to analyze and compare Core Web Vitals metrics across multiple origins or URLs. Improve your website's performance with Chrome UX Report data.">
<meta name="twitter:image" content="https://core-web-vitals.now.sh/img/CruxTool.png">
<link rel="icon" href="img/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="img/icon512_rounded.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="msapplication-starturl" content="/">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "CrUX Tool",
"description": "Analyze and compare Core Web Vitals metrics across multiple origins or URLs using the Chrome UX Report API",
"url": "https://core-web-vitals.now.sh/",
"applicationCategory": "WebDevelopmentTool",
"operatingSystem": "Any",
"offers": {
"@type": "Offer",
"price": "0"
}
}
</script>
</head>
<body>
<header class="hide-on-small-only">
<nav class="topBar">
<div class="nav-wrapper valign-wrapper right">
<ul class="right">
<li><a href="https://web.dev/metrics/"><i class="material-icons left">developer_mode</i>More on CrUX
metrics</a></li>
<li><a href="https://github.com/zer0kool/core-web-vitals/issues"><i class="material-icons right">bug_report</i>Notice an issue?</a></li>
</ul>
</div>
</nav>
</header>
<nav class="navbar">
<ul class="navbar-nav">
<li class="logo hide-on-small-only">
<a href="#" class="nav-link">
<span class="link-text logo-text">CrUX API Tool</span>
<svg aria-hidden="true" focusable="false" data-prefix="fad" data-icon="angle-double-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-angle-double-right fa-w-14 fa-5x">
<g class="fa-group">
<path fill="currentColor" d="M224 273L88.37 409a23.78 23.78 0 0 1-33.8 0L32 386.36a23.94 23.94 0 0 1 0-33.89l96.13-96.37L32 159.73a23.94 23.94 0 0 1 0-33.89l22.44-22.79a23.78 23.78 0 0 1 33.8 0L223.88 239a23.94 23.94 0 0 1 .1 34z" class="fa-secondary"></path>
<path fill="currentColor" d="M415.89 273L280.34 409a23.77 23.77 0 0 1-33.79 0L224 386.26a23.94 23.94 0 0 1 0-33.89L320.11 256l-96-96.47a23.94 23.94 0 0 1 0-33.89l22.52-22.59a23.77 23.77 0 0 1 33.79 0L416 239a24 24 0 0 1-.11 34z" class="fa-primary"></path>
</g>
</svg>
</a>
</li>
<ul id="tabs-swipe-demo" class="tabsx">
<li class="nav-item tab">
<a href="#cruxorigin" class="nav-link">
<i class="material-icons">important_devices</i>
<span class="link-text">CrUX by origin</span>
</a>
</li>
<li class="nav-item tab">
<a href="#cruxurl" class="nav-link">
<i class="material-icons">pageview</i>
<span class="link-text">CrUX by url</span>
</a>
</li>
<li class="nav-item tab">
<a href="#cruxbatch" class="nav-link">
<i class="material-icons">data_usage</i>
<span class="link-text">Batch Urls</span>
</a>
</li>
<li class="nav-item tab">
<a href="#about" class="nav-link">
<i class="material-icons">eco</i>
<span class="link-text">About</span>
</a>
</li>
<li class="nav-item tab">
<a href="#credits" class="nav-link">
<i class="material-icons">face</i>
<span class="link-text">Credits</span>
</a>
</li>
</ul>
<li class="nav-item" id="themeButton">
<a href="#" class="nav-link">
<i class="material-icons">opacity</i>
<span class="link-text">Change Theme</span>
</a>
</li>
</ul>
</nav>
<main>
<div id="cruxorigin" class="col s12 active">
<div class="info">
<h1>CrUX by Origin</h1>
<h6>Visualize field data collected over the last 28 days</h6>
<div class="container">
<form class="row">
<div class="input-field col s12 m7 l9">
<input aria-label="Search origin" role="search" placeholder="www.example.com" id="search" type="search" required>
<label for="search">Search origin</label>
<i id="clear" class="material-icons prefix">close</i>
</div>
<div class="col s12 m5 l3">
<button class="waves-effect waves-light btn-large grey lighten-5" type="submit" name="action">Get CrUX Metrics</button>
</div>
</form>
</div>
</div>
<div class="loadingWrap">
<div id="loading" class="progress">
<div class="indeterminate"></div>
</div>
</div>
<div class="container">
<div id="app"></div>
</div>
</div>
<div id="cruxurl" class="col s12" style="display: none;">
<div class="info">
<h1>CrUX by Url</h1>
<h6>Visualize field data collected over the last 28 days</h6>
<div class="container">
<form class="row">
<div class="input-field col s12 m5">
<i class="material-icons prefix">create</i>
<input id="icon_prefix" type="text" class="validate pagetype" required>
<label for="icon_prefix">Page Type</label>
</div>
<div class="input-field col s12 m7">
<i class="material-icons prefix">track_changes</i>
<input id="fetch" type="text" class="validate" required>
<label for="fetch">Url</label>
</div>
<div class="col s12 m2">
<button class="waves-effect waves-light btn-large grey lighten-5" type="submit" name="action">Fetch</button>
</div>
</form>
</div>
</div>
<div class="loadingWrap">
<div id="loading" class="progress">
<div class="indeterminate"></div>
</div>
</div>
<div class="container">
<div id="app"></div>
</div>
</div>
<div id="cruxbatch" class="col s12" style="display: none;">
<div id="batch" class="container">
<div class="hero">
<h1>CrUX Batch Tool</h1>
<p>The CrUX Batch Tool enables users to analyze multiple URLs at once, providing insights into Core Web Vitals metrics and helping identify performance issues to enhance user experience.</p>
<br><br>
<span class="batchToggle right"></span>
<div class="row batch">
<div class="col s12 center">
<div class="input-field col s12">
<label for="dataUrls">Enter one or more URLs (separate by commas or new lines):</label>
<textarea id="dataUrls" class="materialize-textarea prompt-box" placeholder="https://example.com, https://example2.com" data-length="1020"></textarea>
<span class="helper-text">You can input multiple URLs by separating them with commas or placing each on a new line.</span>
</div>
</div>
<button onclick="processUrls()" class="waves-effect waves-light btn grey lighten-5 right fbutton">Fetch URLs</button>
</div>
<div class="feedback center"></div>
</div>
<div class="container dataUrls"></div>
<ul class="collapsible popout" id="data"></ul>
</div>
</div>
<div id="about" class="col s12" style="display: none;">
<div class="container">
<div class="section">
<div class="row">
<div class="col s12">
<h5 class="center">Querying and visualizing the CrUX API</h5>
<p class="light">The data in the Chrome UX Report API is a 28-day rolling average of aggregated metrics.
This means that the data presented in the CrUX tool at any given time is actually data for the past 28
days aggregated together.
</p>
<p class="light">This is similar to how the CrUX dataset on BigQuery aggregates monthly reports.</p>
</div>
</div>
<!-- Icon Section -->
<div class="row">
<div class="col s12 m6">
<div class="icon-block">
<div class="center tool">
<svg width="48" height="48" aria-hidden="true">
<g fill="none" fill-rule="evenodd">
<path d="M47.5 24A23.5 23.5 0 0 1 24 47.5 23.5 23.5 0 0 1 .5 24 23.5 23.5 0 0 1 24 .5 23.5 23.5 0 0 1 47.5 24Z" style="fill:#fff;fill-rule:nonzero;stroke-width:.25"></path>
<path d="M0 0h48v48H0Z"></path>
<path d="M16.5 24V13.2a3.8 3.8 0 0 0-7.5 0V24a15 15 0 0 0 8 13.3l6-5.9a7.5 7.5 0 0 1-6.5-7.4Z" fill="#34a853"></path>
<path d="M31.5 22.8V24a7.5 7.5 0 0 1-8.6 7.4l-5.8 5.9A15 15 0 0 0 39 24l-.1-8.7Z" fill="#fbbc04"></path>
<path d="M35.3 9.5c-2.1 0-3.8 1.7-3.8 3.8v9.5l7.5-7.5v-2c0-2.1-1.7-3.8-3.8-3.8Z" fill="#ea4335"></path>
<path d="M78 58a18 18 0 0 1-18 18 18 18 0 0 1-18-18 18 18 0 0 1 18-18 18 18 0 0 1 18 18Z" style="fill:#4285f4" transform="matrix(.25 0 0 .25 9 9.5)"></path>
</g>
</svg>
</div>
<h5 class="center">CrUX API</h5>
<p class="light">The Chrome UX Report API gives low-latency access to aggregated Real User Metrics (RUM)
from the Chrome User Experience Report.</p>
</div>
</div>
<div class="col s12 m6">
<div class="icon-block">
<div class="center tool">
<img decoding="async" loading="lazy" class="sample" src="./sample.png" fetchpriority="low">
</div>
<h5 class="center">CrUX Tool</h5>
<p class="light">The Crux tool is a web UI for querying and visualizing the CrUX API. All data metrics
are aggregated together in a single card.</p>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col s12">
<div class="icon-block">
<h5 class="center">Learning Together</h5>
<p class="light">The code of this tool is available on <a href="https://github.com/zer0kool/core-web-vitals">github</a> with the purpose of giving
transparency on how the information is obtained.</p>
</div>
</div>
</div>
<br>
<!-- QnA -->
<h5>Questions and Answers</h5>
<ul class="collapsible">
<li>
<div class="collapsible-header"><i class="material-icons">question_answer</i>I've noticed an issue</div>
<div class="collapsible-body">
<blockquote class="response">To report an issue or a question in regards to the <b>CrUX API</b>. <br>
<a href="https://groups.google.com/a/chromium.org/g/chrome-ux-report">Please visit the Google CrUX
Community</a>
</blockquote>
<blockquote class="response">To report an issue or question in regards the <b>CrUX Tool</b>. <br>
<a href="https://github.com/zer0kool/core-web-vitals/issues">Please visit the GitHub project </a>
</blockquote>
</div>
</li>
<li class="active">
<div class="collapsible-header"><i class="material-icons">question_answer</i>Missing data</div>
<div class="collapsible-body">
<blockquote class="question">Sometimes I get noData displayed on the card</blockquote>
<blockquote class="response">Yes, that is intentional. When the CrUX API returns a 404 for the
formfactor, then the tool will render no Data under the FormFactor tab name inside the card.
</blockquote>
</div>
</li>
<li>
<div class="collapsible-header"><i class="material-icons">question_answer</i>Data discrepancies</div>
<div class="collapsible-body">
<blockquote class="question">Discrepancies between CrUX API and LightHouse, why?</blockquote>
<blockquote class="response">CrUX API reflects field data, while Lighthouse reflects lab data<br>
<a href="https://web.dev/how-to-measure-speed/#lab-data-vs-field-data">Read more on Lab data vs field
data</a>
</blockquote>
<blockquote class="question">Discrepancies between CrUX API and PageSpeed Insights, why?</blockquote>
<blockquote class="response">This should be resolved as a result of the recent PSI migration to the CrUX
API as its source of field data.<br>
<a href="https://groups.google.com/g/pagespeed-insights-discuss/c/by9-TbqdlBM/m/Ovgg_o22AAAJ">Read
More</a>
</blockquote>
</div>
</li>
<li>
<div class="collapsible-header"><i class="material-icons">question_answer</i>Daily updates</div>
<div class="collapsible-body">
<blockquote class="question">Data is not updating, why?</blockquote>
<blockquote class="response">Data is updated daily around 04:00 UTC. There is no SLO for update times;
it is ran on a best effort basis everyday.</blockquote>
<blockquote class="question">Data is not changing, why?</blockquote>
<blockquote class="response">Data will not differ within the same day, repeated calls will yield the
same results.</blockquote>
</div>
</li>
<li>
<div class="collapsible-header"><i class="material-icons">question_answer</i>CrUX by URL</div>
<div class="collapsible-body">
<blockquote class="question">My URL is not working on CrUX by URL, why?</blockquote>
<blockquote class="response">All aggregations (at either the origin or URL levels) must be publicly
indexable and meet our popularity criteria. If site owners are sure that their URL is both public and
popular, they should reach out to us on the<a href="https://groups.google.com/a/chromium.org/g/chrome-ux-report"> CrUX discussion forum</a> to
raise a possible bug.</blockquote>
<blockquote class="question">How do I know what URL to query?</blockquote>
<blockquote class="response">We recommend that you get the list of links from your website that are most
popular. Apart from being popular, they must have enough traffic so that google can obtain the metrics
of your link. Another thing I'd recommend is using the Core Web Vitals report in Search Console. They
highlight groups of pages with issues and list a few example URLs exhibiting those issues. Those URLs
would be good to watch as improvements are made.</blockquote>
</div>
</li>
</ul>
</div>
<br><br>
</div>
</div>
<div id="credits" class="col s12" style="display: none;"> <br><br>
<div class="section center">
<img decoding="async" loading="lazy" width="280" height="50" src="./wompmobile.png" fetchpriority="low">
<h5>CrUX Tool: Query and visualize the CrUX API</h5>
<p>Created by <a alt="Alex Github" href="https://github.com/zer0kool">Alejandro Loaiza</a> and maintained by the
Quality Lab Engineers at WompMobile. </p>
<div class="block">
<div class="center tool">
<svg width="48" height="48" aria-hidden="true">
<g fill="none" fill-rule="evenodd">
<path d="M47.5 24A23.5 23.5 0 0 1 24 47.5 23.5 23.5 0 0 1 .5 24 23.5 23.5 0 0 1 24 .5 23.5 23.5 0 0 1 47.5 24Z" style="fill:#fff;fill-rule:nonzero;stroke-width:.25"></path>
<path d="M0 0h48v48H0Z"></path>
<path d="M16.5 24V13.2a3.8 3.8 0 0 0-7.5 0V24a15 15 0 0 0 8 13.3l6-5.9a7.5 7.5 0 0 1-6.5-7.4Z" fill="#34a853"></path>
<path d="M31.5 22.8V24a7.5 7.5 0 0 1-8.6 7.4l-5.8 5.9A15 15 0 0 0 39 24l-.1-8.7Z" fill="#fbbc04"></path>
<path d="M35.3 9.5c-2.1 0-3.8 1.7-3.8 3.8v9.5l7.5-7.5v-2c0-2.1-1.7-3.8-3.8-3.8Z" fill="#ea4335"></path>
<path d="M78 58a18 18 0 0 1-18 18 18 18 0 0 1-18-18 18 18 0 0 1 18-18 18 18 0 0 1 18 18Z" style="fill:#4285f4" transform="matrix(.25 0 0 .25 9 9.5)"></path>
</g>
</svg>
</div>
<h5>Data source: Chrome UX Report API</h5>
<p>Check out <a alt="Crux API" href="https://web.dev/chrome-ux-report-api/">Rick Viscomi article</a> and learn
how to use the Chrome UX Report API to get easy, RESTful access to real-user experience data across millions
of websites. </p>
</div>
<div class="block">
<div class="center tool">
<img class="git circle" decoding="async" loading="lazy" hidden src="https://githubuniverse.com/assets/img/GitHub-invertocat.svg" fetchpriority="low">
</div>
<h5>Github Community: Thank you!</h5>
<p>The CrUX tool serves the community and reporting bugs or providing constructive feedback is considered a
contribution. The CrUX tool gets better because of you.</p>
<p><a alt="Matt Klein" href="https://github.com/Mpk6997">Matt Klein</a> (@Mpk6997)</p>
<p><a alt="Rick Viscomi" href="https://github.com/rviscomi">Rick Viscomi</a> (@rviscomi)</p>
<p><a alt="Tim Hofman" href="https://github.com/timhofman">Tim Hofman</a> (@timhofman)</p>
<p><a alt="opusdei" href="https://github.com/opusdei">Opusdei</a> (@opusdei)</p>
<p><a alt="rockeynebhwani" href="https://github.com/rockeynebhwani">Rockeynebhwani</a> (@rockeynebhwani)</p>
<p><a alt="Victoria" href="https://github.com/VictoriaMaksimova">Victoria</a> (@VictoriaMaksimova)</p>
<p><a alt="comatheus" href="https://github.com/comatheus">comatheus</a> (@comatheus)</p>
</div>
</div>
</div>
<div id="cruxModals">
</div>
<div id="chartModals">
</div>
</main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js" defer></script>
<script src="./js/theme.js" defer></script>
<script src="./js/init.js" defer></script>
<script src="https://cdn.amcharts.com/lib/5/index.js" defer></script>
<script src="https://cdn.amcharts.com/lib/5/xy.js" defer></script>
<script src="https://cdn.amcharts.com/lib/5/themes/Animated.js" defer></script>
<script src="./js/charts/chart.js" defer></script>
<script src="./js/crux/fetchOrigin.js" defer></script>
<script src="./js/crux/fetchURL.js" defer></script>
<script src="./js/charts/batch.js" defer></script>
<script src="./js/charts/histo.js" defer></script>
</body>
</html>