Files
supermarket/internal/web/templates/signals.html
T
davidandClaude Opus 5.5 062fcf2e59 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>
2026-11-22 14:19:55 -07:00

82 lines
5.2 KiB
HTML

{{define "content"}}{{with .Data}}{{$d := .}}
<div class="heading">
<h1>Signals</h1>
<div class="buttons"><a class="button" href="/signals/new">New signal</a></div>
</div>
<p class="lede">A buying signal is a guess about why a company buys now. Each one is tested through what's done for it, directly (email, LinkedIn) and indirectly (posts, pages), and in origami.chat and explee.com. Every step anyone takes through the funnel is counted here, so you can see which signals turn into replies, bookings, sign-ups and payments.</p>
<form method="get" action="/signals" class="filters">
<label class="small">Period
<select name="period" data-autosubmit>{{range .Periods}}<option value="{{.ID}}" {{if eq .ID $d.Period}}selected{{end}}>{{.Label}}</option>{{end}}</select>
</label>
<label class="small">Channel
<select name="channel" data-autosubmit><option value="">All channels</option>{{range .Channels}}<option value="{{.ID}}" {{if eq .ID $d.Channel}}selected{{end}}>{{.Label}}</option>{{end}}</select>
</label>
<noscript><button type="submit" class="secondary small">Show</button></noscript>
</form>
{{if .Rows}}
<div class="table-wrap">
<table class="list scorecard">
<thead><tr><th>Signal</th>{{range .Stages}}<th class="num">{{.Label}}</th>{{end}}<th class="num">Revenue</th><th class="num">Spend</th></tr></thead>
<tbody>
{{range .Rows}}
<tr>
<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>
</tr>
{{end}}
</tbody>
</table>
</div>
<p class="help">People count once per stage, however many times they replied. Percentages are of those contacted. Visits are counted in total, not per person. Spend is what origami.chat and explee.com report for each signal's campaigns, all time. A signal moves to <em>proven</em> when you say so.</p>
{{else}}
<section class="card empty"><p>No signals yet. <a href="/signals/new">Write down the first one</a>: for example, “Teams complaining about the Microsoft 365 price rise switch within a quarter.”</p></section>
{{end}}
<h2 id="campaigns">Campaigns in origami.chat and explee.com</h2>
<p class="lede">Supermarket reads your campaigns, who they contacted, who replied, who was interested and who unsubscribed, every 6 hours. Give each campaign the signal it tests; its results count towards that signal. Interested people and people who replied show up in <a href="/prospects">Review</a>, and anyone who unsubscribed goes on the <a href="/prospects/suppressed">suppression list</a>.</p>
<div class="grid">
{{range .Sources}}
<section class="card">
<h3>{{.Name}}</h3>
{{if .Set}}
{{with .Last}}<p class="small">{{if .Error}}<span class="warn-text">Last import failed {{ago .At}}: {{.Error}}</span>{{else}}Imported {{ago .At}}: {{.Campaigns}} campaigns, {{.Events}} new steps, {{.Prospects}} new people to review, {{.Suppressed}} unsubscribed.{{end}}</p>
{{if .Warnings}}<details class="small"><summary>{{len .Warnings}} warnings</summary><ul>{{range .Warnings}}<li>{{.}}</li>{{end}}</ul></details>{{end}}
{{else}}<p class="small">Not imported yet.</p>{{end}}
<form method="post" action="/lead-sources/{{.ID}}/import" data-busy="Importing…"><button type="submit" class="secondary small">Import now</button></form>
{{else}}<p class="small">Not connected. Save its API key under <a href="/settings/sources">Settings → Lead sources</a>.</p>{{end}}
</section>
{{end}}
</div>
{{if .Campaigns}}
<table class="list">
<thead><tr><th>Campaign</th><th>Numbers</th><th class="num">Spend</th><th>Signal</th></tr></thead>
<tbody>
{{range .Campaigns}}
<tr>
<td><strong>{{.Name}}</strong><br><span class="muted small">{{if eq .Source "origami"}}origami.chat{{else}}explee.com{{end}}{{with .Status}} · {{.}}{{end}} · read {{ago .SyncedAt}}</span></td>
<td class="small">{{range $k, $v := .Stats}}{{if $v}}<span class="stat">{{$k}}: <strong>{{$v}}</strong></span> {{end}}{{end}}</td>
<td class="num">{{if .SpendCents}}{{money .SpendCents}}{{end}}</td>
<td>
<form method="post" action="/signals/campaigns" class="row">
<input type="hidden" name="source" value="{{.Source}}"><input type="hidden" name="id" value="{{.ID}}">
{{$cur := .SignalID}}
<select name="signal" data-autosubmit aria-label="Signal for {{.Name}}">
<option value="0">No signal yet</option>
{{range $d.Signals}}<option value="{{.ID}}" {{if eq .ID $cur}}selected{{end}}>{{.Name}}</option>{{end}}
</select>
<noscript><button type="submit" class="secondary small">Save</button></noscript>
</form>
</td>
</tr>
{{end}}
</tbody>
</table>
{{end}}
{{end}}{{end}}