Phase 3 part 2: the morning check and the Monday report

The morning check compares the last 7 days of final Search Console data
with the 7 before, by page and by search, and lists only moves past the
thresholds (editable). Each move is explained from the data: the search
whose clicks changed, and whether a position change is real or a change
in the mix of searches. Missing rows are "no data", not zero. The Monday
report has three numbers with where the change came from, the 3 pages
that moved most, and "Waiting for your yes"; it's written each Monday,
kept, and optionally emailed through the outreach mailbox. Schema 13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 07:23:23 -07:00
co-authored by Claude Opus 5.5
parent 5ea620a091
commit 68ff18690b
17 changed files with 1058 additions and 32 deletions
+12
View File
@@ -40,6 +40,8 @@
{{end}}
{{if eq .ID "seo"}}
<div class="subnav">
<a href="/seo/check" {{if eq $nav "seo/check"}}aria-current="page"{{end}}>Morning check</a>
<a href="/seo/report" {{if eq $nav "seo/report"}}aria-current="page"{{end}}>Monday report</a>
<a href="/seo" {{if eq $nav "seo/ranks"}}aria-current="page"{{end}}>What ranks</a>
</div>
{{end}}
@@ -152,3 +154,13 @@
{{- else if eq . "core"}}<path d="M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z"/><path d="m2 22 3-3"/><path d="M7.5 13.5 10 11"/><path d="M10.5 16.5 13 14"/><path d="m18 3-4 4h6l-4 4"/>
{{- else if eq . "menu"}}<path d="M4 12h16"/><path d="M4 6h16"/><path d="M4 18h16"/>
{{- end}}</svg>{{end}}
{{define "seo-sites"}}
{{if not .Connected}}
<section class="card empty"><p>Connect Google Search Console under <a href="/settings/search">Settings → Search engines</a> first.</p></section>
{{else if not .Sites}}
<section class="card empty"><p>Choose the Search Console property for your website under <a href="/settings/search">Settings → Search engines</a>.</p></section>
{{else if gt (len .Sites) 1}}{{$d := .}}
<nav class="tabs">{{range .Sites}}<a href="{{$d.Path}}?site={{.Index}}" {{if eq .Index $d.Current.Index}}aria-current="page"{{end}}>{{.URL}}</a>{{end}}</nav>
{{end}}
{{end}}
@@ -33,6 +33,19 @@
</section>
{{end}}
{{if .Connected}}{{$s := .SEO}}
<section class="card">
<h3>The morning check and the Monday report</h3>
<p class="small">A page or search counts as a real move when its clicks change by more than this many, or its position by more than this many places on at least this many impressions. Raise them if the check lists too much; on a small site an average position jumps as soon as one search appears or disappears.</p>
<div class="cols">
<label>Clicks, more than <input name="min_clicks" inputmode="numeric" value="{{$s.MinClicks}}" size="4"></label>
<label>Positions, more than <input name="min_positions" inputmode="decimal" value="{{$s.MinPositions}}" size="4"></label>
<label>On at least <input name="min_impressions" inputmode="numeric" value="{{$s.MinImpressions}}" size="6"> impressions</label>
</div>
<label class="check"><input type="checkbox" name="email_report" {{if $s.EmailReport}}checked{{end}}> Email me the Monday report (through the mailbox under <a href="/settings/email">Settings → Email</a>)</label>
</section>
{{end}}
<div class="actions">
<button type="submit">Save</button>
</div>
+39
View File
@@ -0,0 +1,39 @@
{{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> · impressions {{num .Before.Impressions}} → {{num .After.Impressions}} · position {{dec1 .Before.Position}} → {{dec1 .After.Position}}</p>
{{if .Quiet}}<p class="ok">Nothing real moved.</p>{{end}}
</section>
{{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}}
+51
View File
@@ -0,0 +1,51 @@
{{define "content"}}{{with .Data}}{{$d := .}}
<div class="heading">
<h1>Monday report</h1>
{{if .Current}}<div class="buttons">
<form method="post" action="/seo/report?site={{.Current.Index}}" data-busy="Writing…"><button type="submit" class="secondary">Write it now</button></form>
</div>{{end}}
</div>
<p class="lede">One page, the same every week, so this Monday compares with the last in seconds: three numbers, the three pages that moved most, and the changes waiting for your yes. It's written every Monday{{if .Current}}, and can be emailed to you (Settings → Search engines){{end}}.</p>
{{template "seo-sites" .}}
{{if .Current}}
{{with .Report}}
<section class="card">
<p class="small muted">{{.WeekFrom}} to {{.WeekTo}}, against the week before · written {{ago .CreatedAt}}</p>
<h2>1. The week</h2>
<div class="funnel">
<div class="step"><span class="label">Clicks</span><strong>{{num .After.Clicks}}</strong><span class="rate">was {{num .Before.Clicks}}</span></div>
<div class="step"><span class="label">Impressions</span><strong>{{num .After.Impressions}}</strong><span class="rate">was {{num .Before.Impressions}}</span></div>
<div class="step"><span class="label">Position</span><strong>{{dec1 .After.Position}}</strong><span class="rate">was {{dec1 .Before.Position}}</span></div>
</div>
<p>{{.Where}}</p>
</section>
<section class="card">
<h2>2. The pages that moved most</h2>
{{range .Pages}}
<p><a href="{{.Key}}" target="_blank" rel="noopener noreferrer">{{pagePath .Key}}</a>: clicks {{num .Before.Clicks}} → <strong>{{num .After.Clicks}}</strong>, position {{dec1 .Before.Position}} → <strong>{{dec1 .After.Position}}</strong>
{{with .Why}}<br><span class="small">{{range .}}{{.}} {{end}}</span>{{end}}</p>
{{else}}<p class="help">No page moved.</p>{{end}}
</section>
<section class="card">
<h2>3. Waiting for your yes</h2>
{{range .Waiting}}
<p><a href="{{.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath .Page}}</a><br><span class="small">{{.Why}}</span></p>
{{else}}<p class="help">Nothing this week.</p>{{end}}
<p class="help">Each one is a page that ranks on page one and isn't clicked. The exact change to make (a new title or description, with its length) and the pull request that applies it come with the next part.</p>
</section>
{{else}}
<section class="card empty"><p>No report yet. It's written on Monday once there are two weeks of data, or now with <em>Write it now</em>.</p></section>
{{end}}
{{if gt (len .Reports) 1}}
<h2>Earlier reports</h2>
<table class="list">
<thead><tr><th>Week to</th><th class="num">Clicks</th><th class="num">Impressions</th><th class="num">Position</th></tr></thead>
<tbody>{{range .Reports}}<tr><td><a href="/seo/report?site={{$d.Current.Index}}&amp;week={{.WeekTo}}">{{.WeekTo}}</a></td><td class="num">{{num .After.Clicks}}</td><td class="num">{{num .After.Impressions}}</td><td class="num">{{dec1 .After.Position}}</td></tr>{{end}}</tbody>
</table>
{{end}}
{{end}}
{{end}}{{end}}
+2 -7
View File
@@ -7,13 +7,8 @@
</div>
<p class="lede">The cheapest traffic is on pages that already rank. From Search Console, the last {{.Days}} days: the pages that carry your clicks, which to protect, and which to push because Google already shows them and nobody clicks.</p>
{{if not .Connected}}
<section class="card empty"><p>Connect Google Search Console under <a href="/settings/search">Settings → Search engines</a> first.</p></section>
{{else if not .Sites}}
<section class="card empty"><p>Choose the Search Console property for your website under <a href="/settings/search">Settings → Search engines</a>.</p></section>
{{else}}
{{if gt (len .Sites) 1}}<nav class="tabs">{{range .Sites}}<a href="/seo?site={{.Index}}" {{if eq .Index $d.Current.Index}}aria-current="page"{{end}}>{{.URL}}</a>{{end}}</nav>{{end}}
{{template "seo-sites" .}}
{{if .Current}}
{{with .Ranks}}
<section class="card">
<p class="small muted">{{.Site}} · {{.From}} to {{.To}} (Search Console's final data is 2 to 3 days behind).</p>