Files
supermarket/internal/web/templates/seo-check.html
T
davidandClaude Opus 5.5 aeba28b658 SEO: daily clicks chart, top searches, percentages, daily email
- The morning check draws clicks by day, this week over the week before.
- The morning check and the Monday report list the searches that gained
  and lost most clicks (any size; real moves stay on their own list).
- The week's clicks and impressions show their change in percent.
- Settings → Search engines can email the morning check, at most once a
  day, when something really moved. Both emails carry the new lists.
- With a domain property, a line says how many clicks went to its other
  hosts (a shop, a Gitea…) and for which search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 06:55:54 -07:00

44 lines
3.0 KiB
HTML

{{define "content"}}{{with .Data}}{{$d := .}}
<div class="heading">
<h1>Morning check</h1>
{{if .Current}}<div class="buttons">
<form method="post" action="/settings/search/sync" data-busy="Syncing…"><input type="hidden" name="back" value="/seo/check?site={{.Current.Index}}"><button type="submit" class="secondary">Sync now</button></form>
</div>{{end}}
</div>
<p class="lede">The last 7 days of final Search Console data against the 7 before, by page and by search. Only real moves are listed: the thresholds are under <a href="/settings/search">Settings → Search engines</a>. Causes are what the data shows, which is correlation, not proof.</p>
{{template "seo-sites" .}}
{{if .Current}}
{{with .Check}}
<section class="card">
<p class="small muted">{{.From}} to {{.To}}, against {{.PrevFrom}} to {{.PrevTo}} · {{.Pages}} pages and {{.Queries}} searches compared</p>
<p>Clicks <strong>{{num .Before.Clicks}} → {{num .After.Clicks}}</strong>{{with change .Before.Clicks .After.Clicks}} <span class="muted">({{.}})</span>{{end}} · impressions {{num .Before.Impressions}} → {{num .After.Impressions}}{{with change .Before.Impressions .After.Impressions}} <span class="muted">({{.}})</span>{{end}} · position {{dec1 .Before.Position}} → {{dec1 .After.Position}}</p>
{{with $d.Chart}}{{template "click-chart" .}}{{end}}
{{range .Outside}}<p class="small muted">{{.Sentence}}</p>{{end}}
{{if .Quiet}}<p class="ok">Nothing real moved.</p>{{end}}
</section>
{{template "query-changes" .}}
{{if not .Quiet}}
<table class="list">
<thead><tr><th>Page or search</th><th class="num">Clicks</th><th class="num">Impressions</th><th class="num">Position</th><th>What the data shows</th></tr></thead>
<tbody>
{{range .Moves}}
<tr>
<td>{{if eq .Kind "page"}}<a href="{{.Key}}" target="_blank" rel="noopener noreferrer">{{pagePath .Key}}</a>{{else}}<span class="badge">search</span> {{.Key}}{{end}}</td>
{{if .NoData}}<td class="num">{{num .Before.Clicks}} → <span class="muted">no data</span></td><td class="num">{{num .Before.Impressions}} → <span class="muted">no data</span></td><td class="num">{{dec1 .Before.Position}} → <span class="muted">no data</span></td>
{{else if .New}}<td class="num"><span class="muted">new</span> {{num .After.Clicks}}</td><td class="num">{{num .After.Impressions}}</td><td class="num">{{dec1 .After.Position}}</td>
{{else}}<td class="num">{{num .Before.Clicks}} → <strong>{{num .After.Clicks}}</strong></td><td class="num">{{num .Before.Impressions}} → {{num .After.Impressions}}</td><td class="num">{{dec1 .Before.Position}} → <strong>{{dec1 .After.Position}}</strong></td>{{end}}
<td class="small">{{range .Why}}{{.}} {{end}}</td>
</tr>
{{end}}
</tbody>
</table>
{{with $d.More}}<p class="help">And {{.}} more: raise the thresholds if this is too much to read with your coffee.</p>{{end}}
{{end}}
{{else}}
<section class="card empty"><p>There isn't two weeks of Search Console data yet. Sync, and check again.</p></section>
{{end}}
{{end}}
{{end}}{{end}}