---
title: How SEO analytics collection works
description: Five source families collected daily into six time-series tables and one composite health score — and the list of ways search data lies to you if you read it naively.
locale: en
version: 0.2.0
canonical: https://enterium-developer-docs.pages.dev/developers/how-it-works/seo-analytics/
---

> Documentation index: https://enterium-developer-docs.pages.dev/developers/llms.txt — every page of this portal has a Markdown twin at <route>.md; the frozen API contract is at https://enterium-developer-docs.pages.dev/developers/api/openapi.json.

**The problem:** search platforms report metrics in cumulative windows,
with multi-day lag, retroactive corrections and per-surface quirks. Read
naively, the data produces confident nonsense. The analytics layer's job
is to turn that into **owned time series** with the distortions named and
handled.

## Layer 1 — collectors into owned storage

A daily collection run sweeps the connected sources — search console
(impressions, clicks, queries, indexation), a second search engine's
webmaster surface, SERP presence and discovery-eligibility probes, CDN
analytics, and a domain-authority probe — each as its own collector with
its own cadence quirks. Everything lands in **six Postgres tables** with
idempotent upserts on natural keys; the raw per-day JSON is treated as
ephemeral scratch. The database is the only durable truth.

```mermaid
flowchart LR
    subgraph SRC [Sources]
      GSC[Search console]
      BW[2nd engine webmaster]
      SERP[SERP + discovery probes]
      CDN[CDN analytics]
      DR[Authority probe]
    end
    SRC --> RUN[Daily collection run]
    RUN --> T[(6 time-series tables:<br/>run · instance snapshot ·<br/>search metric · page audit ·<br/>index check · authority)]
    T --> H[Composite health score<br/>+ boolean health flags]
    T --> LOOP[Topic feedback loop]
```

## Layer 2 — the instance snapshot and health score

The workhorse table is the **daily per-site snapshot**: one row per site
per day, carrying the raw window values plus a computed **composite
health score** and a set of boolean health flags — canonicalization
drift, scheme mismatches, feed bloat, title overflow, crawler silence,
rising 404s. One function computes all of it, so the dashboard, the
nightly report and the alerts read the same verdicts.

## Layer 3 — the distortions, named

This is the part most analytics setups leave implicit. Rules for reading
this data, stated as system knowledge:

```mermaid
timeline
    title The life of one day's search data
    Day 0 : impressions happen
    Day 1-3 : platform reports with lag — zeros are "not final yet"
    Day 7 : weekly delta of two snapshots = the real weekly number
    Later : history silently backfilled and corrected upstream
```

- **Cumulative windows.** Snapshot impression/click values are
  long-window cumulative totals — a weekly figure is always the *delta of
  two snapshots*, never a raw column.
- **Maturation lag.** Fresh days arrive incomplete and get corrected for
  up to several days — a zero delta on yesterday means "not finalized",
  not "no impressions".
- **Top-N breakdowns never sum to totals** — expected sampling behavior,
  not a data-quality bug.
- **Different windows per source.** The CDN reports rolling 30-day
  windows; bot-hit sampling uses a shorter adaptive window; the two
  cannot be compared cell-to-cell.

The topic feedback loop consumes this data through maturity filters
precisely because of these distortions — young pages are excluded from
verdicts until their signal has settled.

## Trade-offs

Some cells of the matrix are deliberately empty: one analytics suite and
one commercial SEO API are not integrated (evaluated, not wired); the
page-experience collector exists but is skipped in production to
conserve quota; and the geographic breakdown is collected upstream but
not yet persisted into the time series — documented, so nobody mistakes
"not stored" for "no traffic". The authority probe runs weekly through an
indirect path rather than from the production host.

## See it in two minutes

The `analytics` API domain exposes the snapshots and health flags; the
weekly owner report is built from exactly these tables — every number in
it traceable to a row.
