Skip to content
Start in Cloud

Ingest Web Vitals

POST
/ingest/web-vitals
curl --request POST \
--url https://hitkeep.com/ingest/web-vitals \
--header 'Content-Type: application/json' \
--data '{ "n": "LCP", "v": 1, "p": "example", "nt": "example", "sid": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pid": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tsrc": "example", "tv": "example" }'

Ingests opt-in Web Vitals samples from hk-vitals.js. The server resolves the site from browser Origin context, strips query strings and hashes from paths, derives standard Web Vitals ratings, and queues tenant-local persistence.

Media type application/json
object
n
required

Metric name.

string
Allowed values: LCP INP CLS FCP TTFB
v
required

Metric value. LCP, INP, FCP, and TTFB use milliseconds. CLS is unitless.

number
p
required

Browser path. Query strings and hashes are stripped server-side.

string
nt

Navigation type.

string
sid
required
string format: uuid
pid
required
string format: uuid
tsrc
string
tv
string

Accepted

Invalid request

Media type application/json
object
message
string
Example generated
{
"message": "example"
}