Skip to content

Commit a76ab9f

Browse files
committed
Merge branch 'main' of github.com:HTTPArchive/almanac.httparchive.org into production
2 parents 4538b65 + 523ae0d commit a76ab9f

4 files changed

Lines changed: 18 additions & 13 deletions

File tree

src/config/last_updated.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
},
3737
"/static/js/send-web-vitals.js": {
3838
"date_published": "2021-02-24T00:00:00.000Z",
39-
"date_modified": "2024-06-05T00:00:00.000Z",
40-
"hash": "93b415ccbc2d2f5de8627d6019546f09"
39+
"date_modified": "2024-06-10T00:00:00.000Z",
40+
"hash": "b7224f484fe762e075d4838286ddb066"
4141
},
4242
"/static/js/web-vitals.js": {
4343
"date_published": "2020-11-13T00:00:00.000Z",
44-
"date_modified": "2024-06-05T00:00:00.000Z",
45-
"hash": "10638eba1611ff0dc07edbe721e3eb45"
44+
"date_modified": "2024-06-10T00:00:00.000Z",
45+
"hash": "fd1e29002e3518e8bf128dbbddaecc07"
4646
},
4747
"/static/js/webmentions.js": {
4848
"date_published": "2021-12-01T00:00:00.000Z",

src/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"run-script-os": "1.1.6",
4848
"showdown": "2.1.0",
4949
"smartypants": "0.2.2",
50-
"web-vitals": "4.0.1",
50+
"web-vitals": "4.1.0",
5151
"xml-js": "1.6.11"
5252
}
5353
}

src/static/js/send-web-vitals.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function sendWebVitals() {
5454
}));
5555
}
5656

57-
function sendWebVitalsGAEvents({name, delta, id, attribution, navigationType}) {
57+
function sendWebVitalsGAEvents({name, delta, value, id, attribution, navigationType}) {
5858

5959
let overrides = {};
6060

@@ -136,6 +136,11 @@ function sendWebVitals() {
136136
event_category: 'Web Vitals',
137137
value: Math.round(name === 'CLS' ? delta * 1000 : delta),
138138
event_label: id,
139+
// Repeat with new fields to match web-vitals documentation
140+
// TODO deprecate above names when no longer required
141+
metric_value: Math.round(name === 'CLS' ? value * 1000 : value),
142+
metric_delta: Math.round(name === 'CLS' ? delta * 1000 : delta),
143+
metric_id: id,
139144
non_interaction: true,
140145
effective_type: effectiveType,
141146
data_saver: dataSaver,

0 commit comments

Comments
 (0)