click_rate uses two different denominators in one /api/overview response

Author: runaway518Created Sep 2, 2026Updated Sep 2, 2026

click_rate is computed from two different denominators in the same /api/overview response, so the dashboard and the daily chart disagree for identical data.

  • Dashboardcore/internal/service/maillog_stat/overview.go:151: clicked / delivered
  • Chartcore/internal/service/maillog_stat/overview.go:615: count(c.id) / count(o.id), i.e. clicks / opens (click-to-open rate)

Observed on a local stack with one delivered campaign, 1 open, 1 unique clicker:

"dashboard":        { "open_rate": 50,     "click_rate": 50 }
"click_rate_chart": { "click_rate": "100.00" }

Both are defensible metrics, but they share a field name, so the UI shows 50% and 100% for the same underlying data.

Related: adc6b569 / 1190a940 ("Fix open/click rates using wrong denominator") normalised the dashboard and provider aggregations from sends to delivered, but did not touch the chart SQL, so the two drifted further apart. overview.go:287-288 also still divides by sends.

Worth deciding which definition click_rate carries and applying it consistently, or naming the click-to-open metric differently.