Phase 4 part 5: CLV and revenue by cohort
CLV = ARPA × revenue-weighted gross margin ÷ customer churn averaged over up to 12 complete months, with lifetime and CLV:CAC (CAC over its own 12-month window). Revenue by cohort from money that came in: paid invoices less refunds and post-payment credits not refunded, cumulative per customer, with a gross profit view; months not reached are told apart from negative amounts. Metrics → CLV and cohorts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -168,6 +168,7 @@ func (s *Server) Handler() (http.Handler, error) {
|
||||
mux.HandleFunc("GET /metrics/month/{month}", s.metricsMonth)
|
||||
mux.HandleFunc("GET /metrics/customers", s.metricsCustomers)
|
||||
mux.HandleFunc("GET /metrics/spend", s.metricsSpend)
|
||||
mux.HandleFunc("GET /metrics/clv", s.metricsCLV)
|
||||
mux.HandleFunc("POST /metrics/spend", s.metricsSpendAdd)
|
||||
mux.HandleFunc("POST /metrics/spend/{id}/delete", s.metricsSpendDelete)
|
||||
mux.HandleFunc("POST /metrics/customers/{id}", s.metricsCustomerMatch)
|
||||
@@ -326,6 +327,7 @@ func (s *Server) loadTemplates() error {
|
||||
return strconv.FormatFloat(f, 'f', 0, 64) + "%"
|
||||
},
|
||||
"spendChannel": metrics.ChannelName,
|
||||
"dec1f": func(f float64) string { return strconv.FormatFloat(f, 'f', 1, 64) },
|
||||
"cents": func(f float64) string {
|
||||
if f < 0 {
|
||||
return "·"
|
||||
|
||||
Reference in New Issue
Block a user