Sub topic 13
Checking whether the page is retrieved, cited and clicked
This chapter assumes you can read server logs and analytics reports, and that you know how robots.txt, JSON-LD and AI search retrieval work from earlier chapters. The goal is a simple measurement routine for a comparison or best-of page. It should tell you whether AI systems fetch the page, whether they cite it, and whether people click through.
Three stages, three kinds of evidence
A page can fail at three different points. Each point needs a different measurement.
- Retrieved: an AI system's crawler or fetcher requested the page. Evidence lives in server or CDN logs.
- Cited: an AI answer names or links the page as a source. Evidence comes from running the queries yourself and recording what the answers show.
- Clicked: a person followed a link from an AI answer to your page. Evidence lives in analytics referrals.
The stages are ordered, but they do not map one to one. A page can be cited from an index built earlier, so a citation does not prove a fresh fetch. A person can read a cited answer and never click. Treat each stage as its own signal.
Stage 1: Retrieval in server logs
Logs show which user agents requested which URLs. AI vendors usually document several agents with different jobs. Some collect training data, some build a search index, and some fetch a page live when a user asks a question. Check each vendor's documentation for current names, because they change.
The code below counts requests per AI-related user agent for one URL path in a standard combined-format access log. The agent names are examples. Replace them with the names from vendor documentation.
import re
import sys
from collections import Counter
LOG_LINE = re.compile(
r'"(?:GET|HEAD) (?P<path>\S+) [^"]*" (?P<status>\d{3}) \S+ "[^"]*" "(?P<agent>[^"]*)"'
)
AGENTS = ["OAI-SearchBot", "ChatGPT-User", "PerplexityBot", "Googlebot"]
def count_fetches(log_path, page_path):
counts = Counter()
for line in open(log_path, encoding="utf-8", errors="replace"):
m = LOG_LINE.search(line)
if not m or not m.group("path").startswith(page_path):
continue
for name in AGENTS:
if name.lower() in m.group("agent").lower():
counts[(name, m.group("status"))] += 1
return counts
if __name__ == "__main__":
for (agent, status), n in sorted(count_fetches(sys.argv[1], sys.argv[2]).items()):
print(f"{agent:15} status {status}: {n}")Run it as python fetches.py access.log /best-project-tools. Read the status codes, not only the counts.
| Status seen | Likely meaning | Next step |
|---|---|---|
| 200 | The crawler received the page | Move on to citation checks |
| 403 | A firewall or bot rule blocked it | Review WAF and CDN bot settings |
| 404 | The URL is wrong or was removed | Fix redirects and sitemap entries |
| 429 | Rate limiting turned the crawler away | Adjust rate limits for verified bots |
| 5xx | Server errors | Fix reliability first |
| No requests | Never fetched, or blocked by robots.txt | Check robots.txt and internal links |
Gotchas with log data
- User agents can be forged. Any client can claim to be a known bot. Vendors that publish IP ranges let you verify a request against them. Do this before drawing conclusions from small counts.
- A 200 does not prove the content was read. If the comparison table is built by JavaScript after load, a fetcher that does not run scripts sees an empty shell. Fetch the page with a plain HTTP client and confirm the table is in the raw HTML.
- Some answers use another engine's index. An assistant may rely on a search provider's results and never fetch your page itself. Absence from your logs for one agent does not mean absence from answers.
- CDN logs may differ from origin logs. Cached responses never reach your origin. Use the CDN's logs if you have a cache in front.
Stage 2: Citation checks
There is no dashboard that lists every AI answer citing your page. You measure by sampling. Build a fixed query set, run it on a schedule, and record what appears.
Build the query set
Use the three intents from earlier chapters. For a project-tools page, an example set looks like this:
- Best-of: "best project management tool for small teams"
- Best-of with a constraint: "best free project management tool for a team of 8"
- Versus: "Tool A vs Tool B"
- Alternatives: "alternatives to Tool B"
Write each query the way a buyer would type it. Add three to five variants per intent, since small wording changes can change the sources. Keep the set stable between runs so results are comparable.
Record each run
For each query, on each assistant you care about, log the date, the query, whether your page was cited, which other domains were cited, and whether your product was mentioned in the answer text. A product can be mentioned without your page being cited, and the reverse.
import csv
from datetime import date
FIELDS = [
"date", "assistant", "query", "page_cited",
"product_mentioned", "position_in_answer", "other_domains",
]
def log_run(path, rows):
with open(path, "a", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=FIELDS)
if f.tell() == 0:
writer.writeheader()
writer.writerows(rows)
log_run("citation_log.csv", [
{
"date": date.today().isoformat(),
"assistant": "assistant-1",
"query": "best project management tool for small teams",
"page_cited": "yes",
"product_mentioned": "yes",
"position_in_answer": 2,
"other_domains": "review-site.example; forum.example",
},
])Reading the results
Answers vary between runs, between accounts, and between locations. A single result is an anecdote. Repeat each query several times and report a rate, such as "cited in 4 of 10 runs". Compare rates across weeks, not single runs.
The other_domains column is often the most useful part. If the same third-party list is cited in every run and your page never is, compare it with your page. Look at which criteria it covers, how recent it is, and how clearly its table states each value. This feeds directly into the criteria and freshness work from earlier chapters.
Stage 3: Clicks and referrals
When someone clicks a citation, the visit may arrive with a referrer from the assistant's domain. Some assistants append a tracking parameter to the link. Others strip the referrer, so the visit appears as direct traffic.
Set up a segment in your analytics tool that groups sessions by known assistant referrer domains and any documented URL parameter. Verify the domain names by clicking a citation yourself and watching what arrives.
| Signal | Reliability | Note |
|---|---|---|
| Referrer domain of an assistant | Good when present | Missing for some apps and privacy settings |
| Documented UTM-style parameter | Good when present | Check that your redirects do not drop it |
| Rise in direct traffic to a deep URL | Weak hint | Direct traffic to a long article URL is unusual, so it can hint at untracked clicks |
| Branded search growth | Indirect | People may read the answer, then search your name |
Expect undercounting. Referral numbers are a floor, not a total. A reader who sees your product in an answer and later types your domain leaves no trace in this stage.
Compare stages to find the break
Put the three numbers side by side for the same period and diagnose by where the drop occurs.
| Pattern | Diagnosis |
|---|---|
| No fetches | Crawl access problem: robots.txt, firewall, or no inbound links |
| Fetches, no citations | Content problem: criteria, evidence, structure or freshness |
| Citations, no clicks | Presentation problem: title, description, or the answer already satisfied the reader |
| Clicks, low conversion | Page experience or audience fit, not an AI visibility issue |
Checking the markup itself
Structured data errors can undermine an otherwise good page. Reuse the ItemList check from the structured data chapter after every edit, so a template change does not quietly break position numbering.
import json
import re
import sys
html = open(sys.argv[1], encoding="utf-8").read()
blocks = re.findall(
r'<script type="application/ld\+json">(.*?)</script>', html, re.S
)
for raw in blocks:
data = json.loads(raw)
if data.get("@type") == "ItemList":
positions = [e["position"] for e in data["itemListElement"]]
expected = list(range(1, len(positions) + 1))
assert positions == expected, f"positions out of order: {positions}"
print(f"ItemList ok: {len(positions)} items")Also compare the JSON-LD order against the visible list. The two must match, or the markup misdescribes the page.
A routine you can keep up
- Weekly: run the log script and look for non-200 statuses from AI agents.
- Every two weeks: run the query set and append to the citation log.
- Monthly: review referral sessions, compare the three stages, and note which page edits preceded any change.
- After any edit: record the date. Without it you cannot link changes to results.
Common measurement mistakes
- Judging from one query run, when answers vary between runs.
- Treating user-agent strings as proof without verifying IP ranges.
- Counting mentions as citations, or citations as clicks.
- Changing the query set between runs, which breaks comparison.
- Changing several things on the page at once, so you cannot tell which change mattered.
- Expecting precise attribution. The data is sampled and incomplete, and the aim is to find trends and the stage where the page breaks.
Exercise
Your logs show a verified AI search crawler fetching your best-of page every few days with status 200. Your sampled queries (10 runs each) show the page cited in 0 of 40 runs, while a competitor's list is cited in 31 of 40. Which stage is failing, and what is your first action?
Show answer
Retrieval is working, so the break is at the citation stage, which points to a content or presentation problem rather than crawl access. First confirm the comparison table appears in the raw HTML. Then compare your page with the competitor's list on criteria covered, evidence and stated method, table clarity, and the date it was last updated. Make one change at a time and record the edit date so you can see its effect in later runs.
Exercise
Analytics shows few referral visits from AI assistants, but citation checks show your page appearing in about half of the runs. Name two reasons the referral count may be lower than real clicks.
Show answer
Some assistants or apps strip the referrer, so those visits appear as direct traffic. Readers may also see your product in the answer and later search for your name or type your domain, which leaves no AI referral. Redirects that drop tracking parameters can also cause undercounting.