All articles

ClickHouse & attribution tables

Primary fact table: uts_events

One row per accepted signal with tenant site_domain, marketing ids (gclid, fbclid, …), event_data JSON string (enriched server-side with geo/device, and Ads click IDs copied onto JSON for dedupe/matching), and delivery status columns for forwards (meta_capi_status, google_capi_status — the latter holds Google Ads upload state, not GA4).

Attribution tables

TablePurpose
attribution_sourcesSession/source snapshots when UTMs or new session flags warrant a row.
attribution_journeyMulti-touch steps (touch_type: page view, scroll depth, form submit, CTA…). site_domain supports dashboard filtering. Visitor/session ids are stored as UUIDs derived deterministically from tracker strings.
attribution_conversionsConversion rows for qualified leads (e.g. form submit with email/phone).

Dashboard consumption

  • /api/widgets includes journeyTouches (counts by touch_type) scoped by time range and domain when site_domain is populated.

Related