Sub topic 12
Tracking AI Referrals and Citations
This chapter covers how to detect visits that come from AI assistants, how to check whether AI answers cite your pages, and how to report both with their gaps stated. It assumes you can read Search Console and analytics reports, understand referrers and sessions, and follow short Python snippets. The earlier chapters gave you a way to rank topics by value at risk and defensibility. Here you build the evidence that feeds those decisions and the review cadence in the next chapter.
Why track AI visibility at all
Click loss tells you what you lost. AI referral and citation data tells you what you may be getting back, and whether your pages still shape the answers people read. Two different signals matter:
- Referrals are visits that arrive from an AI assistant or AI feature. They show up in your analytics as sessions.
- Citations are links or named mentions of your site inside an AI answer. They can happen with no visit at all. A person reads the answer, sees your name, and never clicks.
Referrals are measurable in your own data. Citations are not. You have to sample them by asking the assistants questions and recording what comes back. Treat the two as separate columns in your reporting, because they fail in different ways.
Detecting AI referrals in your analytics
The simplest method is to classify each visit by its referrer host. The referrer is the URL of the page the visitor came from, sent by the browser in many but not all cases.
from urllib.parse import urlparse
AI_REFERRER_HOSTS = {
"chatgpt.com",
"perplexity.ai",
"www.perplexity.ai",
"gemini.google.com",
"copilot.microsoft.com",
}
def is_ai_referral(referrer_url):
if not referrer_url:
return False
return urlparse(referrer_url).hostname in AI_REFERRER_HOSTS
visits = [
"https://chatgpt.com/",
"https://www.google.com/",
"",
"https://www.perplexity.ai/search",
]
print(sum(is_ai_referral(v) for v in visits), "of", len(visits), "visits came from AI assistants")This prints 2 of 4 visits came from AI assistants. The function compares the parsed hostname against an exact set, so a host you did not list is missed. Assistants change domains and add new ones, so keep the list in one place and review it on a schedule.
The same idea in your analytics tool
You rarely need to write code for this. Most analytics tools let you build a custom channel group or segment with a rule on the source or referrer. A typical rule is a regular expression on the source, for example one that matches chatgpt.com, perplexity, gemini.google.com and copilot.microsoft.com. Build it once, apply it to historical data if the tool allows, and keep a note of the date you created it. Data before that date may not be comparable.
Some assistants append a marker to outbound links, such as a utm_source parameter. If you see one on landing page URLs, you can use it as a second signal. Do not assume it is present on every visit, and do not assume it stays the same over time.
Why referral counts are a lower bound
Every AI referral count you produce understates reality. Report it as "at least N". The main causes are:
- Missing referrers. Many visits from assistants arrive with no referrer. Mobile apps, privacy settings, and link-opening behavior can strip it. These sessions land in your direct traffic.
- AI summaries inside Google Search. Clicks from an AI summary on a Google results page are not reported separately in Search Console. They are folded into the normal web search totals, so you cannot split them from ordinary clicks.
- Copied URLs and brand searches. A person who reads your name in an answer and then types your brand into a search engine appears as a branded organic visit, not an AI visit.
- Changing hosts. A new assistant or a domain change is invisible until you add it to your list.
The effect is that a rising AI referral line may reflect better detection rather than more traffic, and a flat line does not prove nothing is happening. Record the date of any change to your classification rule so you can tell the two apart.
Reading the direct channel
Because missing referrers fall into direct traffic, a useful cross-check is to look at landing pages. Direct sessions that land on deep, specific pages, such as a pricing comparison, are unusual for someone typing a URL. A rise in direct sessions on pages that rarely get bookmarked suggests hidden assistant traffic. This is an inference, not a measurement. Label it that way in your report and do not add it to the referral count.
Tracking citations
A citation check asks a fixed set of questions in each assistant and records whether your site appears. Because answers vary from run to run and by user, you are sampling, not counting.
Build a prompt set
Pick prompts from your topic list, one or more per topic, phrased the way a customer would ask. Include a mix across intents:
- Informational prompts, such as "what is a CRM".
- Comparison prompts, such as "compare CRM pricing for small teams".
- Task prompts, such as "give me a CRM migration checklist".
Keep the wording fixed between runs. If you change a prompt, record it as a new prompt rather than a continuation of the old one.
Record what you see
For each run, store the date, assistant, prompt, whether your domain was cited, which URL was cited, and which competitors were cited. A plain table or CSV is enough.
import csv
from collections import defaultdict
rows = [
{"date": "2026-11-01", "assistant": "chatgpt", "topic": "crm pricing comparison", "cited": True},
{"date": "2026-11-01", "assistant": "perplexity", "topic": "crm pricing comparison", "cited": False},
{"date": "2026-11-01", "assistant": "chatgpt", "topic": "what is a crm", "cited": False},
{"date": "2026-11-01", "assistant": "perplexity", "topic": "what is a crm", "cited": False},
]
with open("citation_checks.csv", "w", newline="") as f:
writer = csv.DictWriter(f, fieldnames=["date", "assistant", "topic", "cited"])
writer.writeheader()
writer.writerows(rows)
totals = defaultdict(lambda: [0, 0])
for r in rows:
totals[r["topic"]][0] += r["cited"]
totals[r["topic"]][1] += 1
for topic, (cited, runs) in totals.items():
print(f"{topic}: cited in {cited} of {runs} checks")The output is crm pricing comparison: cited in 1 of 2 checks and what is a crm: cited in 0 of 2 checks. Four checks are far too few to draw a conclusion. In practice, repeat each prompt several times per assistant per period, then report a rate with the number of checks beside it.
Why one check proves little
Assistants can give different answers to the same prompt on different days, in different locations, or with different conversation history. A single "cited" or "not cited" is an observation. A pattern across many checks and several periods is evidence. When your sample is small, say so in the report.
What a citation is worth
A citation does not carry the same value as a click. It can build brand recognition and send some readers to your site. It can also mean your content supplied the answer while the reader never visited, which is the exact loss you are trying to manage. Use citation data in three ways:
- Confirm defensibility. If a topic you scored as defensible is never cited and never referred, your differentiation may not be visible to the systems that summarize it.
- Spot competitors. Repeated citations of the same competitor page show which source the assistants prefer for that topic.
- Check pages you plan to let go. If a let-go page is still cited often, retire it carefully, because the cost may be higher than traffic shows.
Connecting tracking to the decision
Tracking supports the framework from earlier chapters but does not replace it. The value-at-risk calculation still uses lost clicks and value per click. The AI data adjusts your confidence and your tactics:
| Observation | What it suggests | Likely action |
|---|---|---|
| Clicks down, citations frequent, some referrals | Content is used and partly credited | Strengthen calls to action and unique elements on the cited page |
| Clicks down, never cited, no referrals | Content is being replaced or ignored | Reassess defensibility; adapt or let go |
| Clicks stable, citations rare | Searchers still prefer your result | Keep monitoring, no change yet |
| Clicks down, competitor cited often | A rival page fits the answer better | Compare content and consider a defend tactic |
These are hypotheses to test, not rules. The table gives you a starting point for a review discussion.
Reporting with the gaps stated
A good report makes its limits visible. Include these items every time:
- The AI referral count, labeled as a lower bound.
- The date your classification rule was last changed and the hosts it covers.
- The number of prompts, assistants, and repeats behind each citation rate.
- A note that AI summary clicks inside Google Search are not separable in Search Console.
- Any inference, such as hidden direct traffic, marked as inference.
Avoid single headline numbers such as "AI drives 3% of traffic" without this context. Readers will treat the figure as exact, and a later change in method will look like a trend.
Common errors
- Treating the host list as complete. New assistants appear. Review the list regularly.
- Comparing periods across a rule change. If you add a host in March, February's count is not comparable to April's.
- Counting a citation as a visit. They are different events and belong in separate columns.
- Running each prompt once. Variation in answers makes single checks unreliable.
- Changing prompt wording silently. It breaks the time series.
- Ignoring page-level detail. A site-wide AI referral total hides which topics benefit. Group by landing page and topic, using the same topic grouping as your click loss analysis.
Practical setup checklist
- Create an AI referral channel or segment in your analytics tool and note its creation date.
- Write down the host list and where it is stored.
- Choose a fixed prompt set covering your highest value-at-risk topics first.
- Run each prompt in each assistant several times and log the results.
- Group referrals and citations by topic, matching your earlier topic grouping.
- Produce one report with the gaps stated and bring it to the scheduled review.
Exercise
Your analytics show 40 AI referral sessions this month, up from 25 last month. During the month you added two new assistant hosts to your classification rule. What can you conclude about growth, and what would you do to get a fair comparison?
Show answer
You cannot conclude that AI traffic grew by 60%. Part or all of the increase may come from detecting the two new hosts. To compare fairly, apply the new host list to last month's data, if your tool allows it, or recount last month with only the original hosts. Report the figure as a lower bound and record the date the rule changed.
Exercise
A topic you scored as "adapt" is cited in 1 of 3 checks in one assistant and 0 of 3 in another. Should you change your decision?
Show answer
No. Six checks are too few to support a change, and answers vary between runs. Increase the number of repeats per assistant, keep the prompt wording fixed, and revisit the result at the next scheduled review. Report the rate together with the number of checks.
Exercise
Search Console shows falling clicks on a topic, and your AI referral segment shows almost no visits for it. A colleague says this proves assistants are not sending traffic. Give two reasons the claim is unsafe.
Show answer
First, many assistant visits arrive without a referrer and land in direct traffic, so the segment undercounts. Second, clicks from AI summaries inside Google Search are included in ordinary web search totals and cannot be separated, so that traffic would not appear in your AI referral segment at all. The segment gives a lower bound, which cannot prove absence.