viakite
Dashboard

API/Reports/What led visitors to a broken page

What led visitors to a broken page

POST/v1/projects/{project}/analytics/broken-pages/links

The top 20 ways visitors reached a page that answered 404, by views: the page of the site viewed just before it in the same visit (kind site), or, when the visit started on it, the address of the other site that linked to it (kind external). Visits that started on it without a referrer (typed, a bookmark, an app) are left out.

Secret keyNeeds analytics.viewus.api.vk.viabio.me

Path parameters

projectstringrequired
The project's id (prj_…).

Body

pagestringrequiredup to 2000 chars
The broken page's path.
filtersFilter[]
A dimension matching any of up to 20 values, or or, a list of such filters (not nested). Filters in a list are ANDed; up to 20 in all. goal matches the names of the project's saved goals an event reaches (is_not: none of them); page_group matches the name of the first of the project's saved page groups whose pattern the event's path matches (empty when none does); new_returning is New or Returning.
Show 4 fields
dimensionstring
A dimension's name; keyed ones take a key: props.plan.
operatorstring
isis_notcontainsnot_containsstarts_withregex
valuesstring[]1–20 items
orFilter[]
date_rangeobject
A preset, or from and to as dates (2026-11-01, whole days in the project's time zone, to included) or RFC 3339 times (to excluded). Empty means the last 30 days. A range starting before the first day the plan keeps (retention_days of F47: the last N days, today included, in the project's time zone) starts on that day instead: the answer's date_range shows where it starts, and F1, F2 and the public queries add a range_clamped warning. A range wholly before it is empty.
Show 3 fields
presetstring
todayyesterday7d30d90dthis_monthlast_monththis_yearall
fromstring
tostring

Responses

The links, most views first.

pagestringrequired
dataBrokenLink[]required
Show 3 fields
kindstringrequired
siteexternal
fromstringrequired
A page of the site (site), or the other site's address (external).
viewsnumberrequired
Example response
1{
2 "page": "/pricing",
3 "data": [
4 {
5 "kind": "site",
6 "from": "2026-11-01",
7 "views": 1.5
8 }
9 ]
10}

Errors

Every error has the same shape: error.code, a message for people and details.

StatusCode
422validation_error
503clickhouse_not_configured