TikTok browser events use their own collector payload.
The pinned pixel.js runtime sends browser events to analytics.tiktok.com/api/v2/pixel. POST JSON and Base64URL image fallbacks receive the same advisory payload checks.
Custom events, array properties and plain external IDs remain valid. The Events API, onsite shop events, interaction and performance collectors have separate schemas.
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 |
|---|---|---|---|---|
analytics_message |
optional | The image fallback carries unpadded UTF-8 Base64URL JSON. | docs | |
root |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.root.invalid |
docs |
event |
recommended | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. Maximum decoded characters: 50. | vendor.tiktok-browser.body.event.missingvendor.tiktok-browser.body.event.emptyvendor.tiktok-browser.body.event.invalid |
docs |
event_id |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.event_id.invalid |
docs |
message_id |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.message_id.invalid |
docs |
timestamp |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.timestamp.emptyvendor.tiktok-browser.body.timestamp.invalid |
docs |
is_onsite |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: boolean. | vendor.tiktok-browser.body.is_onsite.invalid |
docs |
context |
recommended | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.context.missingvendor.tiktok-browser.body.context.invalid |
docs |
context.pixel |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.context.pixel.invalid |
docs |
context.pixel.code |
recommended | The pinned producer emits this native JSON type. Applies when {"kind":"not","condition":{"kind":"value_in","param":"is_onsite","values":["true"]}}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.pixel.code.missingvendor.tiktok-browser.body.context.pixel.code.invalid |
docs |
context.pixel.runtime |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.pixel.runtime.invalid |
docs |
context.page |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.context.page.invalid |
docs |
context.page.url |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.page.url.emptyvendor.tiktok-browser.body.context.page.url.invalid |
docs |
context.page.referrer |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.page.referrer.emptyvendor.tiktok-browser.body.context.page.referrer.invalid |
docs |
context.library |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.context.library.invalid |
docs |
context.library.name |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.library.name.invalid |
docs |
context.library.version |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.library.version.invalid |
docs |
context.user |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.context.user.invalid |
docs |
context.user.email |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.user.email.emptyvendor.tiktok-browser.body.context.user.email.invalid |
docs |
context.user.phone_number |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.user.phone_number.emptyvendor.tiktok-browser.body.context.user.phone_number.invalid |
docs |
context.user.external_id |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.user.external_id.invalid |
docs |
properties |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: object or array. | vendor.tiktok-browser.body.properties.invalid |
docs |
properties.value |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: number or string. | vendor.tiktok-browser.body.properties.value.emptyvendor.tiktok-browser.body.properties.value.invalid |
docs |
properties.currency |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.properties.currency.emptyvendor.tiktok-browser.body.properties.currency.invalid |
docs |
properties.content_type |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.properties.content_type.emptyvendor.tiktok-browser.body.properties.content_type.invalid |
docs |
properties.contents |
optional | The pinned producer emits this native JSON type. Presence diagnostic severity: warning. Native JSON type: array. | vendor.tiktok-browser.body.properties.contents.invalid |
docs |
root |
optional | The pinned producer emits this native JSON type. Body scope: properties.contents[]. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.root.invalid |
docs |
root |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.root.invalid |
docs |
event |
recommended | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. Maximum decoded characters: 50. | vendor.tiktok-browser.body.event.missingvendor.tiktok-browser.body.event.emptyvendor.tiktok-browser.body.event.invalid |
docs |
event_id |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.event_id.invalid |
docs |
message_id |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.message_id.invalid |
docs |
timestamp |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.timestamp.emptyvendor.tiktok-browser.body.timestamp.invalid |
docs |
is_onsite |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: boolean. | vendor.tiktok-browser.body.is_onsite.invalid |
docs |
context |
recommended | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.context.missingvendor.tiktok-browser.body.context.invalid |
docs |
context.pixel |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.context.pixel.invalid |
docs |
context.pixel.code |
recommended | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Applies when {"kind":"not","condition":{"kind":"value_in","param":"is_onsite","values":["true"]}}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.pixel.code.missingvendor.tiktok-browser.body.context.pixel.code.invalid |
docs |
context.pixel.runtime |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.pixel.runtime.invalid |
docs |
context.page |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.context.page.invalid |
docs |
context.page.url |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.page.url.emptyvendor.tiktok-browser.body.context.page.url.invalid |
docs |
context.page.referrer |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.page.referrer.emptyvendor.tiktok-browser.body.context.page.referrer.invalid |
docs |
context.library |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.context.library.invalid |
docs |
context.library.name |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.library.name.invalid |
docs |
context.library.version |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.library.version.invalid |
docs |
context.user |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.context.user.invalid |
docs |
context.user.email |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.user.email.emptyvendor.tiktok-browser.body.context.user.email.invalid |
docs |
context.user.phone_number |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.user.phone_number.emptyvendor.tiktok-browser.body.context.user.phone_number.invalid |
docs |
context.user.external_id |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.context.user.external_id.invalid |
docs |
properties |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: object or array. | vendor.tiktok-browser.body.properties.invalid |
docs |
properties.value |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: number or string. | vendor.tiktok-browser.body.properties.value.emptyvendor.tiktok-browser.body.properties.value.invalid |
docs |
properties.currency |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.properties.currency.emptyvendor.tiktok-browser.body.properties.currency.invalid |
docs |
properties.content_type |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: string. | vendor.tiktok-browser.body.properties.content_type.emptyvendor.tiktok-browser.body.properties.content_type.invalid |
docs |
properties.contents |
optional | The pinned producer emits this native JSON type. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: array. | vendor.tiktok-browser.body.properties.contents.invalid |
docs |
root |
optional | The pinned producer emits this native JSON type. Body scope: properties.contents[]. Decoded body source: analytics_message. Encoding: base64_json. Decoding diagnostic severity: warning. Applies when {"kind":"exists","param":"analytics_message"}. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.body.root.invalid |
docs |
method |
recommended | The source uses these transport methods. Complete HTTP capture contract. Presence diagnostic severity: warning. | vendor.tiktok-browser.http.method.missingvendor.tiktok-browser.http.method.emptyvendor.tiktok-browser.http.method.invalid |
docs |
body |
recommended | A complete capture needs the JSON request body. Complete HTTP capture contract. Applies when {"kind":"value_in","param":"method","values":["POST"]}. Presence diagnostic severity: warning. Native JSON type: object. | vendor.tiktok-browser.http.body.missingvendor.tiktok-browser.http.body.invalid |
docs |
Validate a payload
pixellint validate request @request.json --rulepack vendor/tiktok-browser
Try this failing payload in the playground. A TikTok browser event with a nonnumeric value.
{"url": "https://analytics.tiktok.com/api/v2/pixel", "method": "POST", "headers": {"Content-Type": "application/json"}, "body": "{\"event\": \"Purchase\", \"context\": {\"pixel\": {\"code\": \"synthetic\"}}, \"properties\": {\"value\": \"free\"}}"}
cargo install pixellint
·
npm install pixellint