All articles

Architecture & components

Logical diagram

┌─────────────────┐     HTTPS POST /track      ┌──────────────────┐
│  Brand websites │ ────────────────────────► │   uts-api (Node) │
│  uts-tracker.js │     JSON + attribution    │   Express        │
└────────┬────────┘                           └────────┬─────────┘
         │ gtag / fbq / Clarity (browser)               │
         ▼                                             ▼
┌─────────────────┐                           ┌───────────────┐
│ Google / Meta   │                           │  ClickHouse   │
│ (tags + APIs)   │                           │  uts_events + │
└─────────────────┘                           │  attribution_* │
                                              └───────┬───────┘
                                                      │
                                                      ▼
                                              ┌───────────────┐
                                              │ uts-dashboard │
                                              │ Next.js + API │
                                              └───────────────┘

Major parts

PartRole
uts-tracker.jsClient library: IDs, attribution capture, sendEvent, optional gtag / fbq / Clarity hooks, beacon to /track. See Browser tracker.
uts-api (server.js)Express app: CORS, ClickHouse inserts, GA4 MP + Meta CAPI + Google Ads offline forwarding, lead-form dedupe for LeadFormSubmitted. See Server forwarding.
ClickHouseColumnar store: uts_events primary fact table; optional attribution tables for journey/sources. See ClickHouse & attribution.
TraefikTLS + routing: analytics.* → API, dashboard.* → dashboard container.
DashboardOperator UI: events, widgets, CAPI status, Knowledge Base.

Environment boundaries

  • Public: /track, static /uts-tracker.js, health GET /.
  • Authenticated admin: /admin/* with bearer key (operational use).

Related