Web vitals
1 operation in the WP Waterfall API.
Report the web vitals of a marketing page
post/public/vitalsPermalink to Report the web vitals of a marketing page
- Dashboard session only, no API key
No sign-in, no cookie. Send a page path and up to five metrics (LCP, INP, CLS, FCP, TTFB) measured in the visitor's browser. A visitor who denied analytics, or whose browser sends Global Privacy Control, sends nothing. WP Waterfall keeps a count, a sum, and how many were good, needs improvement, or poor, for each page, metric, and day. It stores no address, no query string, and nothing that names the visitor, and it deletes rows after 90 days. Limited to 120 requests an hour per address. After 300 different pages in one day, new pages count as /other.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, WebVitalsRequest
Fields
| Name | Type | Description |
|---|---|---|
route required | string | |
metrics required | array of object | |
metrics[].name required | string | One of: LCP, INP, CLS, FCP, TTFB. |
metrics[].value required | number | Range: 0 to 600000. |
Responses
| Status | Body | Description |
|---|---|---|
202 | WebVitalsResponse | Received |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | A field is missing or not valid |
429 | Problem | Too many reports from this address |
202 response fields
| Name | Type | Description |
|---|---|---|
received required | boolean |