How to measure ROI from AI search: tracking, attribution and the business case
TL;DR
In April 2026 the average Slovak online store loses 15–40 % of its "unacknowledged" organic traffic, because AI search (ChatGPT, Gemini, Perplexity) shows up in Google Analytics 4 as direct or referral with no distinction. This article walks through 5 practical tracking techniques — from UTM conventions to server-side detection — and how to use them to build a business case for an AI search budget.
Why AI traffic is "invisible"
In GA4, pure AI traffic typically appears as:
- Source: direct — the user came from the ChatGPT web app (clicked a cited link)
- Source: google.com/bing.com — when ChatGPT Search serves links from the Bing index
- Source: perplexity.ai — Perplexity sends the referrer explicitly
- Source: gemini.google.com — Gemini, in some cases
Problem 1: every platform does it differently.
Problem 2: the ChatGPT desktop app strips the referrer entirely via its "Visit site" button → the visit lands in direct.
Problem 3: GA4's default attribution models don't count AI search as a separate channel.
Technique 1: UTM parameters in llms.txt and schema
If you have an llms.txt (see our previous article), you can put UTM-tagged URLs straight into it:
## Categories
- [Running shoes](https://yourshop.com/running-shoes?utm_source=llms_txt&utm_medium=ai)
The same goes for schema.org Product.offers.url. AI crawlers respect the parameters, so when a user clicks through from an answer, they arrive with the UTM attached.
GA4 setup:
- Admin → Data Streams → Web → More Tagging Settings → List unwanted referrals
- Add
chatgpt.com,chat.openai.com,perplexity.ai,gemini.google.com - This stops GA4 from overwriting the session with their referrer instead of crediting the AI channel
Technique 2: Server-side detection from the User-Agent
Many AI bots have an identifiable UA string. Add this to your Next.js middleware or a Cloudflare Worker:
// middleware.ts
export function middleware(req: NextRequest) {
const ua = req.headers.get('user-agent') ?? '';
const isAIClient =
ua.includes('GPTBot') ||
ua.includes('ClaudeBot') ||
ua.includes('PerplexityBot') ||
ua.includes('ChatGPT-User') || // ChatGPT browse plugin
ua.includes('cohere-ai');
if (isAIClient) {
// Log internally; don't redirect (they serve different purposes)
logAIVisit(req.url, ua);
}
return NextResponse.next();
}
This tells you which bots actually crawl you (for grounding and indexing) — a different use case from tracking user-attributed traffic, but it helps you understand whether AI "sees" you at all.
Technique 3: A dedicated landing page for AI referrals
Create a /ai or /found-via-ai URL. Use it as the primary link in llms.txt and in your schema entries:
## Contact
- [Write to us](https://yourshop.com/ai?ref=support)
- [Support](https://yourshop.com/ai?ref=faq)
GA4 then tells you that 100 % of visits to /ai/* are AI-attributed. A simple report:
GA4 Explore → Free-form exploration
Dimension: Page path
Metric: Sessions, Purchases
Filter: Page path starts with /ai/
Technique 4: A custom GA4 event for AI clicks
If you have your own landing page (/ai/*), fire an ai_attributed_visit event with parameters:
gtag('event', 'ai_attributed_visit', {
ai_source: getUtmParam('utm_source') || detectFromReferrer(),
landing_category: 'footwear',
first_query: null, // Unknown — AI doesn't share
});
In GA4 Reports → Events you will then see the AI-attributed conversion path with its own attribution.
Technique 5: Pozorio attribution API (coming soon)
In Q3 2026 we are launching an integration that takes the AI query from monitoring data and attaches it to GA4 clicks. In other words: we know that user X arrived at 14:32 from ChatGPT on the query "best running shoes" (because Pozorio ran that same query at 14:30 and sees it in the index). We join this server-side and export it to a GA4 Custom Dimension.
This is our unique offering — competitors (Peec, Otterly, Profound) don't provide it. See /roadmap.
How to build the business case for your CFO
CFOs ask one thing: "what does it cost and what will it bring in?" AI search has the nice property that:
- The cost is fixed (€39–299 for a monitoring tool, ~20-40 h of content a month)
- The result is cumulative (optimisations from Q1 still pay off in Q4)
Calculation template
Variables:
- Current monthly e-commerce revenue: €200 000
- Current organic traffic share: 40 %
- Organic traffic: €80 000/month
- Typical AI share of organic: 15 % (SK average, Apr 2026)
- Current AI-attributed: €12 000/month
If we double AI visibility:
- Additional revenue: +€6 000/month = +€72 000/year
- Cost: €99/month (Optimize) + 20 h content × €25 = €500 + €99 = ~€600/month
- ROI: 10× in the first year, 20× cumulative after the second year
What convinces a CFO
- Competitor X has a Pozorio score of 82, you have 54 — shows a concrete gap
- Weekly trend charts — showing the score really is rising
- A case study — revenue measured on
/ai/*landing pages before and after
The most common questions from managers
"Why can't we measure this natively in GA4?"
Because AI search isn't a channel Google has any incentive to highlight. Google doesn't like traffic from ChatGPT — it substitutes for its own search. GA4 will always underestimate AI traffic.
"Do we need GDPR compliance?"
UTM tracking and server-side detection are pure first-party analytics — no cookies. They are fully GDPR-compliant and don't need cookie banner consent. Pozorio itself sets no third-party cookies.
"How long until we see results?"
Weeks 1-2: tracking setup, baseline reporting
Weeks 3-6: schema + content improvements, LLMs.txt
Weeks 6-12: first measurable increase in AI share in GA4
Weeks 12-24: compounding effect, case study
You need at least a quarter of patience. AI indexing is slower than classic SEO, but the results are more stable.
Action steps for this week
- Monday: Run a Pozorio free audit — your baseline
- Tuesday: Add
/ai/*landing pages + UTM mapping - Wednesday: Deploy
llms.txtfollowing our guide - Thursday: GA4 exclude list + custom dimensions
- Friday: First CFO brief with baseline vs expected target
To track the long-term trend, sign up for the Monitor plan — 7 days free, and the weekly report shows exactly whether your changes are working.