diff --git a/docs/analytics.md b/docs/analytics.md index 7ca688a..d39b6cd 100644 --- a/docs/analytics.md +++ b/docs/analytics.md @@ -147,6 +147,8 @@ Each `Visit` record: does not append. - `utm` — `utm_*` query parameters from the landing URL, as a dict. - `read` — active reading time per path (seconds), keyed by path. +- `statuses` — HTTP status of the response when each path was first seen + (200 or 404), keyed by path. Each `CrawlerHit` record: @@ -154,7 +156,9 @@ Each `CrawlerHit` record: - `entry` — page path requested, - `client` — 6-byte blake3 hash referencing `Analytics.clients`, - `referer` — external https origin of the request, `""` for direct/none, -- `query` — raw query string of the request. +- `query` — raw query string of the request, +- `status` — HTTP status of the served response (200 for a real page, 404 + for a category placeholder or missing page). Each `AbuseHit` record: @@ -173,6 +177,10 @@ that triggered classification are lifted to the top, followed by other 404s and then document GETs from the abuser. Within each category paths are sorted by count descending, then by their earliest hit. +In the visitor and crawler tables, internal paths that returned a 404 status +are shown in red and the link title includes the status code, so it is easy +to tell misses from real pages at a glance. + ## Aggregates - `transitions`: time series of page transitions, sparse nested dict diff --git a/frontend/src/AnalyticsView.vue b/frontend/src/AnalyticsView.vue index 8d885ad..4a11576 100644 --- a/frontend/src/AnalyticsView.vue +++ b/frontend/src/AnalyticsView.vue @@ -425,6 +425,11 @@ const abuseRows = computed(() => formatAbuseRows(rangeData.value?.abuse || [], c margin-left: 0.5rem; } +.analytics-view :deep(.trail-link.error), +.analytics-view :deep(.trail-link.error:hover) { + color: var(--error, #c00); +} + .visit-table .utm-tag { display: inline-block; max-width: 100%; diff --git a/frontend/src/TrailLink.vue b/frontend/src/TrailLink.vue index a9482e1..3fceaa2 100644 --- a/frontend/src/TrailLink.vue +++ b/frontend/src/TrailLink.vue @@ -1,18 +1,33 @@