Home › Blog › AI agent attribution
Shopify AI shopping agent attribution: how to see exactly what ChatGPT, Perplexity, and Google AI Mode are sending you
GA4 doesn't have an "AI shopping" channel. ChatGPT, Perplexity, and Google AI Mode all pass referrer strings that fall into the generic "Referral" bucket alongside your coupon partners and review sites. Here's how to break them out, measure revenue separately, and know whether fixing your structured data is actually moving the number.
On this page
- The attribution gap: why standard analytics misses AI traffic
- AI agent referrer signatures (complete reference table)
- Crawler traffic vs. customer referrals — the crucial distinction
- GA4 custom channel group for AI shopping agents
- Shopify Analytics limitations for AI traffic
- Server log analysis: parsing AI referral patterns
- Building your AI agent revenue dashboard (5 KPIs)
- Closing the loop: connecting attribution data back to structured data fixes
- Verification checklist
The attribution gap: why standard analytics misses AI traffic
When a shopper asks ChatGPT "find me a running shoe under $120 with wide sizing" and clicks through to your Shopify store, ChatGPT passes a referrer string — just like any other website link. But the string it passes (chatgpt.com) lands in your GA4 Referral channel alongside links from blog posts, affiliate sites, and coupon aggregators. There's no automatic separation.
The problem compounds across three dimensions:
- Multiple agents, different referrer strings. ChatGPT sends traffic from
chatgpt.com. Perplexity sends it fromperplexity.ai. Google AI Mode sends it fromgoogle.com— the same domain as organic search. Claude.ai sends it fromclaude.ai. Bing Copilot sends it frombing.com. Without a custom channel definition, these land in three different buckets: Referral, Organic Search, and nothing (for Bing, counted as Paid Search in some configurations). - Crawler traffic muddies the signal. GPTBot, PerplexityBot, and Google-Extended index your products. Their requests appear in server logs with distinct user-agent strings — but they don't appear in GA4 at all, because browsers don't fire GA4 events. The crawl count and the customer count are two completely separate signals that need to be read from two completely separate sources.
- Conversion rate matters more than traffic volume. Adobe's 2025 holiday data shows AI-referred retail traffic converts +31% better than non-AI traffic. That premium means a small AI shopping segment can drive outsized revenue — but you can't act on that finding if the traffic is buried in a generic Referral report.
AI agent referrer signatures (complete reference table)
Each AI shopping agent sends a different combination of referrer URL, user-agent string (for crawlers), and UTM parameters. This table is the raw material for your GA4 channel group definition and your server-log grep commands.
| Agent | Customer referrer (GA4 source) | Crawler user-agent (server logs) | UTM params passed? | Notes |
|---|---|---|---|---|
| ChatGPT Shopping | chatgpt.com | GPTBot/1.2, OAI-SearchBot/1.0 |
No (as of 2026-Q2) | Shopping clicks pass Referer: https://chatgpt.com/. Plugin clicks may pass deeper paths like chatgpt.com/c/... |
| Perplexity Shopping | perplexity.ai | PerplexityBot/1.0 |
No | Some Perplexity Commerce widget clicks pass perplexity.ai/search?q=... — capture the full referrer path for keyword analysis |
| Google AI Mode / AI Overviews | google.com | Google-Extended, Googlebot |
Sometimes (utm_source=google, utm_medium=organic) |
AI Mode clicks look identical to organic search in GA4 source/medium. Differentiate via landing page URL structure and srsltid query param (AI Overview indicator) |
| Microsoft Copilot / Bing Shopping | bing.com, copilot.microsoft.com | bingbot/2.0, BingPreview/1.0b |
Sometimes (utm_source=bing) |
Copilot consumer (copilot.microsoft.com) sends its own referrer; Bing Shopping integration sends bing.com. Track both separately. |
| Claude.ai Shopping | claude.ai | ClaudeBot/1.0, Claude-Web/1.0 |
No | Claude.ai web UI generates traffic; Claude API-powered apps generate traffic from the app's own domain. Only claude.ai itself is attributable to Anthropic. |
| You.com Shopping | you.com | YouBot/1.0 |
No | Lower volume than the top three. Still worth separating — You.com Shopping sends high-intent clicks from structured product cards. |
| Amazon Rufus | amazon.com (rare) | Amazonbot/0.1 |
No | Rufus primarily surfaces Amazon-listed products. Cross-sells to external Shopify stores are uncommon but increasing for brands with strong Amazon presence. |
| Shopify Global Catalog | shop.app, shopify.com | Shopify-internal (no public UA string) | Sometimes (utm_source=shopify) |
Shop.app and the Shopify buyer API use internal catalog data. Traffic shows as shop.app or shopify.com referral. CatalogScan score directly affects ranking here. |
google.com — the same domain as organic search. The only way to separate it is the srsltid query parameter that Google appends to AI Overview product links. In GA4, create a segment for sessions where page_location contains srsltid to isolate AI Overview-driven traffic.
Crawler traffic vs. customer referrals — the crucial distinction
This is the most common confusion in AI agent analytics. There are two completely separate signals:
- Crawler requests — GPTBot, PerplexityBot, and Google-Extended visit your product pages to index them for their respective shopping catalogs. These appear in your server logs (or Caddy access logs, or Cloudflare traffic data) with bot user-agent strings. They never fire GA4 events. They tell you: "AI agents are able to read my catalog."
- Customer referrals — A real shopper clicks a product link in a ChatGPT or Perplexity Shopping response and lands on your store. This person fires a GA4
session_startevent withchatgpt.comas the referrer. It tells you: "AI agents are sending me buyers."
You need both signals, but they answer different questions:
| Signal type | Where to read it | What it answers | How to act on it |
|---|---|---|---|
| Crawler visits | Server logs / Cloudflare Analytics | Are AI agents indexing my catalog? How frequently? | Fix crawl blockers (robots.txt, Cloudflare Bot Fight Mode, page speed). See Cloudflare AI crawler guide. |
| Customer referrals | GA4 Acquisition reports | Are indexed products converting to revenue? | Improve structured data quality for products in top-converting categories. Run a CatalogScan to find the specific signals blocking visibility. |
| Referral path | GA4 referral URL detail | Which product pages are being linked by AI agents? | Double down on catalog hygiene for those categories. Fix any issues on the top-referred pages first. |
| Session-to-purchase rate | GA4 Explore → Funnel | Do AI-referred shoppers convert better than average? | Use conversion rate premium to justify structured data investment. If AI traffic converts at 4% vs. 2% average, each AI referral is worth 2× a standard session. |
GA4 custom channel group for AI shopping agents
GA4's default channel groups treat every inbound referrer the same way. To break out AI shopping traffic, you need a custom channel group. Here's the complete setup, step by step.
Step 1: Create the custom channel group
In GA4: Admin → Data display → Channel groups → Create new channel group.
Name it "AI Shopping Agents" or similar. The order of channel rules matters — GA4 applies them top to bottom and assigns the first match. Put your AI rules before the generic Referral rule so chatgpt.com doesn't get absorbed into Referral.
Step 2: Define the channel rules
Add one channel per agent. Each channel rule uses Source as the condition:
Channel: ChatGPT Shopping
Condition: Source exactly matches "chatgpt.com"
Channel: Perplexity Shopping
Condition: Source exactly matches "perplexity.ai"
Channel: Claude.ai
Condition: Source exactly matches "claude.ai"
Channel: Bing Copilot
Condition: Source exactly matches "copilot.microsoft.com"
Channel: You.com Shopping
Condition: Source exactly matches "you.com"
Channel: Shopify Global Catalog
Condition: Source exactly matches "shop.app"
OR Source exactly matches "shopify.com" AND Medium exactly matches "referral"
Channel: Google AI Overview (srsltid)
Condition: Source exactly matches "google.com"
AND Page location contains "srsltid"
srsltid parameter is Google's AI Overview click identifier, appended automatically to product links in AI Overview shopping carousels.
Step 3: Roll the channel group back 90 days
GA4 custom channel groups apply retroactively once created. Navigate to Exploration → Blank exploration → set Date range to last 90 days → add "Session channel group" as a dimension and select your custom group. This immediately shows you how much AI traffic you've had for the past three months, even though the channel group didn't exist then.
Step 4: Add revenue and conversion events
The channel group alone shows sessions. To see revenue, add the purchase event metric and the ecommerce_purchase conversion event to your Exploration. Segment by your custom channel group to get per-channel revenue, AOV, and conversion rate in one view.
/* Looker Studio / GA4 custom report formula */
AI Shopping Revenue =
SUM(purchase revenue)
WHERE session_channel_group IN (
"ChatGPT Shopping",
"Perplexity Shopping",
"Claude.ai",
"Bing Copilot",
"You.com Shopping",
"Shopify Global Catalog",
"Google AI Overview (srsltid)"
)
AI Shopping Conversion Rate =
COUNT(DISTINCT sessions with purchase)
/ COUNT(DISTINCT all sessions)
WHERE session_channel_group IN (above list)
Shopify Analytics limitations for AI traffic
Shopify's built-in analytics (the "Marketing" and "Sessions" reports in the Shopify admin) do not support custom channel definitions. They show a flat list of referrers — chatgpt.com appears as a referral source alongside every other link on the internet. There's no way to tag it as an AI shopping source within Shopify Analytics.
For AI shopping attribution, Shopify Analytics is useful for exactly one thing: checking total orders by referrer source, which gives you a quick sanity check on whether GA4's AI channel numbers are in the right ballpark. Navigate to Analytics → Marketing → Sessions by referrer and filter by date range to see raw session and order counts from chatgpt.com and perplexity.ai.
| Capability | Shopify Analytics | GA4 (custom channel group) |
|---|---|---|
| See AI referrer sessions | Yes (flat list, no grouping) | Yes (grouped by agent) |
| See AI referrer revenue | Yes (per referrer) | Yes (per channel group) |
| Custom channel grouping | No | Yes (required setup) |
| Conversion rate by AI agent | No | Yes |
| AI Overview (srsltid) separation | No | Yes (page-location condition) |
| Session-level funnel analysis | No | Yes (Exploration) |
| Product-level AI referral data | No (referrer × product cross-tab unavailable) | Yes (item_list_name + session_source) |
| Retroactive application | N/A (flat referrer data always available) | Yes (up to data retention limit) |
Server log analysis: parsing AI referral patterns
Server logs (Caddy, Nginx, or Cloudflare Workers logs) are the only source for crawler activity data. They capture every request — including bot crawls that never fire a GA4 event. Here are the grep and awk commands for the most common log formats.
Caddy access log (NDJSON format)
Caddy writes access logs as newline-delimited JSON. Use jq to parse AI agent user-agents:
# Count GPTBot requests by day (Caddy NDJSON logs)
cat /var/log/caddy/access.log | \
jq -r 'select(.request.headers["User-Agent"] // "" | test("GPTBot|OAI-SearchBot")) | .ts | strftime("%Y-%m-%d")' | \
sort | uniq -c | sort -rn
# Extract URLs indexed by PerplexityBot
cat /var/log/caddy/access.log | \
jq -r 'select(.request.headers["User-Agent"] // "" | test("PerplexityBot")) | .request.uri' | \
sort | uniq -c | sort -rn | head -50
# Full AI crawler summary: agent, URL, response code, date
cat /var/log/caddy/access.log | \
jq -r 'select(.request.headers["User-Agent"] // "" | test("GPTBot|PerplexityBot|Google-Extended|ClaudeBot|bingbot|YouBot|Amazonbot")) |
[
(.request.headers["User-Agent"] | capture("(?P<bot>GPTBot|PerplexityBot|Google-Extended|ClaudeBot|bingbot|YouBot|Amazonbot)").bot // "unknown"),
.request.uri,
(.status | tostring),
(.ts | strftime("%Y-%m-%d"))
] | @tsv' | \
sort | uniq -c | sort -rn
Nginx combined log format
# Count AI crawler requests by user-agent (Nginx)
grep -E "GPTBot|PerplexityBot|Google-Extended|ClaudeBot|OAI-SearchBot|YouBot|Amazonbot" \
/var/log/nginx/access.log | \
awk '{print $12}' | sort | uniq -c | sort -rn
# List all product pages crawled by GPTBot in last 7 days
grep "GPTBot" /var/log/nginx/access.log | \
awk '{print $7}' | \
grep -E "^/products/" | \
sort | uniq -c | sort -rn | head -100
Cloudflare Workers / Analytics Engine
If you're using Cloudflare in front of your Shopify store, AI crawler traffic is visible in Cloudflare Analytics under Security → Bots → Known bots. Filter for "Verified bots" and look for GPTBot, PerplexityBot, and ClaudeBot in the breakdown. Cloudflare also logs the URLs accessed, which is useful for confirming which product pages are being indexed most frequently.
Building your AI agent revenue dashboard (5 KPIs)
Once your GA4 custom channel group is set up and your server logs are parsed, you have the raw data for a weekly AI agent revenue dashboard. These five KPIs are the minimum viable reporting surface for a Shopify merchant who wants to know whether AI shopping is working.
KPI 1: AI Shopping Revenue (weekly)
The total revenue attributed to sessions from your custom AI Shopping Agents channel group. This is your north-star number. It should trend up week-over-week as you improve structured data. A flat or declining line after a structured data fix means the fix didn't work or the channel is too small to show the effect yet — check KPI 3.
How to pull it: GA4 → Explore → Free-form → Metric: Purchase revenue → Dimension: Session channel group → Filter: channel group IN (your AI channels) → Date comparison: this week vs. last week.
KPI 2: AI Shopping Conversion Rate
Sessions from AI channels that result in a purchase, divided by total AI channel sessions. Baseline this against your overall site conversion rate. A premium of +0.5pp or more indicates AI-referred shoppers have higher purchase intent — this is the signal that justifies investing more in structured data quality over other channels.
A conversion rate below your site average on AI channels is unusual and worth investigating — it can indicate a product-query mismatch (the AI agent is sending shoppers to the wrong product) or a landing page issue on the pages AI agents link to most.
KPI 3: Indexed Products (weekly crawler count)
The total number of distinct product URLs crawled by AI bots in the past 7 days, summed across GPTBot, PerplexityBot, Google-Extended, and ClaudeBot. Pull this from your server logs using the grep commands above. This is your leading indicator — it moves before revenue does, because you have to be indexed before you can be referred. A rising indexed-products count with flat revenue usually means you're winning the crawl battle but losing on structured data quality or product-query match.
KPI 4: Top AI-Referred Product Pages
The product pages that receive the most sessions from AI channels, ranked by revenue (not just sessions). Pull this in GA4: Explore → Free-form → Dimension: Landing page + Session channel group → Metric: Sessions + Purchase revenue → Filter by AI channel group → Sort by revenue.
This table answers a critical question: are AI agents sending traffic to your highest-margin products, or to catalog outliers? Use it to prioritize structured data improvements. If a $15 product is getting 80% of your AI referral traffic while your $150 products get none, the problem is usually that the high-margin products have weaker GTINs, ratings, or descriptions — not that AI agents inherently prefer cheap products.
KPI 5: AI Shopping Revenue Share of Total Revenue
AI channel revenue divided by total revenue, expressed as a percentage. This is the business-level justification number. As the AI channel share crosses 5%, 10%, and 15%, it warrants proportionally more catalog hygiene investment. Adobe projects AI-referred retail traffic will represent 15–20% of total ecommerce referrals by end of 2026 for stores that have optimized their catalog. Stores that haven't will converge toward 1–2% because AI agents deprioritize low-signal products.
| KPI | Source | Update frequency | Action trigger |
|---|---|---|---|
| AI Shopping Revenue | GA4 custom channel group | Weekly | Week-over-week decline of >10% after a structured data change → revert or investigate |
| AI Shopping Conversion Rate | GA4 Explore funnel | Weekly | CVR below site average → investigate landing page mismatch; CVR >2× site average → increase AI traffic acquisition |
| Indexed Products | Server logs (bot UA grep) | Weekly | <50 crawls/week per 500 products → diagnose crawl blockers; plateau after catalog expansion → check page speed |
| Top AI-Referred Pages | GA4 Explore | Weekly | Top-referred pages don't match highest-margin products → prioritize structured data fixes for high-margin SKUs |
| AI Revenue Share | GA4 (AI revenue ÷ total revenue) | Monthly | <2% after 60 days of structured data work → audit for systemic blocking issues; >15% → invest in Pro-tier AI-specific catalog management |
Closing the loop: connecting attribution data back to structured data fixes
Attribution is only useful if it closes a feedback loop. The loop looks like this:
The payoff of this loop is a compound effect: each structured data fix raises your CatalogScan score, which raises your AI agent ranking, which raises your AI referral share, which gives you more data to prioritize the next fix. Stores that run this loop monthly outperform stores that make one batch of structured data changes and stop — because the AI shopping agents themselves are evolving, and the ranking factors shift over time.
Verification checklist
- GA4 custom channel group created with rules for chatgpt.com, perplexity.ai, claude.ai, copilot.microsoft.com, you.com, shop.app, and the srsltid Google AI Overview rule
- GA4 custom channel rules are ordered above the default Referral channel (GA4 applies first match)
- GA4 Exploration built showing revenue, sessions, and CVR by AI channel group over last 90 days
- Shopify Analytics referrer report checked for presence of AI referrers — any of chatgpt.com, perplexity.ai, shop.app in top-20 referrers confirms meaningful volume
- Server log grep commands configured for GPTBot, PerplexityBot, Google-Extended, ClaudeBot, and Amazonbot
- Weekly indexed-products count baseline established (last 4 weeks average from server logs)
- Top AI-referred product pages report built in GA4 Explore — product URL × AI channel group × revenue
- AI Revenue Share baseline established for monthly trend tracking
- Cloudflare bot settings verified: GPTBot, PerplexityBot, ClaudeBot allowed in Bot Fight Mode exceptions — see Cloudflare guide
- Structured data fix cycle scheduled: CatalogScan re-run monthly, server log crawl audit weekly, GA4 revenue dashboard weekly
Know your AI shopping score before reading the dashboard
The attribution data tells you how much AI traffic you're getting. CatalogScan tells you why — and what to fix to get more. Run a free scan, see your 18-signal breakdown, and start the feedback loop.
Run a free CatalogScan See the 100-store leaderboard