Phase 5 part 4: landing pages per buying signal
Each signal's page lists its landing pages with their Gitea status, live address and 30-day visitors from Plausible, and builds a new one. Pages can be duplicated as variants (B, C…, with their own utm_content), taken off the site through a pull request that deletes the file, or have their pull request closed. The scorecard counts live pages. Schema 23. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -195,5 +195,7 @@
|
||||
{{- else if eq .Status "merged"}}<span class="badge published">merged</span>
|
||||
{{- else if eq .Status "closed"}}<span class="badge">closed</span>
|
||||
{{- else if eq .Status "failed"}}<span class="badge failed">failed</span>
|
||||
{{- else if eq .Status "removing"}}<span class="badge scheduled">removal pull request open</span>
|
||||
{{- else if eq .Status "removed"}}<span class="badge">removed</span>
|
||||
{{- end}}{{if and .Error (ne .Status "failed")}} <span class="badge failed">to fix</span>{{end}}
|
||||
{{end}}
|
||||
|
||||
@@ -97,6 +97,48 @@
|
||||
<ul class="small">{{range $i, $u := .}}<li><code id="link-{{$i}}">{{$u}}</code> <button type="button" class="link small" data-copy="link-{{$i}}">Copy</button></li>{{end}}</ul>
|
||||
{{end}}
|
||||
|
||||
<h2>Landing pages</h2>
|
||||
{{$sig := $s}}
|
||||
{{if .Pages}}
|
||||
<div class="table-wrap"><table>
|
||||
<thead><tr><th>Page</th><th>Status</th><th>Visitors, 30 days</th><th></th></tr></thead>
|
||||
<tbody>{{range .Pages}}<tr>
|
||||
<td>{{with .Source.Variant}}<span class="badge">{{.}}</span> {{end}}<a href="/sites/pages/{{.ID}}">{{or .Title "Untitled"}}</a><br>
|
||||
<span class="small muted">{{if .Address}}<a href="{{.Address}}" target="_blank" rel="noopener noreferrer">{{.Address}}</a>{{else}}{{.Site}}{{.Path}}{{end}}</span></td>
|
||||
<td>{{template "page-status" .}}</td>
|
||||
<td>{{if ge .Visitors 0}}{{.Visitors}}{{else}}<span class="muted">—</span>{{end}}</td>
|
||||
<td><div class="row-actions">
|
||||
<details class="inline-details"><summary class="button secondary small">Duplicate as a variant</summary>
|
||||
<form method="post" action="/sites/pages/{{.ID}}/duplicate">
|
||||
<label class="small">What to change in the variant <span class="muted">(optional: empty makes an exact copy to edit)</span>
|
||||
<textarea name="variant_notes" rows="2" placeholder="A shorter page, with the price in the hero."></textarea></label>
|
||||
<button type="submit" class="small" data-busy="Making it…">Make the variant</button>
|
||||
</form>
|
||||
</details>
|
||||
{{if eq .Status "merged"}}<form method="post" action="/sites/pages/{{.ID}}/remove" data-confirm="Open a pull request that takes {{.Path}} off the site?">
|
||||
<input type="hidden" name="return" value="/signals/{{$sig.ID}}"><button type="submit" class="secondary small" data-busy="Opening…">Remove from the site</button></form>{{end}}
|
||||
{{if or (eq .Status "pr") (eq .Status "removing")}}<form method="post" action="/sites/pages/{{.ID}}/close" data-confirm="Close the pull request without merging?">
|
||||
<input type="hidden" name="return" value="/signals/{{$sig.ID}}"><button type="submit" class="secondary small">Close the pull request</button></form>{{end}}
|
||||
</div></td>
|
||||
</tr>{{end}}</tbody>
|
||||
</table></div>
|
||||
{{with .VisitorsErr}}<p class="small warn-text">Couldn't read visitors from Plausible: {{.}}</p>{{end}}
|
||||
<p class="small muted">Visitors are everyone who saw the page, however they came. A variant's links to your site carry its own <code>utm_content</code>, so sign-ups that keep the tags can be told apart.</p>
|
||||
{{else}}<p class="help">No landing page for this signal yet.</p>{{end}}
|
||||
{{if .PageSites}}
|
||||
<form method="post" action="/sites/pages" class="card">
|
||||
<input type="hidden" name="kind" value="landing"><input type="hidden" name="signal" value="{{$s.ID}}">
|
||||
<div class="cols">
|
||||
{{if gt (len .PageSites) 1}}<label>Website <select name="site">{{range .PageSites}}<option value="{{.Index}}">{{.URL}}</option>{{end}}</select></label>
|
||||
{{else}}{{range .PageSites}}<input type="hidden" name="site" value="{{.Index}}">{{end}}{{end}}
|
||||
<label>Address <span class="muted">(optional)</span> <input name="path" placeholder="/{{$s.Slug}}/"></label>
|
||||
</div>
|
||||
<label>What the page should do <span class="muted">(optional; the signal's angle is used)</span> <textarea name="notes" rows="2"></textarea></label>
|
||||
<button type="submit" data-busy="Reading the site and writing…">Build a landing page for it</button>
|
||||
<span class="small muted">Its links to your site carry utm_campaign={{$s.Slug}}. You review it before anything goes to Gitea.</span>
|
||||
</form>
|
||||
{{else}}<p class="small">Landing pages need a website with a Hugo repository in <a href="/settings/profile">Settings → Profile</a>.</p>{{end}}
|
||||
|
||||
{{if .Events}}
|
||||
<h2>Latest steps</h2>
|
||||
<table class="list">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tbody>
|
||||
{{range .Rows}}
|
||||
<tr>
|
||||
<td>{{with .Signal}}<a href="/signals/{{.ID}}">{{.Name}}</a> <span class="badge {{.Status}}">{{.Status}}</span>{{else}}<span class="muted">No signal</span>{{end}}</td>
|
||||
<td>{{with .Signal}}<a href="/signals/{{.ID}}">{{.Name}}</a> <span class="badge {{.Status}}">{{.Status}}</span>{{with index $.Data.LivePages .ID}} <span class="badge published" title="Landing pages on your website">{{.}} page{{if ne . 1}}s{{end}}</span>{{end}}{{else}}<span class="muted">No signal</span>{{end}}</td>
|
||||
{{range .Cells}}<td class="num">{{if .Count}}{{.Count}}{{with .Rate}}<span class="rate">{{.}}</span>{{end}}{{else}}<span class="muted">·</span>{{end}}</td>{{end}}
|
||||
<td class="num">{{if .RevenueCents}}{{money .RevenueCents}}{{else}}<span class="muted">·</span>{{end}}</td>
|
||||
<td class="num">{{if .SpendCents}}{{money .SpendCents}}{{else}}<span class="muted">·</span>{{end}}</td>
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
{{with $p.Source.Variant}}<p class="small">Variant <strong>{{.}}</strong>{{if $p.Source.VariantOf}} of <a href="/sites/pages/{{$p.Source.VariantOf}}">the original page</a>{{end}}.{{if $p.Source.VariantOf}} Its links to your site carry their own <code>utm_content</code>.{{end}}</p>{{end}}
|
||||
{{with $p.RemovalPRURL}}<p>The pull request that takes it off the site: <a href="{{.}}" target="_blank" rel="noopener noreferrer">{{.}} ↗</a></p>{{end}}
|
||||
{{with $p.Error}}<p class="error" role="alert">{{.}}</p>{{end}}
|
||||
{{if $p.Editable}}
|
||||
<form method="post" action="/sites/pages/{{$p.ID}}/save" class="card">
|
||||
@@ -50,6 +52,25 @@
|
||||
<section class="card"><pre class="sample">{{$p.Sections}}</pre></section>
|
||||
{{end}}
|
||||
|
||||
<section class="card">
|
||||
<form method="post" action="/sites/pages/{{$p.ID}}/duplicate">
|
||||
<label>Duplicate as a variant, to test against this one <span class="muted">(optional: what to change; empty makes an exact copy to edit)</span>
|
||||
<textarea name="variant_notes" rows="2"></textarea></label>
|
||||
<button type="submit" class="secondary" data-busy="Making it…">Make a variant</button>
|
||||
</form>
|
||||
{{if eq $p.Status "merged"}}
|
||||
<form method="post" action="/sites/pages/{{$p.ID}}/remove" data-confirm="Open a pull request that takes {{$p.Path}} off the site?">
|
||||
<button type="submit" class="secondary" data-busy="Opening…">Remove from the site</button>
|
||||
<span class="small muted">Opens a pull request deleting the page; merging takes it off.</span>
|
||||
</form>
|
||||
{{end}}
|
||||
{{if or (eq $p.Status "pr") (eq $p.Status "removing")}}
|
||||
<form method="post" action="/sites/pages/{{$p.ID}}/close" data-confirm="Close the pull request without merging?">
|
||||
<button type="submit" class="secondary">Close the pull request</button>
|
||||
</form>
|
||||
{{end}}
|
||||
</section>
|
||||
|
||||
<form method="post" action="/sites/pages/{{$p.ID}}/delete" class="danger-zone">
|
||||
<button type="submit" class="secondary" data-confirm="Forget this page? Its branch and pull request on Gitea stay.">Delete</button>
|
||||
<span class="small muted">Forgets the page here. Its branch and pull request on Gitea stay; close them there.</span>
|
||||
|
||||
Reference in New Issue
Block a user