pixellint

X website events keep legacy and OneTag payloads distinct.

Legacy tags use /i/adsct and OneTag uses /1/i/adsct. Form beacons use the corresponding adsctp routes. Nested event objects and legacy event tuples retain custom properties.

New metadata and hash checks are advisory source conventions. Signed revenue emitted by the SDK remains valid. The Conversions API has a separate pack.

What this pack matches

Hosts
analytics.twitter.com, analytics.x.com, t.co
Paths
/i/adsct, /i/adsctp, /1/i/adsct, /1/i/adsctp
Vendor docs
business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html

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
txn_id required It is the conversion or pixel ID the website tag fires. X documents the JavaScript tag rather than this query, so the rule is ecosystem evidence. Fix: Copy the conversion ID from the generated website tag so `txn_id` carries it. vendor.x.param.txn_id.missing
vendor.x.param.txn_id.empty
docs
p_id recommended Generated image pixels send `p_id=Twitter`. Value diagnostic severity: warning. Fix: Keep `p_id=Twitter` from the generated website tag. vendor.x.param.p_id.missing
vendor.x.param.p_id.empty
vendor.x.param.p_id.invalid
docs
tw_sale_amount optional Purchase fires send the revenue amount. Generated pixels use a number with no currency symbol. Value diagnostic severity: warning. Fix: Set tw_sale_amount to a number such as 10 or 10.50, not $10. vendor.x.param.tw_sale_amount.empty
vendor.x.param.tw_sale_amount.invalid
docs
tw_order_quantity optional Purchase fires send the item count as an integer. Value diagnostic severity: warning. Fix: Set tw_order_quantity to the item count, digits only. vendor.x.param.tw_order_quantity.empty
vendor.x.param.tw_order_quantity.invalid
docs
twclid optional It is the X click identifier from the landing URL. X documents twclid as a matching identifier on the pixel and the conversion API. Page fires without an ad click omit it. Evidence: vendor documented. Fix: Set twclid to the click ID from the landing URL query, or drop the pair when there was no click. vendor.x.param.twclid.empty docs
tw_document_href optional Pinned UWT producer metadata. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.tw_document_href.empty
vendor.x.param.tw_document_href.invalid
docs
tw_document_referrer optional Pinned UWT producer metadata. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.tw_document_referrer.empty
vendor.x.param.tw_document_referrer.invalid
docs
version optional Pinned UWT producer metadata. Presence diagnostic severity: warning. Evidence: vendor template. docs
type optional Pinned UWT producer metadata. Presence diagnostic severity: warning. Evidence: vendor template. docs
integration optional Pinned UWT producer metadata. Presence diagnostic severity: warning. Evidence: vendor template. docs
event_id optional Pinned UWT producer metadata. Presence diagnostic severity: warning. Evidence: vendor template. docs
pl_id optional Pinned UWT producer metadata. Presence diagnostic severity: warning. Evidence: vendor template. docs
tw_session_id optional Pinned UWT producer metadata. Presence diagnostic severity: warning. Evidence: vendor template. docs
tw_engaged_ms optional Pinned producer emits a nonnegative integer. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.tw_engaged_ms.empty
vendor.x.param.tw_engaged_ms.invalid
docs
tw_session_count optional Pinned producer emits a nonnegative integer. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.tw_session_count.empty
vendor.x.param.tw_session_count.invalid
docs
tw_session_start optional Pinned producer emits a nonnegative integer. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.tw_session_start.empty
vendor.x.param.tw_session_start.invalid
docs
bci optional Pinned producer emits a nonnegative integer. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.bci.empty
vendor.x.param.bci.invalid
docs
eci optional Pinned producer emits a nonnegative integer. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.eci.empty
vendor.x.param.eci.invalid
docs
tw_iframe_status optional Pinned producer marks iframe context as 0 or 1. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.tw_iframe_status.empty
vendor.x.param.tw_iframe_status.invalid
docs
email_address optional Pinned producer hashes matching data before transport. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.email_address.empty
vendor.x.param.email_address.invalid
docs
phone_number optional Pinned producer hashes matching data before transport. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.phone_number.empty
vendor.x.param.phone_number.invalid
docs
external_id optional Pinned producer hashes matching data before transport. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.external_id.empty
vendor.x.param.external_id.invalid
docs
first_name optional Pinned producer hashes matching data before transport. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.first_name.empty
vendor.x.param.first_name.invalid
docs
last_name optional Pinned producer hashes matching data before transport. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.param.last_name.empty
vendor.x.param.last_name.invalid
docs
event optional Pinned producer serializes nested event data as JSON. Evidence: vendor template. docs
events optional Pinned producer serializes nested event data as JSON. Evidence: vendor template. docs
root optional The published contract specifies this field type. Decoded body source: event. Encoding: json. Decoding diagnostic severity: warning. Presence diagnostic severity: warning. Evidence: vendor template. Native JSON type: object. vendor.x.body.root.invalid docs
root optional The published contract specifies this field type. Decoded body source: events. Encoding: json. Decoding diagnostic severity: warning. Presence diagnostic severity: warning. Evidence: vendor template. Native JSON type: array. vendor.x.body.root.invalid docs
[] optional The published contract specifies this field type. Decoded body source: events. Encoding: json. Decoding diagnostic severity: warning. Presence diagnostic severity: warning. Evidence: vendor template. Native JSON type: array. Minimum array items: 2. Maximum array items: 2. vendor.x.body.[].invalid docs
[0] recommended The published contract specifies this field type. Body scope: []. Decoded body source: events. Encoding: json. Decoding diagnostic severity: warning. Presence diagnostic severity: warning. Evidence: vendor template. Native JSON type: string. vendor.x.body.[0].missing
vendor.x.body.[0].invalid
docs
[1] recommended The published contract specifies this field type. Body scope: []. Decoded body source: events. Encoding: json. Decoding diagnostic severity: warning. Presence diagnostic severity: warning. Evidence: vendor template. Native JSON type: object. vendor.x.body.[1].missing
vendor.x.body.[1].invalid
docs
method recommended Pinned producer uses GET images and POST form beacons. Complete HTTP capture contract. Presence diagnostic severity: warning. Evidence: vendor template. vendor.x.http.method.missing
vendor.x.http.method.empty
vendor.x.http.method.invalid
docs

Validate a payload

pixellint validate url "$ARTIFACT" --rulepack vendor/x

Try this failing payload in the playground. An X OneTag event with an array instead of an object.

https://analytics.x.com/1/i/adsct?txn_id=opaque&p_id=Twitter&event=%5B%5D

cargo install pixellint · npm install pixellint