pixellint

Yandex Measurement Protocol is /collect, not /watch

The Measurement Protocol posts to mc.yandex.ru/collect. tid, cid, and t are required. A pageview without page fields and a purchase without a transaction id are the usual misses.

pageview needs dl, dr, and dt

t=pageview without those three is an incomplete hit. The pack flags it rather than treating the event type as enough.

Rule: vendor.yandex-metrica.pageview_requires_page_fields

What this pack matches

Hosts
mc.yandex.ru
Paths
/collect
Vendor docs
yandex.com/dev/metrika/en/data-import/measurement-upload

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
tid required It is the Yandex Metrica tag ID, and the Measurement Protocol requires it on every request. Fix: Set `tid` to the numeric tag ID from the Metrica interface. vendor.yandex-metrica.param.tid.missing
vendor.yandex-metrica.param.tid.empty
vendor.yandex-metrica.param.tid.invalid
docs
cid required It is the ClientID of the Metrica user, and the Measurement Protocol requires it on every request. Fix: Send the ClientID the browser tag assigned, as `cid`. vendor.yandex-metrica.param.cid.missing
vendor.yandex-metrica.param.cid.empty
docs
t required It is the interaction type. Yandex documents `pageview` and `event`. Fix: Set `t` to `pageview` or `event`. vendor.yandex-metrica.param.t.missing
vendor.yandex-metrica.param.t.empty
vendor.yandex-metrica.param.t.invalid
docs
dl optional It is the page URL. Yandex documents it as required on `pageview`. Fix: Send the page URL as `dl`. vendor.yandex-metrica.param.dl.empty
vendor.yandex-metrica.param.dl.invalid
docs
dr optional It is the referrer. Yandex documents it as required on `pageview`. Fix: Send the referrer as `dr`. vendor.yandex-metrica.param.dr.empty
vendor.yandex-metrica.param.dr.invalid
docs
dt optional It is the page title. Yandex documents it as required on `pageview`. Fix: Send the page title as `dt`. vendor.yandex-metrica.param.dt.empty docs
ea optional It is the JavaScript goal identifier, sent with `t=event`. Ecommerce examples send `pa` instead. Fix: Send the goal ID as `ea`, or send an ecommerce action as `pa`. vendor.yandex-metrica.param.ea.empty docs
pa optional It is the ecommerce action. Yandex documents `detail`, `add`, `remove`, and `purchase`. Fix: Set `pa` to `detail`, `add`, `remove`, or `purchase`. vendor.yandex-metrica.param.pa.empty
vendor.yandex-metrica.param.pa.invalid
docs
ti optional It is the ecommerce transaction ID. Yandex documents it as required when `pa=purchase`. Fix: Send the transaction ID as `ti` on purchase events. vendor.yandex-metrica.param.ti.empty docs
tr optional It is the ecommerce transaction revenue. Yandex documents it as required when `pa=purchase`. Fix: Send the transaction revenue as `tr` on purchase events. vendor.yandex-metrica.param.tr.empty
vendor.yandex-metrica.param.tr.invalid
docs
cu optional It is the currency for a valued goal or an ecommerce event. Fix: Use the three-letter code, such as `RUB`. vendor.yandex-metrica.param.cu.empty
vendor.yandex-metrica.param.cu.invalid
docs
ms recommended It is the Measurement Protocol secret token. The parameter table does not mark it required, but every upload example sends it, and the support article says to send the token obtained when the feature is enabled. Fix: Enable Measurement Protocol in the tag settings and send the token as `ms`. vendor.yandex-metrica.param.ms.missing
vendor.yandex-metrica.param.ms.empty
docs
et optional The vendor documents `et` in the request contract. vendor.yandex-metrica.param.et.empty
vendor.yandex-metrica.param.et.invalid
docs
params optional The vendor documents `params` in the request contract. Maximum decoded characters: 8192. vendor.yandex-metrica.param.params.empty
vendor.yandex-metrica.param.params.invalid
docs
tcc optional The vendor documents `tcc` in the request contract. vendor.yandex-metrica.param.tcc.empty docs
pr1id… optional The vendor documents `pr1id` in the request contract. vendor.yandex-metrica.param.pr1id.empty docs
pr1nm… optional The vendor documents `pr1nm` in the request contract. vendor.yandex-metrica.param.pr1nm.empty docs
pr1br… optional The vendor documents `pr1br` in the request contract. vendor.yandex-metrica.param.pr1br.empty docs
pr1ca… optional The vendor documents `pr1ca` in the request contract. vendor.yandex-metrica.param.pr1ca.empty docs
pr1va… optional The vendor documents `pr1va` in the request contract. vendor.yandex-metrica.param.pr1va.empty docs
pr1pr… optional The vendor documents `pr1pr` in the request contract. vendor.yandex-metrica.param.pr1pr.empty
vendor.yandex-metrica.param.pr1pr.invalid
docs
pr1qt… optional The vendor documents `pr1qt` in the request contract. vendor.yandex-metrica.param.pr1qt.empty
vendor.yandex-metrica.param.pr1qt.invalid
docs
pr1cc… optional Product coupon code. vendor.yandex-metrica.param.pr1cc.empty docs
pr1ps… optional Product position. vendor.yandex-metrica.param.pr1ps.empty
vendor.yandex-metrica.param.pr1ps.invalid
docs
sr optional vendor.yandex-metrica.param.sr.empty
vendor.yandex-metrica.param.sr.invalid
docs
ev optional vendor.yandex-metrica.param.ev.empty
vendor.yandex-metrica.param.ev.invalid
docs
pageview_requires_page_fields required A `pageview` is missing `dl`, `dr`, or `dt`. Yandex documents the page URL, referrer, and title as required on that interaction. Fix: Send `dl` (page URL), `dr` (referrer), and `dt` (title) with `t=pageview`. vendor.yandex-metrica.pageview_requires_page_fields docs
purchase_requires_transaction required Purchase events require transaction ID and revenue. Fix: Send `ti` (transaction ID) and `tr` (revenue) with `pa=purchase`. vendor.yandex-metrica.purchase_requires_transaction docs
purchase_coupon_documentation_conflict recommended The parameter table requires tcc on purchase, while published purchase examples omit it. vendor.yandex-metrica.purchase_coupon_documentation_conflict docs
event_needs_action required An event identifies a goal with ea or an ecommerce action with pa. vendor.yandex-metrica.event_needs_action docs
event_time_window required Events can be transmitted up to 12 hours back from the current time. vendor.yandex-metrica.event_time_window docs
ecommerce_requires_product_id recommended The parameter table says a product code is required when an ecommerce action is set. Published examples send pr1id. Fix: Send the first product code as pr1id when pa is set. vendor.yandex-metrica.ecommerce_requires_product_id docs
root optional Decoded body source: params. Encoding: json. Native JSON type: object or array. vendor.yandex-metrica.body.root.invalid docs
[] optional Decoded body source: params. Encoding: json. Native JSON type: object. vendor.yandex-metrica.body.[].invalid docs
root optional Decoded body source: params. Encoding: json. Applies when {"kind":"json_type","param":"","json_type":["object","array"]}. Value diagnostic severity: warning. Native JSON type: object or array. Maximum container depth: 10. vendor.yandex-metrica.body.root.invalid docs

Validate a payload

pixellint validate url "$ARTIFACT" --rulepack vendor/yandex-metrica

Try this failing payload in the playground. Yandex collect missing tid.

https://mc.yandex.ru/collect?t=pageview

cargo install pixellint · npm install pixellint