vendor/rudderstack · vendor documented
RudderStack pixels need a write key and an identity
The Pixel API is a GET with writeKey in the query. HTTP POST uses basic auth and a JSON body. Self-hosted data planes on other hosts are attributed, not contracted.
JSON is Segment-shaped, not Segment-hosted
RudderStack's HTTP API is Segment-compatible. The pack claims the envelope RudderStack's own samples use, with context.library.name set to http, and leaves writeKey out of the JSON body.
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 |
|---|---|---|---|---|
writeKey |
required | The Pixel API authenticates with the source write key in the query. HTTP POST uses basic auth instead, and is a JSON artifact. Fix: Add `writeKey` from the HTTP source in the dashboard. | vendor.rudderstack.param.writeKey.missingvendor.rudderstack.param.writeKey.empty |
docs |
event |
required | Name of the event being tracked. Required on /pixel/v1/track. Fix: Set `event` to the action name, such as `Product Viewed`. | vendor.rudderstack.param.event.missingvendor.rudderstack.param.event.empty |
docs |
anonymousId |
optional | Anonymous identifier. The Pixel API requires `userId` or `anonymousId`. | vendor.rudderstack.param.anonymousId.empty |
docs |
userId |
optional | Known-user identifier. Alternative to `anonymousId`. | vendor.rudderstack.param.userId.empty |
docs |
identifier_required |
required | The pixel has neither `userId` nor `anonymousId`. RudderStack documents one of the two as required. Fix: Send `userId` for a known user, or `anonymousId` for an unidentified one. | vendor.rudderstack.identifier_required |
docs |
type |
required | Each batched call names a documented method. Fix: Set `type` to identify, track, page, screen, group, or alias. | vendor.rudderstack.body.type.missingvendor.rudderstack.body.type.emptyvendor.rudderstack.body.type.invalid |
docs |
event |
optional | Name of the user action. Required on a track call. Fix: Set `event` to the action name, such as `Product Purchased`. | vendor.rudderstack.body.event.empty |
docs |
body.track_requires_an_event_name |
required | A `track` call carries no `event`. RudderStack documents the event name as required. Fix: Add the event name to the call. | vendor.rudderstack.body.track_requires_an_event_name |
docs |
event |
optional | Name of the user action. Required on a track call. Fix: Set `event` to the action name, such as `Product Purchased`. | vendor.rudderstack.body.event.empty |
docs |
userId |
optional | Unique identifier for the user. Either this or `anonymousId` is required. | vendor.rudderstack.body.userId.empty |
docs |
anonymousId |
optional | Stands in for a user id when there is none. Either this or `userId` is required. | vendor.rudderstack.body.anonymousId.empty |
docs |
timestamp |
optional | RudderStack documents timestamp as ISO 8601 `yyyy-MM-ddTHH:mm:ss.SSSZ`. Fix: Send an ISO 8601 timestamp such as `2022-02-01T19:14:18.381Z`. | vendor.rudderstack.body.timestamp.emptyvendor.rudderstack.body.timestamp.invalid |
docs |
body.call_needs_an_identifier |
required | The call carries neither `userId` nor `anonymousId`. RudderStack documents one of the two as required. Fix: Send `userId` for a known user, or `anonymousId` for an unidentified one. | vendor.rudderstack.body.call_needs_an_identifier |
docs |
Validate a payload
pixellint validate json @payload.json --rulepack vendor/rudderstack
Try this failing payload in the playground. RudderStack track without event.
{"context":{"library":{"name":"analytics-java"}},"batch":[{"type":"track","userId":"u1"}]}
cargo install pixellint
·
npm install pixellint