LEO Is the New SEO: Tracking AI Traffic in Google Analytics

SEO Professionals Are Starting to Pay Attention to AI Traffic
More and more SEO professionals are beginning to take notice of traffic generated by AI.
In fact, traffic coming from various models, systems, applications, and increasingly from AI agents is growing steadily.
It’s now reaching a point where it can’t be ignored. There’s a growing consensus that websites should be optimized not just for human users and traditional search engines, but also for AI. A new term has even been coined for it: LEO (LLM Engine Optimization).
In my next blog post, I’ll walk you through how to optimize your site for AI crawlers. But in this one, I’ll show you how to configure Google Analytics to track traffic coming from AI sources like ChatGPT, Perplexity, Anthropic, Gemini, and others.
Custom Setup for GA4 Explore
- In GA4, go to the left-hand menu and click “Explore.”
- Under the “Explorations” section, click “Blank.”
-
In the left-side submenu, click “Dimensions.”
-
Select “Session source/medium” and click “Confirm.”
-
Now click on “Segments.”
-
In the new window, click “Create a new segment.”
-
Choose “Session segment.”
-
Name it “AI Sources” and add a condition for “Session source.”
-
Click “Add filter.”
-
Choose “matches regex”
and paste in the following value:
.*chatgpt.com.*|.*perplexity.*|.*edgepilot.*|.*edgeservices.*|.*copilot.microsoft.com.*|.*openai.com.*|.*gemini.google.com.*|.*nimble.ai.*|.*iask.ai.*|.*claude.ai.*|.*aitastic.app.*|.*bnngpt.com.*|.*writesonic.com.*|.*copy.ai.*|.*chat-gpt.org.*
- Click “Save Property.”
When done, the “Variables” panel should look like this:
-
Now in the “Settings” submenu, click “Segment comparisons”
and choose “AI Sources.”
-
Change the granularity to “Week.”
-
Under “Breakdowns,” select “Session source/medium.”
You should now see a report showing traffic from AI-based sources.
Ongoing AI Traffic Monitoring – Traffic Acquisition Report
If you want continuous reporting, you’ll need to create a new Channel Group:
-
Click on “Admin.”
-
Select “Channel groups.”
-
Click “Create new channel group.”
-
Name it “Channel Group with AI.”
-
Click “Add new channel.”
-
Name it “AI,” click “Add new condition,” choose “matches regex,”
and paste in the same value as above:
.*chatgpt.com.*|.*perplexity.*|.*edgepilot.*|.*edgeservices.*|.*copilot.microsoft.com.*|.*openai.com.*|.*gemini.google.com.*|.*nimble.ai.*|.*iask.ai.*|.*claude.ai.*|.*aitastic.app.*|.*bnngpt.com.*|.*writesonic.com.*|.*copy.ai.*|.*chat-gpt.org.*
-
Click “Reorder” and move “AI” to the 9th position.
-
Go to Reports > Acquisition > Traffic Acquisition.
-
From the dropdown, select your newly created “Channel Group with AI.”
-
You should now see “AI” as a traffic source in the list.
From here on, you’ll be able to track AI-generated traffic directly in your reports.