How to track ChatGPT and Perplexity traffic in GA4 and Shopify

GA4's new AI Assistant channel misses Perplexity. A tested regex for a custom channel group, Shopify's Agentic reports, and what no analytics tool can see.

In short

In GA4, build a custom channel group with an "AI assistants" channel that matches the referring domains of ChatGPT, Perplexity, Gemini and Copilot, and place it above Referral. GA4's own AI Assistant channel, added in May 2026, misses Perplexity. In Shopify, read the Agentic page under Sales channels for sales per AI channel, and the referrer reports for the rest. Neither tool sees Google AI Mode clicks or visitors who arrive without a referrer, so add a post-purchase survey.

You open GA4, look for ChatGPT, and find it sitting in Referral between a coupon site and someone's Notion page. Perplexity is in there too, somewhere. Google AI Mode is not anywhere, because GA4 counts it as Google.

None of this is broken. AI traffic arrives with a referrer, without one, or as Google. This article sets up both tools so the first kind is counted properly, and is honest about the other two.

Where AI traffic lands by default

Where the visitor came fromGA4 default channelShopify
ChatGPT, Gemini, Copilot (web, with referrer)AI AssistantAgentic page, referrer reports
Perplexity (web, with referrer)ReferralReferrer reports only
Google AI Mode and AI OverviewsOrganic SearchOrganic search (Google), plus Agentic page for Google AI Mode and Gemini
Any AI app that drops the referrerDirectDirect
Purchase through native checkout in Google AI Mode or GeminiNot recordedOrders and Agentic page

How do I see ChatGPT and Perplexity traffic in Google Analytics 4?

Create a custom channel group in GA4 with one channel, "AI assistants", whose condition is Source matches a regex listing the AI referrers, and move it above Referral. Then switch the Traffic acquisition report to that channel group. It applies to past data too.

What GA4 does on its own now

In May 2026, Google added an AI Assistant channel to the default channel group. Google's definition covers visitors "from sources like ChatGPT, Gemini, Deepseek, Copilot, or Grok" and explicitly excludes AI Overviews and AI Mode. When a referrer matches Google's list, GA4 sets the medium to "ai-assistant".

That list is not published, and it has a gap. In July, Search Engine Journal reported that Perplexity was still not on it and kept landing in Referral, and that the native channel only counts forward from its rollout date. So the built-in channel is a good start and an incomplete answer.

Step by step: a custom channel group for AI traffic

You need Editor access or above on the GA4 property. Standard properties allow two custom channel groups with up to 50 channels each.

  1. Open Admin. Under Data display, click Channel groups.
  2. Click Create new channel group. GA4 copies the default group, so every existing channel stays as it is. Name it something plain, like "Channels with AI".
  3. Add a channel. Name it "AI assistants". Add a condition: Source, matches regex, and paste the pattern below.
  4. Save the channel, then click Reorder. Drag "AI assistants" above Referral. GA4 puts each session in the first channel whose rules it matches, so a channel below Referral would never receive Perplexity. Keep it below the paid channels, so ChatGPT ad clicks tagged with a paid medium stay paid. ChatGPT ads for Shopify covers the tagging.
  5. Click Apply, then Save group.
  6. Open Reports, Acquisition, Traffic acquisition. Change the primary dimension from the default channel group to your new group. Custom groups apply to past data in standard reports.
  7. Leave the primary channel group alone for now. You can make your group the primary one, but Google says data then populates with the new rules "from that point forward". Do it once the regex has run for a few weeks and you trust it.

The regex, explained

(.*\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.ai|deepseek\.com|grok\.com)

GA4 regex is a full match by default: the pattern has to describe the entire source value, not a piece of it. That is why there are no ^ and $ anchors, and why it does not end in .*.

PartWhat it does
(.*\.)?Allows an optional subdomain, so www.perplexity.ai and chat.deepseek.com match
( ... \| ... )A list of alternatives. The source has to be exactly one of them
\.A literal dot. A bare dot means "any character" in regex
chatgpt\.comChatGPT referrals, and also links carrying utm_source=chatgpt.com
perplexity\.aiPerplexity, the one GA4's native channel misses

The utm_source part matters more than it looks. OpenAI says ChatGPT adds utm_source=chatgpt.com to its referral links. So whether GA4 takes the source from the referrer or from the tag, a ChatGPT click shows up as chatgpt.com, and the regex catches it.

We tested the pattern as a full match against 20 source values. All nine AI sources matched, including www.perplexity.ai and chat.openai.com. None of the 11 others did, including google, mail.google.com, (direct), notchatgpt.com and chatgpt.com.evil.net.

Google's own example is broader than it should be

Google's help page offers its own AI assistants regex, built from fragments like .*gpt.*, .*gemini.* and ^.*ai. In the same test it missed DeepSeek and Grok, and matched gemini-jewelry.com, mygptshop.com, shopify.ai and the word "thai". A Thai cooking blog linking to you is lovely. It is not an AI assistant.

Review the list every quarter, as new assistants appear.

What GA4 cannot see

Three kinds of AI-influenced visits never reach the AI assistants channel, however good the regex is.

How to see AI traffic in Shopify analytics

Shopify sees what GA4 cannot: orders placed through agentic channels, including native checkout, sorted by AI channel.

