1. Create a Segment for AI Referrals
Go to Explore โ Blank in GA4.
On the left panel, under Segments, click + Add segment โ Session segment.
Choose Condition โ set:
Dimension =
Session source / mediumMatch type = matches regex
Value =
.*(openai\.com|chatgpt\.com|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|perplexity\.ai).*
Save as AI referrals or a title of your choice.
๐ This regex ensures traffic from ChatGPT (chat.openai.com), Claude, Gemini, Perplexity, and more is included.
2. Add Dimensions
Click the โ+โ next to Dimensions in the Variables panel and import:
Session sourceLanding page + query string(Optional) If youโve added custom tagging in GTM:
ai_sourceandai_model
Drag into your tab settings:
Rows โ
Landing page + query stringColumns โ
Session source
This setup will show you which pages were visited, split out by AI platform.
4. Add Metrics
Click the โ+โ next to Metrics and import:
SessionsEngaged sessionsConversions(or your key goal event)
Drag into the Values section.
Example: Values = Sessions โ youโll immediately see which AI platform drives the most traffic.
5. View the Report
Once you add at least one dimension and one metric, your table will populate.
Example layout:
Rows: Landing page + query string
Columns: Session source
Values: Sessions, Engaged sessions, Conversions
You now have a breakdown of:
Which AI platform (ChatGPT, Claude, Gemini, etc.) sent traffic
Which pages they landed on
What those users did next
โ Thatโs it! You now have an always-on GA4 report that tracks AI traffic, and with optional tagging, you can even break it down by specific model.