vendor/amplitude · vendor documented
Amplitude time is milliseconds. Seconds land in 1970.
Date.now() is the correct unit here. Meta's event_time is the inverse. A 10-digit Unix timestamp is seconds, and as milliseconds it is January 1970.
user_id and device_id shorter than 5 characters are silently dropped unless min_id_length is set. One of the two is required on every event.
time is 13 digits
Milliseconds since epoch. A JavaScript Date.now() is already in the right unit. Do not divide by 1000 because Meta told you to.
Ids shorter than 5 characters are dropped
Amplitude documents this. The pack flags user_id and device_id that fail the length check, and flags an event with neither identifier.
What this pack matches
Rules
Codes are stable. A finding in CI, MCP, or the playground lands on the same id.
| Field | Required | What it checks | Rule ids | Source |
|---|---|---|---|---|
api_key |
required | It is the project API key the upload is attributed to. Fix: Send the API key of the Amplitude project, and keep it server-side. | vendor.amplitude.body.api_key.missingvendor.amplitude.body.api_key.empty |
docs |
events |
required | Amplitude reads the events to ingest from this array. Fix: Send an `events` array holding at least one event. | vendor.amplitude.body.events.missing |
docs |
event_type |
required | Amplitude documents the event type as required on every event. Fix: Name the event, such as `Purchase Completed`. | vendor.amplitude.body.event_type.missingvendor.amplitude.body.event_type.empty |
docs |
user_id |
optional | Amplitude documents user IDs as strings of 5 characters or more, and silently drops shorter ones unless `min_id_length` is set. Fix: Use an identifier of at least 5 characters, or set the `min_id_length` option. | vendor.amplitude.body.user_id.emptyvendor.amplitude.body.user_id.invalid |
docs |
device_id |
optional | Amplitude documents device IDs as strings of 5 characters or more, and silently drops shorter ones unless `min_id_length` is set. Fix: Use an identifier of at least 5 characters, or set the `min_id_length` option. | vendor.amplitude.body.device_id.emptyvendor.amplitude.body.device_id.invalid |
docs |
time |
optional | Amplitude documents this as milliseconds since epoch. A 10-digit value is seconds and lands in 1970. Fix: Send milliseconds: a JavaScript `Date.now()` is already in the right unit. | vendor.amplitude.body.time.emptyvendor.amplitude.body.time.invalid |
docs |
insert_id |
optional | Amplitude uses it to drop duplicate events on retry. Fix: Send a stable id per event so a retried upload is not counted twice. | vendor.amplitude.body.insert_id.empty |
docs |
body.event_needs_an_identifier |
required | The event carries neither `user_id` nor `device_id`. Amplitude documents one of the two as required, and rejects the event without them. Fix: Send `user_id` for a known user, or `device_id` for an anonymous one. | vendor.amplitude.body.event_needs_an_identifier |
docs |
Validate a payload
pixellint validate json @payload.json --rulepack vendor/amplitude
Or paste it into the playground. Same engine, in the browser, nothing sent anywhere.
cargo install pixellint
·
npm install pixellint