Phase 4 part 6: the dashboard, CSV exports and an open metrics page
The MRR page adds churn, CLV, CAC and CLV:CAC. Eight tables download as CSV (MRR, NRR and revenue cohorts, CAC by month and channel, spend, products, customers). Metrics → Publish builds an open metrics page from chosen totals only (never a customer) and opens a pull request that adds or updates it on the site, checked with a Hugo build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
{{define "content"}}{{with .Data}}{{$o := .O}}
|
||||
<div class="heading"><h1>Publish your metrics</h1></div>
|
||||
<p class="lede">An "open metrics" page on your website: your revenue numbers, straight from billing, for customers and investors who like seeing a company's real numbers. Only totals are published, never anything about any one customer. It goes to the site as a pull request, like the SEO changes; merging publishes it. Open it again whenever you want the numbers updated.</p>
|
||||
|
||||
<form method="post" action="/metrics/publish" class="card">
|
||||
<div class="cols">
|
||||
<label>Website <select name="site">{{range .Sites}}<option value="{{.Index}}" {{if eq .Index $o.Site}}selected{{end}}>{{.URL}}</option>{{end}}</select></label>
|
||||
<label>Address on the site <input name="path" value="{{$o.Path}}"></label>
|
||||
</div>
|
||||
<label>Title <input name="title" value="{{$o.Title}}"></label>
|
||||
<fieldset><legend>What to show</legend>
|
||||
{{range .Parts}}<label class="check"><input type="checkbox" name="part" value="{{.ID}}" {{if index $o.Parts .ID}}checked{{end}}> {{.Label}}</label>{{end}}
|
||||
</fieldset>
|
||||
<div class="actions">
|
||||
<button type="submit" class="secondary" name="do" value="save">Save and preview</button>
|
||||
<button type="submit" name="do" value="pr" data-busy="Opening…" {{if not .Gitea}}disabled title="Save a Gitea token under Settings → Search engines"{{end}}>Open a pull request</button>
|
||||
</div>
|
||||
{{with $o.PRURL}}<p class="small">Last opened {{ago $o.PRAt}}: <a href="{{.}}" target="_blank" rel="noopener noreferrer">the pull request ↗</a></p>{{end}}
|
||||
</form>
|
||||
|
||||
<h2>Preview</h2>
|
||||
{{if .Preview}}<pre class="sample">{{.Preview}}</pre>{{else}}<p class="help">There's no complete month of billing to publish yet.</p>{{end}}
|
||||
{{end}}{{end}}
|
||||
Reference in New Issue
Block a user