PLAN: Phase 3 rewritten around a weekly seven-job SEO loop (what ranks, next keywords, brief, page, approval, morning check, Monday report), with chatseo.app's ideas borrowed and rankings from Search Console only. Google OAuth (PKCE, offline, read-only webmasters scope) from Settings → Search engines, with each website's property. Search Console is synced into SQLite by day (site, page, and page+query; 16 months, then twice a day). SEO → What ranks shows the last 90 days: totals, the share of clicks from hidden queries, best pages, queries shown but not clicked, and the pages to protect and to push, each with its numbers. Schema 12. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
63 lines
4.1 KiB
HTML
63 lines
4.1 KiB
HTML
{{define "content"}}{{with .Data}}{{$d := .}}
|
|
<div class="heading">
|
|
<h1>What already ranks</h1>
|
|
{{if .Current}}<div class="buttons">
|
|
<form method="post" action="/settings/search/sync" data-busy="Syncing…"><input type="hidden" name="back" value="/seo?site={{.Current.Index}}"><button type="submit" class="secondary">Sync now</button></form>
|
|
</div>{{end}}
|
|
</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}}
|
|
|
|
{{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>
|
|
<div class="funnel">
|
|
<div class="step"><span class="label">Clicks</span><strong>{{num .Total.Clicks}}</strong></div>
|
|
<div class="step"><span class="label">Impressions</span><strong>{{num .Total.Impressions}}</strong></div>
|
|
<div class="step"><span class="label">Click rate</span><strong>{{dec1 .Total.CTR}}%</strong></div>
|
|
<div class="step"><span class="label">Average position</span><strong>{{dec1 .Total.Position}}</strong></div>
|
|
</div>
|
|
{{if ge .Anonymous 0.0}}<p class="small">{{dec1 .Anonymous}}% of the clicks come from searches Google doesn't name, so the query tables below read low; the page tables don't.</p>{{end}}
|
|
</section>
|
|
|
|
<div class="grid">
|
|
<section class="card">
|
|
<h2>Protect</h2>
|
|
<p class="help">They carry the clicks: don't rewrite them for fun, don't change their address, look at them first.</p>
|
|
{{range .Protect}}<p><a href="{{.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath .Page}}</a><br><span class="small">{{.Why}}</span></p>{{else}}<p class="help">No page has clicks yet.</p>{{end}}
|
|
</section>
|
|
<section class="card">
|
|
<h2>Push</h2>
|
|
<p class="help">On page one, shown a lot, hardly clicked: Google did the hard part, and the page loses at the click. Compare its main query with its title first.</p>
|
|
{{range .Push}}<p><a href="{{.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath .Page}}</a><br><span class="small">{{.Why}}</span></p>{{else}}<p class="help">No page sits on page one with few clicks. Good, or too little data.</p>{{end}}
|
|
</section>
|
|
</div>
|
|
|
|
<h2>Best pages</h2>
|
|
{{if .Pages}}
|
|
<table class="list">
|
|
<thead><tr><th>Page</th><th class="num">Clicks</th><th class="num">Impressions</th><th class="num">Click rate</th><th class="num">Position</th></tr></thead>
|
|
<tbody>{{range .Pages}}<tr><td><a href="{{.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath .Page}}</a></td><td class="num">{{num .Clicks}}</td><td class="num">{{num .Impressions}}</td><td class="num">{{dec1 .CTR}}%</td><td class="num">{{dec1 .Position}}</td></tr>{{end}}</tbody>
|
|
</table>
|
|
{{else}}<p class="help">No pages with data yet.</p>{{end}}
|
|
|
|
<h2>Shown a lot, hardly clicked</h2>
|
|
<p class="help">The searches Google shows you for most, with a click rate under 1%.</p>
|
|
{{if .Unclicked}}
|
|
<table class="list">
|
|
<thead><tr><th>Query</th><th class="num">Impressions</th><th class="num">Clicks</th><th class="num">Position</th></tr></thead>
|
|
<tbody>{{range .Unclicked}}<tr><td>{{.Query}}</td><td class="num">{{num .Impressions}}</td><td class="num">{{num .Clicks}}</td><td class="num">{{dec1 .Position}}</td></tr>{{end}}</tbody>
|
|
</table>
|
|
{{else}}<p class="help">None.</p>{{end}}
|
|
{{else}}
|
|
<section class="card empty"><p>No data yet for {{.Current.Property}}. {{with .Current.Last}}{{if .Error}}The last sync failed: {{.Error}}{{else}}Synced {{ago .At}}, with nothing back.{{end}}{{else}}Sync now to read it.{{end}}</p></section>
|
|
{{end}}
|
|
{{end}}
|
|
{{end}}{{end}}
|