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>
This commit is contained in:
@@ -209,3 +209,44 @@
|
||||
{{- else if eq .Status "removed"}}{{if .GoneAt.IsZero}}<span class="badge scheduled">removal merged, still on the site</span>{{else}}<span class="badge">removed</span>{{end}}
|
||||
{{- end}}{{if and .Error (ne .Status "failed")}} <span class="badge failed">to fix</span>{{end}}
|
||||
{{end}}
|
||||
|
||||
{{/* SEO: the morning check's chart, and the searches that gained and lost most (the check and the Monday report). */}}
|
||||
{{define "click-chart"}}
|
||||
<figure class="click-chart">
|
||||
<svg class="chart line-chart" viewBox="0 0 {{.W}} {{.H}}" role="img" aria-label="Clicks by day, this week against the week before">
|
||||
<text x="0" y="{{.MaxY}}" dominant-baseline="hanging">{{.Max}}</text><text x="0" y="148">0</text>
|
||||
<line class="axis" x1="28" y1="148" x2="{{.W}}" y2="148"></line>
|
||||
{{with .Prev}}<polyline class="prev" points="{{.}}"></polyline>{{end}}
|
||||
<polyline class="this" points="{{.This}}"></polyline>
|
||||
{{range .Dots}}<circle cx="{{.X}}" cy="{{.Y}}" r="3.5"><title>{{.Title}}</title></circle>{{end}}
|
||||
{{range .Labels}}<text x="{{.X}}" y="166" text-anchor="middle">{{.Text}}</text>{{end}}
|
||||
</svg>
|
||||
<figcaption class="small muted"><span class="key this"></span> clicks this week · <span class="key prev"></span> the week before, day for day</figcaption>
|
||||
</figure>
|
||||
{{end}}
|
||||
|
||||
{{define "query-changes"}}
|
||||
{{if or .Gains .Losses}}
|
||||
<div class="cols">
|
||||
{{template "query-list" dict "Title" "↑ Searches that gained most clicks" "List" .Gains}}
|
||||
{{template "query-list" dict "Title" "↓ Searches that lost most clicks" "List" .Losses}}
|
||||
</div>
|
||||
<p class="help">Every change counts in these two lists, however small: they're for a look. What really moved, past your thresholds, is listed on its own.</p>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{define "query-list"}}
|
||||
<section class="card">
|
||||
<h3>{{.Title}}</h3>
|
||||
{{with .List}}
|
||||
<table class="list">
|
||||
<thead><tr><th>Search</th><th class="num">Clicks</th><th class="num">Position</th></tr></thead>
|
||||
<tbody>{{range .}}<tr>
|
||||
<td>{{.Query}}</td>
|
||||
<td class="num">{{num .Before.Clicks}} → <strong>{{if .NoData}}<span class="muted">no data</span>{{else}}{{num .After.Clicks}}{{end}}</strong></td>
|
||||
<td class="num">{{if .NoData}}{{dec1 .Before.Position}} → <span class="muted">no data</span>{{else if .New}}<span class="muted">new</span> {{dec1 .After.Position}}{{else}}{{dec1 .Before.Position}} → {{dec1 .After.Position}}{{end}}</td>
|
||||
</tr>{{end}}</tbody>
|
||||
</table>
|
||||
{{else}}<p class="help">None this week.</p>{{end}}
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
<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>
|
||||
<label class="check"><input type="checkbox" name="email_check" {{if $s.EmailCheck}}checked{{end}}> Email me the morning check when something really moved (at most once a day, when Search Console's data moves on)</label>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
|
||||
@@ -12,9 +12,12 @@
|
||||
{{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>
|
||||
<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>
|
||||
@@ -37,3 +40,4 @@
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<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>
|
||||
<p class="lede">One page, the same every week, so this Monday compares with the last in seconds: three numbers, the searches that gained and lost most, 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}}
|
||||
@@ -14,12 +14,14 @@
|
||||
<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">Clicks</span><strong>{{num .After.Clicks}}</strong><span class="rate">was {{num .Before.Clicks}}{{with change .Before.Clicks .After.Clicks}} · {{.}}{{end}}</span></div>
|
||||
<div class="step"><span class="label">Impressions</span><strong>{{num .After.Impressions}}</strong><span class="rate">was {{num .Before.Impressions}}{{with change .Before.Impressions .After.Impressions}} · {{.}}{{end}}</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>
|
||||
{{range .Outside}}<p class="small muted">{{.Sentence}}</p>{{end}}
|
||||
</section>
|
||||
{{template "query-changes" .}}
|
||||
|
||||
<section class="card">
|
||||
<h2>2. The pages that moved most</h2>
|
||||
|
||||
Reference in New Issue
Block a user