Plausible events need name, url, and domain
POST JSON to /api/event. name is pageview or a custom event. url is the absolute page URL. domain is the site as configured in Plausible. Self-hosted collectors stay attributed.
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 |
|---|---|---|---|---|
name |
optional | It is the event name. `pageview` is the special page-view event; any other value is a custom event. The tracker also sends this as `n`. Presence diagnostic severity: error. Native JSON type: string or integer. Maximum decoded characters: 120. Fix: Set `name` to `pageview` or to a custom event name. | vendor.plausible.body.name.emptyvendor.plausible.body.name.invalid |
docs |
n |
optional | Short key for `name`, used by the JavaScript tracker. Presence diagnostic severity: error. Native JSON type: string or integer. Maximum decoded characters: 120. Fix: Set `n` or `name` to the event name. | vendor.plausible.body.n.emptyvendor.plausible.body.n.invalid |
docs |
url |
optional | Plausible accepts absolute, app and relative URLs. Data URIs are unsupported. Presence diagnostic severity: error. Native JSON type: string. Fix: Send the page URL or relative page path. | vendor.plausible.body.url.emptyvendor.plausible.body.url.invalid |
docs |
u |
optional | Plausible accepts absolute, app and relative URLs. Data URIs are unsupported. Presence diagnostic severity: error. Native JSON type: string. Fix: Send the page URL or relative page path. | vendor.plausible.body.u.emptyvendor.plausible.body.u.invalid |
docs |
domain |
optional | It is the site domain as configured in the Plausible account. The tracker also sends this as `d`. Presence diagnostic severity: error. Native JSON type: string. Fix: Set `domain` to the domain you added in Plausible, such as `example.com`. | vendor.plausible.body.domain.emptyvendor.plausible.body.domain.invalid |
docs |
d |
optional | Short key for `domain`, used by the JavaScript tracker. Presence diagnostic severity: error. Native JSON type: string. Fix: Set `d` or `domain` to the Plausible site domain. | vendor.plausible.body.d.emptyvendor.plausible.body.d.invalid |
docs |
referrer |
optional | It is the referrer for this event. Plausible documents it as optional; the tracker sends `document.referrer`. Native JSON type: string. Fix: Send the referring URL or host in `referrer`, or drop the empty pair. | vendor.plausible.body.referrer.emptyvendor.plausible.body.referrer.invalid |
docs |
revenue.currency |
optional | It is the ISO 4217 currency of `revenue.amount`. Plausible discards revenue data when the currency is invalid, and still records the event. Value diagnostic severity: warning. Native JSON type: string. Fix: Send a three-letter currency code in `revenue.currency`, such as `USD`. | vendor.plausible.body.revenue.currency.emptyvendor.plausible.body.revenue.currency.invalid |
docs |
revenue.amount |
optional | It is the revenue amount. Plausible documents a float or numeric string, and discards revenue data when the amount is invalid. Value diagnostic severity: warning. Native JSON type: number or string. Fix: Send `revenue.amount` as a number or numeric string, such as `1322.22`, without a currency symbol. | vendor.plausible.body.revenue.amount.emptyvendor.plausible.body.revenue.amount.invalid |
docs |
interactive |
optional | It says whether the event counts for bounce detection. Plausible documents a boolean; omit it, or send `false` for a non-interactive custom event. Native JSON type: boolean. Fix: Send `true` or `false`, or omit `interactive`. | vendor.plausible.body.interactive.emptyvendor.plausible.body.interactive.invalid |
docs |
props |
optional | Plausible retains at most 30 custom property entries and discards additional entries. Value diagnostic severity: warning. Native JSON type: object. Maximum object properties: 30. | vendor.plausible.body.props.invalid |
docs |
revenue |
optional | The vendor documents `revenue` in the request contract. Native JSON type: object. | vendor.plausible.body.revenue.invalid |
docs |
root |
optional | The vendor documents `` in the request contract. Native JSON type: object. | vendor.plausible.body.root.invalid |
docs |
props.* |
optional | Custom properties accept scalar values. Arrays and objects are discarded; null is displayed as (none). Value diagnostic severity: warning. Native JSON type: string or number or boolean or null. Maximum decoded characters: 2000. | vendor.plausible.body.props.*.invalid |
docs |
overlong_property_name… |
forbidden | Custom property names are limited to 300 characters. Presence diagnostic severity: warning. | vendor.plausible.body.overlong_property_name.forbidden |
docs |
event_name_required |
required | The event has neither `name` nor `n`. Plausible documents `name` as required. Fix: Set `name` (or `n`) to `pageview` or to a custom event name. | vendor.plausible.event_name_required |
docs |
page_url_required |
required | The event has neither `url` nor `u`. Plausible documents `url` as required. Fix: Set `url` (or `u`) to an absolute page URL. | vendor.plausible.page_url_required |
docs |
domain_required |
required | The event has neither `domain` nor `d`. Plausible documents `domain` as required. Fix: Set `domain` (or `d`) to the site domain configured in Plausible. | vendor.plausible.domain_required |
docs |
body.data_url_unsupported |
required | `url` uses the data URI scheme. Plausible documents that data URLs are not supported by the Events API. Fix: Send an `http`, `https`, or app URL such as `https://example.com/page` or `app://localhost/login`. | vendor.plausible.body.data_url_unsupported |
docs |
body.amount_requires_currency |
recommended | The event sends `revenue.amount` without `revenue.currency`. Plausible documents both on the revenue object. Fix: Add `revenue.currency` as an ISO 4217 code, such as `USD`. | vendor.plausible.body.amount_requires_currency |
docs |
body.currency_requires_amount |
recommended | The event sends `revenue.currency` without `revenue.amount`. Plausible documents both on the revenue object. Fix: Add `revenue.amount` as a number or numeric string, such as `1322.22`. | vendor.plausible.body.currency_requires_amount |
docs |
url_path_limit |
required | The page URL path exceeds Plausible's published 2000-character limit. | vendor.plausible.url_path_limit |
docs |
u_path_limit |
required | The page URL path exceeds Plausible's published 2000-character limit. | vendor.plausible.u_path_limit |
docs |
method |
required | This published ingestion operation uses HTTP POST. Complete HTTP capture contract. Native JSON type: string. | vendor.plausible.http.method.missingvendor.plausible.http.method.emptyvendor.plausible.http.method.invalid |
docs |
content_type |
required | Use a published request media type. Complete HTTP capture contract. Native JSON type: string. | vendor.plausible.http.content_type.missingvendor.plausible.http.content_type.emptyvendor.plausible.http.content_type.invalid |
docs |
body |
required | The request body is a JSON object. Complete HTTP capture contract. Native JSON type: object. | vendor.plausible.http.body.missingvendor.plausible.http.body.invalid |
docs |
headers.user-agent |
required | Plausible requires the original visitor User-Agent. Complete HTTP capture contract. Native JSON type: string. | vendor.plausible.http.headers.user-agent.missingvendor.plausible.http.headers.user-agent.emptyvendor.plausible.http.headers.user-agent.invalid |
docs |
headers.x-forwarded-for |
optional | Optional IP chain. Plausible uses the first valid IPv4 or IPv6 address. Complete HTTP capture contract. Native JSON type: string. | vendor.plausible.http.headers.x-forwarded-for.emptyvendor.plausible.http.headers.x-forwarded-for.invalid |
docs |
Validate a payload
pixellint validate json @payload.json --rulepack vendor/plausible
Try this failing payload in the playground. Plausible event with an empty name.
{"name":"","url":"https://example.com/pricing","domain":"example.com"}
cargo install pixellint
·
npm install pixellint