vendor/yandex-metrica · vendor documented
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.
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 |
|---|---|---|---|---|
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.missingvendor.yandex-metrica.param.tid.emptyvendor.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.missingvendor.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.missingvendor.yandex-metrica.param.t.emptyvendor.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.emptyvendor.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.emptyvendor.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.emptyvendor.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 |
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.emptyvendor.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.missingvendor.yandex-metrica.param.ms.empty |
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 | A `pa=purchase` event is missing `ti` or `tr`. Yandex documents the transaction ID and revenue as required on purchase. Fix: Send `ti` (transaction ID) and `tr` (revenue) with `pa=purchase`. | vendor.yandex-metrica.purchase_requires_transaction |
docs |
Validate a payload
pixellint validate url "$ARTIFACT" --rulepack vendor/yandex-metrica
Or paste it into the playground. Same engine, in the browser, nothing sent anywhere.
cargo install pixellint
·
npm install pixellint