Web vitals

Endpoint POST /api/v1/vitals

The browser SDK sends this beacon; the format is fixed and small so it can go out with sendBeacon as text/plain without a CORS preflight.

1Request

Key in ?key= or X-Blipit-Key, optional instance. Body up to 4 KB, JSON as application/json or text/plain: path (1 to 512 characters, starts with /, no ?, # or spaces), metrics {lcp, inp, cls, fcp, ttfb} (finite, 0 to 120 s; INP up to 60 s; CLS up to 100; any subset), nav (the navigation type; route for a single-page-app route change), connection and device (known types only).

js
navigator.sendBeacon(
  "https://in.blipit.io/api/v1/vitals?key=<public key>",
  JSON.stringify({ path: "/checkout", metrics: { lcp: 1840, cls: 0.03, ttfb: 320 }, nav: "navigate", device: "mobile", connection: "4g" })
);

2Responses

202 {ok: true}, or 202 {ok: true, skipped: 'bot'} for bot user agents. 400 for anything outside the shape. 401 or 403 for key problems.

Good to know

  • 1,200 requests a minute per key.
  • Samples are kept 30 days.
  • Do not put the query string in path; ingest refuses it.

Stuck? Email support@blipit.io. Keys and the exact DSN for each project are under API keys in app.blipit.io.