The Agentic reports

In the Shopify admin, go to Sales channels, Agentic. The analytics section shows, per AI channel, sales, orders, online store sessions and online store conversion, for the last 30 days by default. Click a channel name for its own report. The channels listed are ChatGPT, Microsoft Copilot, Google AI Mode and Gemini, Meta surfaces, the Shop app, and "Other channels".

Sales combine referral sales with sales through direct checkout. Perplexity is not a named channel, so its traffic has to come from the referrer reports. The Agentic analytics are not yet available for headless stores.

Referrer reports and a ShopifyQL exploration

The quick view is Analytics, Reports, Sessions by referrer. For something you can save and reuse, go to Analytics, Reports, click New exploration and paste a query into the ShopifyQL editor:

FROM sessions
  SHOW sessions, sessions_that_completed_checkout, conversion_rate
  WHERE referrer_domain IN ('chatgpt.com', 'perplexity.ai', 'www.perplexity.ai', 'gemini.google.com', 'copilot.microsoft.com')
    AND human_or_bot_session = 'human'
  GROUP BY referrer_domain
  SINCE -90d UNTIL today
  ORDER BY sessions DESC

The bot filter is worth keeping. Shopify added it in October 2025 to separate real shoppers from automated traffic, which matters more than usual in a report whose whole subject is software. For Shopify's own AI classification, group by agentic_referring_channel instead of referrer_domain. The sessions schema lists its values as ChatGPT, Google AI Mode and Gemini, Microsoft Copilot, and Shop.

Which attribution model Shopify uses

Shopify's marketing reports default to last non-direct click, and you can switch to first click, last click, any click or linear. For AI traffic, the difference is real. A shopper who finds you in ChatGPT and comes back through a Google search a week later is credited to Google under last click. Under first click, ChatGPT gets the order. Shopify resets the first interaction if a visitor buys nothing within 30 days.

How do I measure GEO ROI and attribute revenue to AI search?

Add up three things for the same period: revenue from AI referrals in GA4 or Shopify, AI-channel sales from Shopify's Agentic page that GA4 cannot see, and orders where the customer says an AI assistant sent them. Compare the total with what the work cost. Then report it as a floor, because every part of it undercounts.

In practice, that means four numbers each month:

NumberWhere it comes fromWhat it misses
AI-referred sessions and revenueGA4 custom channel group, or the Shopify explorationGoogle AI Mode, visits without a referrer
AI-channel sales and ordersShopify Agentic pagePerplexity, visits outside Shopify's channel list
AI as an earlier touchGA4 Key event attribution paths, Shopify first clickAnything not tracked at all
Self-reported AI discoveryA post-purchase surveyCustomers who skip it

The survey is the part most stores leave out and the one that closes the biggest gap. Add "How did you hear about us?" to the thank-you page with an app from the Shopify App Store, and give ChatGPT, Perplexity, Gemini and Google AI Mode their own answer options next to Google search, Instagram and a friend. It is the only measurement in this list that can see a visit with no referrer.

GA4's paths report defaults to the primary channel group, so until your AI group is primary, switch its dropdown to Source to find chatgpt.com and perplexity.ai.

What this looks like for a real store

When we worked with Pipa Skin Care, ChatGPT sessions in Shopify rose from about 157 to 304 over 90 days, and the first orders through agentic storefronts came in. Those are the numbers Shopify could see. They cannot count a parent who heard of Pipa in ChatGPT and searched for it on Google later, which is why the visibility figures belong in the same report.

Expect small absolute numbers at first. A flooring retailer we worked with roughly doubled its agentic sessions, from 19 to 40 a month, and now appears consistently for the top 25 prompts about its products. The session counts are still small. Judged on traffic alone, that looks like a minor win. Judged with visibility next to it, it is a store that now shows up in every answer it should.

That is the honest shape of GEO ROI in 2026: a measured floor in revenue, plus a visibility trend that shows where the next quarter's revenue is likely to come from. How to measure AI visibility and share of voice covers the visibility half and the monthly report both halves go into.

The setup in order

StepWhereTime
Custom channel group with the AI regex, above ReferralGA4 Admin, Channel groups15 minutes
Traffic acquisition report switched to the new groupGA4 ReportsMinutes
Agentic page checked, date range setShopify, Sales channels, AgenticMinutes
Saved exploration for AI referrers, bots excludedShopify Analytics, Reports15 minutes
Post-purchase survey with AI answer optionsThank-you page appUnder an hour
Monthly: the four numbers, side by sideYour reportAn hour

The first five take an afternoon. After that, the work is reading the numbers in the same way every month, which is less exciting than the setup and considerably more useful.

AAnna Kapp

Article by

Anna Kapp
GEO Research & Customer Success

Anna Kapp looks after Alethia's customers and leads the team's GEO research, helping Shopify brands understand and improve how ChatGPT, Perplexity, Gemini and Google AI Mode recommend them. She also drives Alethia's own GEO and helps shape a better product with every insight she brings back. She loves turning complex topics into simple, clear explanations and connecting small details to the bigger picture. Outside work, you'll find her surfing, planning her next trip or hunting for the best black coffee in whatever city she's in.

No commitment

See how AI is selling your products.

Get your free Alethia AI report and see where your brand stands across the AI platforms your customers are already using.