pixellint

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. A batched group call needs groupId, and an alias call needs previousId. 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.

Rule: vendor.rudderstack.body.call_needs_an_identifier

What this pack matches

Hosts
hosted.rudderlabs.com, dataplane.rudderstack.com, rudderlabs.com
Paths
…/pixel/v1/track…
Vendor docs
www.rudderstack.com/docs/api/http-api/

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.missing
vendor.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.missing
vendor.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
name optional Page or screen name sent for context on a pixel track. vendor.rudderstack.param.name.empty docs
context.library.name optional Name of the library or SDK, such as `Rudderstack AMP SDK`. vendor.rudderstack.param.context.library.name.empty docs
context.library.version optional Version of the library or SDK. vendor.rudderstack.param.context.library.version.empty docs
context.platform optional Platform context, such as `AMP`. vendor.rudderstack.param.context.platform.empty docs
context.locale optional User locale, such as the browser language. vendor.rudderstack.param.context.locale.empty docs
context.userAgent optional User agent string of the client that fired the pixel. vendor.rudderstack.param.context.userAgent.empty docs
context.screen.width optional Screen width in pixels. RudderStack's Pixel API sample sends an integer. Fix: Send the width in pixels, such as `1920`. vendor.rudderstack.param.context.screen.width.empty
vendor.rudderstack.param.context.screen.width.invalid
docs
context.screen.height optional Screen height in pixels. RudderStack's Pixel API sample sends an integer. Fix: Send the height in pixels, such as `1080`. vendor.rudderstack.param.context.screen.height.empty
vendor.rudderstack.param.context.screen.height.invalid
docs
context.page.path optional Path of the page being viewed. vendor.rudderstack.param.context.page.path.empty docs
context.page.url optional Full page URL. RudderStack documents `path`, `url`, `referrer`, and `title` on `context.page`. Fix: Send an absolute URL in `context.page.url`, including the scheme. vendor.rudderstack.param.context.page.url.empty
vendor.rudderstack.param.context.page.url.invalid
docs
context.page.referrer optional Referrer URL of the page being viewed. Fix: Send an absolute referrer URL, or drop the empty pair. vendor.rudderstack.param.context.page.referrer.empty
vendor.rudderstack.param.context.page.referrer.invalid
docs
context.page.title optional Title of the page being viewed. vendor.rudderstack.param.context.page.title.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.missing
vendor.rudderstack.body.type.empty
vendor.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
groupId optional Unique identifier of the group. RudderStack documents it as required on a group call. Fix: Set `groupId` to the group in your database. vendor.rudderstack.body.groupId.empty docs
previousId optional The previous unique identifier of the user. RudderStack documents it on an alias call. Fix: Set `previousId` to the id being merged. vendor.rudderstack.body.previousId.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
body.group_requires_group_id required A `group` call carries no `groupId`. RudderStack documents the group id as required. Fix: Set `groupId` to the group in your database. vendor.rudderstack.body.group_requires_group_id docs
body.alias_requires_previous_id required An `alias` call carries no `previousId`. RudderStack documents the previous unique identifier on alias. Fix: Set `previousId` to the id being merged. vendor.rudderstack.body.alias_requires_previous_id 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.empty
vendor.rudderstack.body.timestamp.invalid
docs
sentAt optional RudderStack documents `sentAt` as the client send time, used with `anonymousId` to keep event order. Fix: Send an ISO 8601 timestamp such as `2022-02-01T19:14:18.381Z`. vendor.rudderstack.body.sentAt.empty
vendor.rudderstack.body.sentAt.invalid
docs
context.ip optional It is the visitor IP, sent unhashed. RudderStack's HTTP samples send a raw address. vendor.rudderstack.body.context.ip.empty docs
name optional Name of the page or screen. RudderStack's HTTP page and screen samples send it. vendor.rudderstack.body.name.empty docs
context.library.name optional Name of the library that produced the call. RudderStack's HTTP samples send `http`. vendor.rudderstack.body.context.library.name.empty docs
properties.revenue optional Amount associated with the event. RudderStack's HTTP track sample sends a decimal number such as `4.99`. Fix: Send a number such as `4.99`, with no currency symbol. vendor.rudderstack.body.properties.revenue.empty
vendor.rudderstack.body.properties.revenue.invalid
docs
properties.path optional Path of the page being viewed. RudderStack's HTTP page sample sends it on `properties`. vendor.rudderstack.body.properties.path.empty docs
properties.title optional Title of the page being viewed. RudderStack's HTTP page sample sends it on `properties`. vendor.rudderstack.body.properties.title.empty 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
body.hashed_plaintext_field required `context.ip` looks like a SHA-256 digest, but RudderStack documents it as an IP address. Fix: Send the raw IP address. vendor.rudderstack.body.hashed_plaintext_field docs

Validate a payload

pixellint validate json @payload.json --rulepack vendor/rudderstack

Try this failing payload in the playground. RudderStack group call without groupId.

{"context":{"library":{"name":"http"}},"batch":[{"type":"group","userId":"user123","context":{"library":{"name":"http"}}}]}

cargo install pixellint · npm install pixellint