TL;DR
AI agents are buying things on behalf of users. Google Gemini, ChatGPT, Perplexity, Claude, and Copilot are all completing purchases through UCP (Universal Commerce Protocol) and ACP (Agent Commerce Protocol). Traditional analytics tools like GA4 cannot see any of it.
Here is what you are missing vs. what agentic analytics tracks:
| Metric | GA4 / Traditional | Agentic Analytics (V2) |
|---|---|---|
| AI agent discovery of your store | No | Yes |
| Product browsing by agents | No | Yes |
| Checkout sessions created by agents | No | Yes |
| Payment submissions by agents | No | Yes |
| Completed orders from agents | No | Yes |
| Revenue attributed to AI agents | No | $12,450 (demo) |
| Conversion rate by AI agent | No | 10.8% (demo) |
| Which agent converts best | No | Gemini at 12.7% |
| Error analysis (why agents fail) | No | By error code + fix |
| Capability gaps (what agents want) | No | 67.4% match rate |
| UCP vs ACP protocol split | No | 72% UCP / 25% ACP |
If you are running a UCP-enabled store today, this article walks you through the full agentic commerce funnel, the 6 KPIs you need to track, and how to set it all up in 5 minutes.
The Problem: AI Commerce is Invisible
Google AI Mode launched agentic shopping in early 2026. A user says "buy me wireless earbuds under $80" and Gemini discovers your store, browses your catalog, creates a checkout session, submits payment credentials, and completes the order. The entire transaction happens through API calls — no browser, no JavaScript, no cookies, no page views.
GA4 is built for browsers. It tracks page views, click events, sessions identified by cookies, and user journeys reconstructed from JavaScript execution. When an AI agent calls your /.well-known/ucp endpoint, GA4 sees nothing. When that agent creates a checkout session via POST /checkout-sessions, GA4 records zero events. When the order completes and money changes hands, GA4 attributes it to "direct" traffic or "other" — if it sees it at all.
This is not a minor gap. If you are a UCP-enabled merchant, a growing percentage of your revenue is coming from AI agent transactions that your analytics stack cannot measure, attribute, or optimize. You cannot improve what you cannot see.
The problem gets worse when you consider that most early UCP analytics only tracked discovery — whether agents found your /.well-known/ucp file. Discovery is stage one of five. Tracking only discovery is like measuring how many people walked past your store without knowing if anyone walked in, picked up a product, went to the register, or paid. You are missing 80% of the funnel.
Real money is changing hands through these protocols now. And you are flying blind.
The Agentic Commerce Funnel: 5 Stages
The agentic commerce funnel has five distinct stages. Each maps to specific API interactions between the AI agent and your store. Here is how they work, with real numbers from the UCPtools Analytics demo:
Stage 1: Discovery (1,523 events)
The agent hits /.well-known/ucp to discover your store's capabilities. This is the equivalent of a user landing on your homepage — except it happens in milliseconds and the agent parses your entire product catalog structure, payment handlers, and supported capabilities in a single request.
What triggers it: GET /.well-known/ucp
What the agent learns: Your store exists, what you sell, how to buy it, which payment methods you accept.
Stage 2: Browse (847 events)
The agent queries your product catalog. It might search for specific products, filter by price, or inspect product details. This is the equivalent of a user browsing category pages and reading product descriptions.
What triggers it: GET /products, GET /products/:id, capability negotiation
What the agent learns: Product availability, pricing, variants, inventory status.
Key drop-off: 44.4% of agents that discover your store never browse. This is the biggest leak in the funnel. Common causes: missing capabilities, slow response times, incomplete product data.
Stage 3: Checkout (312 events)
The agent creates a checkout session. It has selected products and is ready to buy. This is the "add to cart + proceed to checkout" moment.
What triggers it: POST /checkout-sessions
What happens: A checkout session ID is created. The agent adds line items, sets shipping preferences, and prepares for payment.
Stage 4: Payment (213 events)
The agent submits payment credentials. In UCP, this goes through the payment handler defined in your profile (Google Pay, Shop Pay, Stripe). In ACP, this goes through Stripe directly.
What triggers it: PUT /checkout-sessions/:id/complete with payment credentials
What happens: Payment is processed. The session transitions to completed or failed.
Checkout abandonment at this stage: 31.7% — agents that create a checkout session but never submit payment. Reasons include: escalation required (agent needs human buyer input), payment handler errors, timeout.
Stage 5: Order (165 events)
The order is completed. Money has changed hands. The agent may follow up with fulfillment queries (shipping status, tracking).
What triggers it: Order confirmation response with status: completed
What happens: Revenue is recorded. The agent may query /orders/:id for fulfillment updates.
Overall Funnel Performance
Discovery: 1,523 ████████████████████████████████████████ 100%
Browse: 847 ██████████████████████░░░░░░░░░░░░░░░░░░ 55.6%
Checkout: 312 ████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 20.5%
Payment: 213 █████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 14.0%
Order: 165 ████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 10.8%
Overall conversion rate: 10.8% (discovery to completed order). For context, traditional e-commerce conversion rates hover around 2-3%. AI agents convert at 3-5x the rate of human shoppers because they are purpose-driven — they already know what the user wants to buy.
6 KPIs Every AI-Ready Merchant Needs
Traditional e-commerce KPIs (bounce rate, pages per session, cart abandonment) do not apply to agentic commerce. AI agents do not bounce — they either complete the funnel or fail at a specific stage. Here are the 6 KPIs that matter:
1. Agentic Revenue
Definition: Total revenue from orders completed by AI agents.
Formula: SUM(order_total) WHERE event_type = 'order_created'
Demo value: $12,450 over 7 days
This is your headline number. It tells you how much money AI agents are generating for your store. Track it over time to see the growth trend — in the demo data, traffic is growing at 8% week-over-week.
2. Agentic Conversion Rate
Definition: Percentage of AI agent discoveries that result in a completed order.
Formula: (order_count / discovery_count) * 100
Demo value: 10.8% (165 orders / 1,523 discoveries)
This is your end-to-end funnel efficiency. A 10.8% conversion rate means roughly 1 in 9 AI agents that discover your store end up completing a purchase. Compare this across time periods and after making changes to your UCP profile.
3. Average Order Value (AOV)
Definition: Average revenue per completed AI agent order.
Formula: agentic_revenue / order_count
Demo value: $75.45 ($12,450 / 165 orders)
Compare this to your human AOV. If agentic AOV is lower, agents may be selecting cheaper products or missing upsell opportunities. If it is higher, agents may be better at finding what users actually want.
4. Escalation Rate
Definition: Percentage of checkout sessions where the agent must hand off to a human buyer for input.
Formula: (escalation_events / checkout_events) * 100
Demo value: 18.3%
Escalations happen when the agent encounters something it cannot handle autonomously — age verification, custom product configuration, ambiguous shipping options, or payment methods that require human interaction. A high escalation rate means friction. Every escalation is a conversion risk.
5. Checkout Abandonment Rate
Definition: Percentage of checkout sessions that are created but never completed.
Formula: ((checkout_count - order_count) / checkout_count) * 100
Demo value: 31.7% ((312 - 213) / 312 * 100)
This is the agentic equivalent of cart abandonment. But the causes are different — agents do not get distracted or leave to compare prices. They abandon because of errors, timeouts, escalation failures, or payment handler issues. Every abandoned checkout is a bug you can fix.
6. Time to Purchase
Definition: Average time from discovery to completed order.
Formula: AVG(order_timestamp - discovery_timestamp)
Demo value: 45.2 seconds
Human shoppers take minutes to hours. AI agents take seconds. If your time-to-purchase is increasing, something is slowing agents down — slow API responses, rate limiting, or complex checkout flows. In the demo, the average response time across all endpoints is 89ms.
Which AI Agent Converts Best?
Not all AI agents perform the same on your store. Each has different browsing patterns, error handling, and checkout behaviors. Here is the agent comparison from the demo data:
| Agent | Total Events | Conversion Rate | Avg Order Value | Error Rate | Avg Response Time |
|---|---|---|---|---|---|
| Gemini | 1,124 | 12.7% | $82.30 | 0.8% | 72ms |
| ChatGPT | 892 | 10.7% | $71.20 | 1.4% | 95ms |
| Perplexity | 421 | 8.2% | $64.50 | 1.9% | 108ms |
| Claude | 298 | 8.9% | $78.90 | 0.7% | 85ms |
| Copilot | 112 | 6.5% | $55.00 | 2.7% | 115ms |
Key insights:
- Gemini leads in volume and conversion. 1,124 events with a 12.7% conversion rate and the highest AOV at $82.30. As the agent behind Google AI Mode shopping, it has the most mature UCP integration.
- Claude has the lowest error rate. At 0.7%, Claude encounters fewer errors than any other agent. Combined with a strong $78.90 AOV, it is the most reliable agent on this store.
- Copilot is still growing. Only 112 events but a 2.7% error rate and the lowest conversion at 6.5%. The UCP integration is newer, and stores may need to accommodate its specific request patterns.
- ChatGPT brings volume. 892 events with a solid 10.7% conversion rate. The 1.4% error rate suggests some rough edges in checkout handling.
- Perplexity is mid-funnel. Decent discovery volume (421 events) but conversion drops to 8.2%. The 1.9% error rate suggests endpoint compatibility issues.
This data tells you where to focus. If Gemini is your top converter, optimize for its patterns. If Copilot has high errors, check your logs for what is failing and fix it.
Error Analysis: Why AI Agents Fail on Your Store
A 1.2% overall error rate sounds low, but 34 errors across 2,847 events means 34 transactions that could have been revenue. Here is how those errors break down:
404 Not Found — 44.1% of errors (15 occurrences)
Affected endpoints: /api/ucp/products, /.well-known/ucp
Affected agents: ChatGPT, Perplexity
Your UCP endpoints are misconfigured or missing. The agent is requesting a URL that does not exist on your server. This is the most common and most fixable error.
Fix: Verify that /.well-known/ucp returns your UCP profile with a 200 status. Ensure all endpoints declared in your profile actually exist and respond. Run curl -I https://your-store.com/.well-known/ucp to check.
500 Internal Server Error — 23.5% of errors (8 occurrences)
Affected endpoints: /checkout-sessions
Affected agents: Gemini, ChatGPT
Your UCP route handler is throwing unhandled exceptions. This typically happens during checkout — the agent sends a valid request, but your backend crashes processing it.
Fix: Add error handling to your checkout session creation endpoint. Log the request body from AI agents and reproduce the failure. Common causes: missing fields the agent does not send, database connection issues under load, null reference errors in shipping calculation.
429 Too Many Requests — 17.6% of errors (6 occurrences)
Affected endpoints: /.well-known/ucp, /api/ucp/products
Affected agents: Gemini
Your rate limiter is blocking AI agents. Gemini in particular sends bursts of requests during product browsing. If your rate limiter treats AI agents the same as potential attackers, legitimate commerce traffic gets throttled.
Fix: Whitelist known AI agent User-Agent patterns from rate limiting on UCP endpoints, or increase the rate limit for these routes. AI agents are customers, not bots to block.
401 Unauthorized — 14.7% of errors (5 occurrences)
Affected endpoints: /checkout-sessions
Affected agents: Copilot, Perplexity
Your UCP endpoints require authentication that AI agents cannot provide. UCP endpoints should be publicly accessible (authenticated by the protocol itself, not by session tokens or API keys).
Fix: Ensure your UCP routes do not sit behind authentication middleware. The UCP protocol handles trust verification through signing keys and the UCP-Agent header, not through traditional auth tokens.
Capability Gap Analysis
AI agents request capabilities based on what the user asks for. If your store does not support a capability the agent needs, the agent either drops off or escalates. Capability gap analysis shows you what agents want that you do not offer.
Current match rate: 67.4% — your store supports two-thirds of what agents request. The remaining third is lost opportunity.
Supported Capabilities (Working)
| Capability | Requests |
|---|---|
dev.ucp.shopping.checkout |
312 |
dev.ucp.shopping.order |
165 |
Unsupported Capabilities (Revenue Leaks)
| Capability | Requests | Suggested Action |
|---|---|---|
dev.ucp.shopping.fulfillment |
89 | Add fulfillment extension to enable shipping and tracking queries from agents. |
dev.ucp.shopping.discount |
47 | Add discount extension to allow agents to apply promo codes. |
dev.ucp.shopping.buyer_consent |
23 | Add buyer consent extension for GDPR compliance with agent transactions. |
89 agents asked for fulfillment tracking and got nothing back. 47 tried to apply discount codes. These are not abstract feature requests — they are real agents trying to complete real transactions for real users. Each unsupported capability is a potential drop-off point.
Adding the fulfillment extension alone could recover a meaningful percentage of the Discovery-to-Browse drop-off, because agents that cannot check shipping status may not proceed to checkout.
Implementation: 5-Minute Middleware Setup
Tracking the full agentic commerce funnel requires middleware that intercepts UCP and ACP requests, classifies them into funnel stages, and sends events to your analytics endpoint. Here is how to do it in Express.js:
const ucpAnalytics = require('./ucp-analytics');
// Wrap all UCP and ACP routes
app.use('/api/ucp', ucpAnalytics({
apiKey: 'ucpa_your_key',
endpoint: 'https://ucptools.dev/v1/analytics/events'
}));
app.use('/acp', ucpAnalytics({
apiKey: 'ucpa_your_key',
endpoint: 'https://ucptools.dev/v1/analytics/events'
}));
app.use('/.well-known/ucp', ucpAnalytics({
apiKey: 'ucpa_your_key',
endpoint: 'https://ucptools.dev/v1/analytics/events'
}));
What the Middleware Auto-Detects
Agent type — identified from the UCP-Agent header (per UCP spec) and User-Agent pattern matching:
ChatGPT/OpenAI: chatgpt, openai, gptbot
Google Gemini: gemini, google-extended
Perplexity: perplexitybot
Claude: anthropic, claude
Microsoft Copilot: copilot
Event type — classified from the HTTP method and request path:
GET /.well-known/ucp -> discovery
GET /products -> product_browse
POST /checkout-sessions -> checkout_create
PUT /checkout-sessions/:id -> checkout_update
POST /checkout-sessions/:id/complete -> payment_attempt
GET /orders/:id -> fulfillment_query
Checkout state — extracted from the response body. When your endpoint returns { "status": "completed" }, the middleware records an order_created event. When it returns { "status": "requires_escalation" }, it records a checkout_escalation event.
Order totals — extracted from totals.total.amount and totals.total.currency in the response body. No PCI-sensitive data is ever captured.
Protocol — UCP endpoints are classified as ucp, ACP endpoints as acp. This powers the protocol distribution metric.
Event Buffering
Events are buffered and flushed in batches (every 10 events or every 5 seconds) to avoid adding latency to your UCP responses. The tracking call is fire-and-forget — it never blocks the response to the AI agent.
Next.js Setup
For Next.js (App Router or Pages Router), the middleware goes in your middleware.ts file at the project root:
// middleware.ts
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';
const UCPTOOLS_API_KEY = 'ucpa_your_key';
const UCPTOOLS_ENDPOINT = 'https://ucptools.dev/v1/analytics/events';
const UCP_ROUTES = [
'/.well-known/ucp', '/api/ucp', '/checkout-sessions',
'/products', '/orders', '/mcp', '/acp',
];
function detectAgent(req: NextRequest): string | null {
const ua = (req.headers.get('user-agent') || '').toLowerCase();
if (/chatgpt|openai|gptbot/.test(ua)) return 'chatgpt';
if (/gemini|google-extended/.test(ua)) return 'gemini';
if (/perplexitybot/.test(ua)) return 'perplexity';
if (/anthropic|claude/.test(ua)) return 'claude';
if (/copilot/.test(ua)) return 'copilot';
return req.headers.get('ucp-agent') ? 'unknown' : null;
}
export function middleware(request: NextRequest) {
const agent = detectAgent(request);
if (!agent) return NextResponse.next();
const path = request.nextUrl.pathname;
if (!UCP_ROUTES.some(r => path.includes(r)))
return NextResponse.next();
// Fire and forget
fetch(UCPTOOLS_ENDPOINT, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Analytics-Key': UCPTOOLS_API_KEY,
},
body: JSON.stringify({
events: [{
event_type: 'discovery',
protocol: 'ucp',
user_agent: request.headers.get('user-agent'),
endpoint: path,
}],
}),
}).catch(() => {});
return NextResponse.next();
}
export const config = {
matcher: ['/.well-known/ucp', '/api/ucp/:path*',
'/checkout-sessions/:path*', '/acp/:path*'],
};
Python (Flask/Django)
Python support is also available. The middleware uses the same pattern — detect the agent, classify the request, buffer the event:
from flask import Flask, request, g
import re, threading, time, requests as http_requests
UCPTOOLS_API_KEY = 'ucpa_your_key'
UCPTOOLS_ENDPOINT = 'https://ucptools.dev/v1/analytics/events'
def detect_agent(headers):
ua = (headers.get('User-Agent') or '').lower()
if re.search(r'chatgpt|openai|gptbot', ua): return 'chatgpt'
if re.search(r'gemini|google-extended', ua): return 'gemini'
if re.search(r'perplexitybot', ua): return 'perplexity'
if re.search(r'anthropic|claude', ua): return 'claude'
if re.search(r'copilot', ua): return 'copilot'
return 'unknown' if headers.get('UCP-Agent') else None
app = Flask(__name__)
@app.after_request
def track_ucp(response):
agent = detect_agent(dict(request.headers))
if not agent:
return response
# Buffer and send event (fire-and-forget)
threading.Thread(target=lambda: http_requests.post(
UCPTOOLS_ENDPOINT,
json={'events': [{'event_type': 'discovery',
'protocol': 'ucp',
'endpoint': request.path}]},
headers={'X-Analytics-Key': UCPTOOLS_API_KEY},
timeout=2
), daemon=True).start()
return response
PHP and Shopify (Remix) middleware are also available in the UCPtools dashboard setup guide.
UCP vs ACP: Track Both Protocols
Two agentic commerce protocols are live today:
- UCP (Universal Commerce Protocol) — developed by Google and Shopify with 25+ partners. Powers Google AI Mode shopping, Gemini agent commerce, and the broader open ecosystem.
- ACP (Agent Commerce Protocol) — developed by OpenAI and Stripe. Powers ChatGPT shopping and agent-initiated payments through Stripe.
Your store may receive traffic from both protocols. In the demo data:
UCP: 72% ████████████████████████████████████░░░░░░░░░░░░░░░
ACP: 25% ████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Unknown: 3% █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
UCP dominates because Gemini has the most mature agent commerce integration and Google AI Mode is the primary driver of agentic shopping traffic today. But ACP at 25% is significant — ChatGPT commerce through Stripe is growing rapidly.
The middleware auto-classifies requests by protocol based on the endpoint pattern. UCP routes (/.well-known/ucp, /checkout-sessions, /products) are tagged as ucp. ACP routes (/acp/checkout, /acp/payment, /acp/webhook) are tagged as acp. This gives you protocol-level analytics without any additional configuration.
Tracking both protocols in a single dashboard matters because your optimization decisions affect them differently. A change to your checkout flow might improve UCP conversion while breaking ACP compatibility, or vice versa.
Try It Now
You can explore the full analytics dashboard right now with zero signup:
Interactive demo: ucptools.dev/dashboard/analytics?demo=true
The demo loads realistic data so you can see exactly what production tracking looks like:
- 2,847 events across the full funnel
- 892 sessions from 5 AI agents
- $12,450 in agentic revenue with $75.45 AOV
- Conversion funnel from discovery to order
- Agent comparison table with per-agent conversion rates
- Error analysis with fix suggestions
- Capability gap analysis showing what agents want
- Protocol distribution (UCP vs ACP)
When you are ready for production tracking:
- Sign up at ucptools.dev (Starter plan: $9/mo)
- Add your domain
- Copy the middleware code for your platform
- Paste it into your codebase
- Deploy
Full setup takes under 5 minutes. The first events appear in your dashboard within seconds of an AI agent hitting your store.
Conclusion
Agentic commerce analytics is a new category. It did not exist six months ago because agentic commerce itself barely existed. Now, AI agents are completing real purchases on real stores through real payment systems, and the merchants running those stores have no visibility into what is happening.
The funnel is different. Five stages instead of the traditional e-commerce funnel. Discovery happens through API calls, not page views. Browsing is programmatic, not visual. Checkout is milliseconds, not minutes.
The KPIs are different. Agentic revenue, agent-specific conversion rates, escalation rates, time-to-purchase in seconds, capability gap analysis — none of these exist in GA4 or any traditional analytics platform.
The optimization levers are different. You are not A/B testing button colors or headline copy. You are fixing 404 errors on UCP endpoints, increasing rate limits for AI agents, adding capability extensions that agents are requesting, and comparing conversion rates across Gemini, ChatGPT, Perplexity, Claude, and Copilot.
No other tool tracks this today. UCPtools Analytics V2 is purpose-built for the agentic commerce funnel, and it tracks both UCP and ACP protocols in a single dashboard.
Merchants who set this up now have a first-mover advantage. When agentic commerce traffic doubles (and it will), you will already know which agents convert, where the funnel leaks, and what capabilities to add. Everyone else will still be attributing AI agent revenue to "direct" in Google Analytics.
Resources
- Interactive Analytics Demo — explore the full dashboard with sample data
- UCPtools Dashboard — production analytics for your store
- UCP Specification — the official UCP protocol spec
- ACP Specification — the official ACP protocol spec
- Google UCP Developer Guide — getting started with UCP
What questions do you have about tracking AI agent commerce? Have you started seeing agentic traffic on your store? Drop a comment below!
UCP is an open standard by Google and Shopify. ACP is an open standard by OpenAI and Stripe. UCPtools is an independent community tool.
Top comments (0)