From 70b283a142bedb3a45142e876b2177bc3091ec93 Mon Sep 17 00:00:00 2001 From: Francisco Chicharro Sanz Date: Fri, 13 Oct 2023 16:10:11 +0200 Subject: [PATCH] feat(cwv): add support for TTFB --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index b19cd83..1d0b383 100644 --- a/src/index.js +++ b/src/index.js @@ -62,7 +62,7 @@ export function sampleRUM(checkpoint, data = {}) { } const { weight, id, firstReadTime } = window.hlx.rum; if (window.hlx && window.hlx.rum && window.hlx.rum.isSelected) { - const knownProperties = ['weight', 'id', 'referer', 'checkpoint', 't', 'source', 'target', 'cwv', 'CLS', 'FID', 'LCP', 'INP']; + const knownProperties = ['weight', 'id', 'referer', 'checkpoint', 't', 'source', 'target', 'cwv', 'CLS', 'FID', 'LCP', 'INP', 'TTFB']; const sendPing = (pdata = data) => { // eslint-disable-next-line object-curly-newline, max-len, no-use-before-define const body = JSON.stringify({ weight, id, referer: window.hlx.rum.sanitizeURL(), checkpoint, t: (Date.now() - firstReadTime), ...data }, knownProperties);