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
+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}}