A skincare brand I talked to last month was convinced ChatGPT was driving zero traffic to their site. Their GA4 said so. "Referrals" showed the usual suspects: Google, Facebook, a couple of blogs.
Then we filtered their sessions by hostname and found 1,847 visits from chatgpt.com in the previous 30 days, buried under "Direct" because ChatGPT strips the referrer on most outbound clicks. That was 6% of their organic traffic, invisible.
This is a walkthrough for fixing that in the three tools most ecom and SaaS teams already use. By the end you'll have named segments, custom reports, and a way to correlate what shows up in analytics with your actual AI visibility.
The Hostnames You Need to Filter For
Before anything else, you need the list. AI referral traffic comes from a small set of domains, and most of them are stable enough to hardcode. Here's the working set as of late 2024:
| Source | Hostnames | Notes |
|---|---|---|
| ChatGPT | chatgpt.com, chat.openai.com | chat.openai.com is legacy, still active |
| Perplexity | perplexity.ai, www.perplexity.ai | Sometimes includes UTM tags |
| Google Gemini | gemini.google.com | Distinct from Google AI Overviews |
| Google AI Overviews | google.com/search with AI Overview flags | Not a distinct referrer; blended with organic |
| Claude | claude.ai | Rare traffic driver, but grows monthly |
| Microsoft Copilot | copilot.microsoft.com, bing.com/chat | Mixed with Bing organic |
| You.com | you.com | Small volume, still worth tagging |
oaicite URL parameters when it cites you. You can filter for those to isolate citation-driven traffic from other ChatGPT visits (like people pasting your link into a chat).
Save this list somewhere. You'll use it in every tool below.
GA4: The Setup That Actually Works
GA4 out of the box will put most AI referrals into "Direct" or "Referral (Other)." Here's the fix.
Step 1: Create a Custom Channel Group
Go to Admin → Data Settings → Channel Groups → Create new channel group. Call it "AI-Aware." Then add a channel above the default "Organic Search" called "AI Assistants" with this condition:
Source matches regex: chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|claude\.ai|copilot\.microsoft\.com
Save it. Now every report that uses channel grouping can be flipped to "AI-Aware" and you'll see AI traffic as its own line item instead of hiding in Direct.
Step 2: Fix the Referrer Loss Problem
Here's where a lot of teams get stuck. ChatGPT often drops the referrer header, meaning sessions arrive with no source at all. To catch those, you need UTM tagging on any link that AI is likely to serve — which sounds impossible, but works in one specific case: your own site's outbound canonical URLs.
If your product page URLs are what AI is citing (they usually are), you can't add UTMs to them retroactively. But you can set up a Google Tag Manager rule that fires a custom event whenever document.referrer contains any of your AI hostnames, and pushes a source=ai_assistant parameter into GA4 as a custom dimension.
The GTM trigger:
Trigger type: Page View
Fire on: document.referrer matches RegEx
Pattern: chatgpt\.com|perplexity\.ai|gemini\.google\.com|claude\.ai
Then a GA4 Event tag pushing ai_referrer as a custom event with the hostname as a parameter. Register that parameter as a custom dimension in GA4 Admin. Now you have a signal even when the source itself gets stripped.
Step 3: Build the Report
Explore → Free-form. Rows: Session source / medium. Values: Sessions, Engaged sessions, Conversions, Revenue. Add a filter: Source matches regex chatgpt|perplexity|gemini|claude|copilot. Save as "AI Referrals — 30d."
You now have a report you can send weekly. The first time you run it against 90 days of data, don't be surprised if AI is already 2-8% of your qualified traffic. The traffic was there the whole time. GA4 was just refusing to name it.
Mixpanel: Custom Properties Are Your Only Move
Mixpanel doesn't have channel groups. It has properties, and you can build reports on top of them. The setup is cleaner in some ways than GA4 because you're not fighting a taxonomy.
Step 1: Capture the Referrer as a Super Property
In your Mixpanel initialization code, capture the initial referrer and parse it:
const aiHosts = ['chatgpt.com', 'chat.openai.com', 'perplexity.ai',
'gemini.google.com', 'claude.ai', 'copilot.microsoft.com'];
const ref = document.referrer;
const aiSource = aiHosts.find(h => ref.includes(h)) || null;
mixpanel.register({ 'ai_referrer': aiSource, 'ai_referred': !!aiSource, 'referrer_full': ref });
Now every event a user fires carries ai_referrer (e.g., chatgpt.com) and a boolean ai_referred. These become super properties, meaning they attach to every subsequent event in the session without you having to think about it again.
Step 2: Identify the Funnel
Build a funnel: Landing → Product View → Add to Cart → Purchase. Break down by ai_referrer. A DTC coffee brand we work with ran this exact funnel and found that Perplexity-referred visitors converted at 4.2% while ChatGPT-referred visitors converted at 1.8%. Same brand, same site, wildly different intent.
Step 3: Cohort the AI Users
Create a cohort: "Users where ai_referred = true in last 90 days." Then compare their LTV, repeat purchase rate, and engagement against your baseline cohort. If AI-referred users are stickier or worse, you now know whether to double down or stop caring.
Shopify: Where It Gets Weird
Shopify's built-in analytics is the worst of the three for this job. It doesn't expose a referrer filter deep enough to isolate AI sources, and its "Sessions by referrer" report groups things unhelpfully. You have three practical paths.
Path 1: Rely on GA4 and skip Shopify analytics. If you already have GA4 wired up and Shopify's enhanced ecommerce configured, use GA4 as your source of truth. Shopify's dashboard becomes a rough orientation tool, not a decision-making one. This is what most teams end up doing. Path 2: Use the Shopify Analytics API + a custom dashboard. If you have a data team, pullorders.referring_site from the Admin API. It's per-order, populated when the initial cart session had a referrer. Filter it against your AI hostname list and build a Looker or Metabase view. This gets you order-level attribution: revenue directly from AI traffic, sliceable by product, collection, and campaign.
Here's the SQL shape once you land it in a warehouse:
SELECT
CASE
WHEN referring_site LIKE '%chatgpt.com%' THEN 'ChatGPT'
WHEN referring_site LIKE '%perplexity.ai%' THEN 'Perplexity'
WHEN referring_site LIKE '%gemini.google.com%' THEN 'Gemini'
ELSE 'Other'
END AS ai_source,
COUNT() AS orders,
SUM(total_price) AS revenue,
AVG(total_price) AS aov
FROM shopify_orders
WHERE created_at > CURRENT_DATE - 90
AND referring_site IS NOT NULL
GROUP BY 1;
Run that once and you'll know whether AI referrals are pulling their weight on revenue, not just sessions.
Path 3: Web Pixel Extension. Shopify's Web Pixel API lets you fire custom events. Build a small pixel that readsdocument.referrer, detects AI hostnames, and writes a customer.ai_source metafield. It's more work, but it lets you segment customers in Shopify's own audiences for things like flow triggers in Klaviyo. If someone came from ChatGPT and abandoned checkout, you probably want a different email than if they came from a Facebook ad.
The Correlation That Makes All of This Worth Doing
Here's the part nobody talks about. Once you have AI traffic isolated in your analytics, you can pair it against your visibility score and see whether one is actually driving the other.
Visibility score (how often AI recommends you) and referred traffic (how often people click through) are two different metrics. They should correlate. Often they don't. When they don't, that's the interesting signal.
Three scenarios, all real:
Scenario 1: Visibility up, traffic up. Your ChatGPT mention rate climbs from 12% to 34% over 90 days. GA4 shows chatgpt.com referrals rising in near lockstep. Great. Whatever you're doing content-wise is working end-to-end. Scenario 2: Visibility up, traffic flat. Mention rate climbs but referrals don't. This is the "recommendation without a link" problem: AI is naming your brand but not linking, or linking to a page that doesn't convert curiosity into a click. A B2B SaaS in the observability space had this exact pattern — Perplexity was recommending them in 40% of relevant queries but sending 60 visits a month. The fix was adding structured comparison content that AI cited with a URL, not just a brand name. Scenario 3: Traffic up, visibility flat. Referrals climbing but your tracked mention rate is stable. Usually means AI is recommending you for queries you're not measuring. This is a prompt-coverage problem, not a visibility problem. Expand what you monitor. The two numbers together tell the story. Neither one alone does.*What "Good" Looks Like
Rough benchmarks from what we see across ecom brands with intentional AEO efforts, running for at least 60 days:
| Metric | Weak | Average | Strong |
|---|---|---|---|
| AI referrals as % of total sessions | <1% | 2-4% | 5-10% |
| Conversion rate vs. organic search | 40-60% of organic | 70-90% of organic | 100%+ of organic |
| Perplexity vs. ChatGPT session ratio | 1:10 | 1:4 | 1:2 |
| Visibility-to-click ratio | <5 clicks per 100 mentions | 15-25 clicks per 100 mentions | 40+ clicks per 100 mentions |
One Thing to Automate Before You're Done
Set up a weekly Slack or email digest that dumps: AI referrals last 7 days, breakdown by source, conversion rate, revenue attributed. It takes 20 minutes with GA4's scheduled reports or a Zapier flow off Mixpanel. Do it before you forget.
The teams that treat AI referral tracking as a "we'll build a dashboard someday" project never build the dashboard. The teams that get a weekly number in Slack start noticing week-over-week changes and asking why. That's the point.
Where Foxish Fits
Foxish tracks the visibility side (how often AI recommends you across ChatGPT, Claude, Gemini, and Perplexity) and pairs it with the traffic side (what those recommendations actually drive in GA4). The Traffic Impact feature does the correlation we described above out of the box, so you don't have to run the visibility-vs-clicks analysis by hand every month. If you've got GA4 wired up and want to see whether your visibility gains are showing up as actual sessions, start a free scan →. First scan is free, no card needed.