Phase 3 part 3: the audit, ranked by traffic, with AI visibility
A polite crawl of each website (Search Console's busiest pages, the sitemap, then links; up to 300 pages; robots.txt honoured) checks titles and descriptions (characters and pixels), headings, canonical, noindex, status and redirects, broken links (outside ones twice), alt text, Open Graph, JSON-LD, text without JavaScript, and whether the title says what the page's main search asks. Issues are ranked by severity, then the page's clicks and impressions. AI visibility: AI crawlers in robots.txt, llms.txt, structured data, Organization data. Optional PageSpeed checks. Weekly in the background, or Audit now. Schema 14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
<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>
|
||||
<a href="/seo/audit" {{if eq $nav "seo/audit"}}aria-current="page"{{end}}>Audit</a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if eq .ID "prospects"}}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<h3>Google Search Console</h3>
|
||||
{{range .Fields}}{{template "key-field" (dict "F" . "Set" (index $d.Set .Name))}}{{end}}
|
||||
<p class="help">Redirect URI to register on the OAuth client: <code id="google-redirect">{{.Redirect}}</code> <button type="button" class="link small" data-copy="google-redirect">Copy</button></p>
|
||||
{{template "key-field" (dict "F" .Speed "Set" .SpeedSet)}}
|
||||
{{if .Connected}}
|
||||
<p class="ok">Connected{{with .Account}} as {{.}}{{end}}.</p>
|
||||
<label class="check small"><input type="checkbox" name="remove:google.refresh_token"> disconnect</label>
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
{{define "content"}}{{with .Data}}{{$d := .}}
|
||||
<div class="heading">
|
||||
<h1>Audit</h1>
|
||||
</div>
|
||||
<p class="lede">Every page Supermarket can find on the site (the sitemap's, the ones Google shows, and the pages they link to, up to {{.MaxPages}}), checked for what keeps a page from ranking or being clicked, and whether AI assistants can read and cite the site. Issues on the pages that bring traffic come first: their clicks and impressions are from Search Console's last 90 days. It runs on its own once a week.</p>
|
||||
|
||||
{{if not .Sites}}
|
||||
<section class="card empty"><p>Add your websites to the <a href="/settings/profile">profile</a> first.</p></section>
|
||||
{{else}}
|
||||
{{if gt (len .Sites) 1}}<nav class="tabs">{{range .Sites}}<a href="/seo/audit?site={{.Index}}" {{if eq .Index $d.Current.Index}}aria-current="page"{{end}}>{{.URL}}</a>{{end}}</nav>{{end}}
|
||||
|
||||
<form method="post" action="/seo/audit?site={{.Current.Index}}" class="card row wrap" data-busy="Starting…">
|
||||
<span>{{.Current.URL}}{{if not .Current.Property}} <span class="muted small">(no Search Console property: issues aren't ranked by traffic)</span>{{end}}</span>
|
||||
<label class="check small"><input type="checkbox" name="speed"> Also check the speed of the 5 busiest pages (PageSpeed Insights, about a minute each)</label>
|
||||
<button type="submit" {{with .Audit}}{{if eq .Status "running"}}disabled{{end}}{{end}}>Audit now</button>
|
||||
</form>
|
||||
|
||||
{{with .Audit}}
|
||||
{{if eq .Status "running"}}
|
||||
<section class="card" hx-get="/seo/audit/status?site={{$d.Current.Index}}" hx-trigger="every 4s" hx-swap="none">
|
||||
<p><span class="badge scheduled">auditing…</span> Started {{ago .StartedAt}}. This page updates when it's done.</p>
|
||||
</section>
|
||||
{{else if eq .Status "failed"}}
|
||||
<section class="card"><p><span class="badge failed">failed</span> {{ago .StartedAt}}: {{.Error}}</p></section>
|
||||
{{else}}
|
||||
{{$c := .Counts}}
|
||||
<section class="card">
|
||||
<p class="small muted">Audited {{ago .FinishedAt}} · {{len .Pages}} pages read</p>
|
||||
<div class="funnel">
|
||||
<a class="step" href="/seo/audit?site={{$d.Current.Index}}&severity=error"><span class="label">Errors</span><strong>{{or (index $c "error") 0}}</strong></a>
|
||||
<a class="step" href="/seo/audit?site={{$d.Current.Index}}&severity=warning"><span class="label">Warnings</span><strong>{{or (index $c "warning") 0}}</strong></a>
|
||||
<a class="step" href="/seo/audit?site={{$d.Current.Index}}&severity=notice"><span class="label">Notices</span><strong>{{or (index $c "notice") 0}}</strong></a>
|
||||
<a class="step" href="/seo/audit?site={{$d.Current.Index}}"><span class="label">All</span><strong>{{len .Issues}}</strong></a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="grid">
|
||||
<section class="card">
|
||||
<h2>AI visibility</h2>
|
||||
<ul class="checks">{{range .Checks}}{{if eq .Group "ai"}}<li class="{{if .OK}}ok{{else}}bad{{end}}"><strong>{{.Title}}</strong>{{with .Detail}}<br><span class="small">{{.}}</span>{{end}}</li>{{end}}{{end}}</ul>
|
||||
</section>
|
||||
<section class="card">
|
||||
<h2>The basics</h2>
|
||||
<ul class="checks">{{range .Checks}}{{if eq .Group "basics"}}<li class="{{if .OK}}ok{{else}}bad{{end}}"><strong>{{.Title}}</strong>{{with .Detail}}<br><span class="small">{{.}}</span>{{end}}</li>{{end}}{{end}}</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{{if .Speed}}
|
||||
<h2>Speed (mobile)</h2>
|
||||
<table class="list">
|
||||
<thead><tr><th>Page</th><th>Largest paint</th><th>Interaction</th><th>Layout shift</th><th class="num">Lab score</th></tr></thead>
|
||||
<tbody>{{range .Speed}}<tr><td><a href="{{.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath .Page}}</a></td>
|
||||
{{if .Error}}<td colspan="4" class="small error-text">{{.Error}}</td>
|
||||
{{else if .Field}}<td>{{.LCP}} ms <span class="small muted">{{.LCPRating}}</span></td><td>{{.INP}} ms <span class="small muted">{{.INPRating}}</span></td><td>{{dec1 (cls .CLS)}} <span class="small muted">{{.CLSRating}}</span></td><td class="num">{{.Score}}</td>
|
||||
{{else}}<td colspan="3" class="small muted">Not enough real visitors for Google's field data.</td><td class="num">{{.Score}}</td>{{end}}</tr>{{end}}</tbody>
|
||||
</table>
|
||||
{{end}}
|
||||
|
||||
<h2>Issues{{with $d.Severity}}: {{.}}s{{end}}</h2>
|
||||
{{if $d.Shown}}
|
||||
<table class="list">
|
||||
<thead><tr><th></th><th>Issue</th><th>Page</th><th class="num">Clicks</th><th class="num">Impressions</th></tr></thead>
|
||||
<tbody>{{range $d.Shown}}<tr>
|
||||
<td><span class="badge {{if eq .Severity "error"}}failed{{else if eq .Severity "warning"}}scheduled{{end}}">{{.Severity}}</span></td>
|
||||
<td><strong>{{.Title}}</strong>{{with .Detail}}<br><span class="small">{{truncate 400 .}}</span>{{end}}</td>
|
||||
<td class="small"><a href="{{.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath .Page}}</a></td>
|
||||
<td class="num">{{if .Traffic.Impressions}}{{num .Traffic.Clicks}}{{else}}<span class="muted">·</span>{{end}}</td>
|
||||
<td class="num">{{if .Traffic.Impressions}}{{num .Traffic.Impressions}}{{else}}<span class="muted">·</span>{{end}}</td>
|
||||
</tr>{{end}}</tbody>
|
||||
</table>
|
||||
{{with $d.More}}<p class="help">And {{.}} more.</p>{{end}}
|
||||
{{else}}<p class="help">No issues{{with $d.Severity}} of this kind{{end}}.</p>{{end}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
<section class="card empty"><p>Not audited yet. <em>Audit now</em> reads the site; it takes a few minutes.</p></section>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
Reference in New Issue
Block a user