AI is adding to the ways people find and interact with online content. Tools such as ChatGPT, Perplexity, and Gemini are now referring small amounts of traffic to websites, whilst traditional search engines still send the lion’s share. For marketers, this presents a new challenge.
How do you measure the visibility and performance of your brand across ChatGPT and other AI-powered platforms?
One way to do this is to track referral traffic – this helps you understand how AI tools contribute to discovery and engagement. In this guide, we’ll explain how to set up tracking in Google Analytics 4 (GA4) so you can measure traffic from ChatGPT, Gemini, Perplexity and other LLMs alongside your other channels.
Why Should You Track AI Referrals?
AI referrals are an emerging form of organic traffic. While users may not search in the traditional sense, they are discovering brands through AI summaries, chat responses, and citations.
Understanding this traffic can help you:
- Measure how often AI platforms are recommending your content
- Identify which pages or topics attract AI visibility
- Compare AI referrals with organic and direct traffic
- Inform future SEO and content strategy decisions
As Large Language Models (LLMs) like ChatGPT and Gemini evolve, being able to measure their impact will be vital for marketers seeking to future-proof their analytics.
How To Track AI Referrals in 15 Minutes
There are three things we’ll show you how to set up here:
- A custom report, which you can access at any time from the left-hand menu, showing AI referrals.
- A new channel group, so AI referrals appear in your standard GA4 acquisition reports.
- A custom audience, allowing you to compare AI traffic directly against other sources such as organic search.
This process takes around 15 minutes to complete. Once set up, it will automatically update with new data. This simple one-off task will provide long-term insight into how AI tools influence your site’s performance.
Step 1: Create a Custom Report in GA4
A custom report lets you isolate and monitor traffic from AI tools in one place. Here’s how to create it:
1. In GA4, go to Reports → Library → Create new report → Create detail report.
2. Create a Blank report.
3. Add your preferred dimensions. We recommend: Session source/medium and Landing Page + Query String. You could add others like Session Source, Session medium, Page referrer.
4. Add your preferred metrics. We recommend: Sessions, Engaged sessions, Engagement rate, Bounce rate, Average session duration, Views, Views per session, Key events, Session key event rate.
5. Click “Add Filter” and apply a filter to capture traffic from AI sources that matches this partial regex. This expression ensures GA4 picks up referrals from major AI assistants. You can add others as they emerge.
bard|chatgpt|openai|claude|copilot|gemini|perplexity|grok
6. Your report is now taking shape! Along the row at the top of your report, click the + button. Add Landing Page + Query String.
7. Click “Save” and name the report AI referral traffic.
8. Now click “back” and go to Collections > Create new collection > Blank.
9. In the left hand bar create a new topic called “AI referrals”. In the right hand bar search for your new AI referral traffic report and drag and drop it on to the “drop detail report” area. Name the collection where it says “Untitled collection” as “LLM referrals” and click save. Then click “Back” to go back to the library.
10. You will now see your unpublished collection. Click Publish on this collection.
11. You will now see it appear in your sidebar. This report will now automatically update, showing you which AI tools are driving users to your site, and which landing pages they’re sending them to.
Step 2: Add an “AI” Channel to Your Default Channel Group
If you want to understand how traffic from AI tools compares to other marketing channels – whether to assess if it’s affecting your organic search performance or to measure the impact of your optimisation work for LLM visibility – it’s worth creating a dedicated channel for AI referrals.
In Google Analytics 4, most users rely on the default channel group without realising it can be customised. By creating your own channel group, you can segment AI-driven traffic separately and analyse it alongside your existing sources.
This customised channel will allow AI referrals to appear in your regular traffic breakdowns – alongside Organic Search, Paid Search, and Direct. Here’s how to create your channel group:
1. Go to Admin → Channel Groups.
2. Copy the Default Channel Group and rename it (for example, Revised Channel Group – AI Added). Then click “Add new channel”.
3. Add a channel name then in the Channel conditions add the same regex rule as before: Source > partially matches regex:
bard|chatgpt|openai|claude|copilot|gemini|perplexity|grok
4. Save your channel and set it as the Primary Channel Group.
After 24–48 hours, you’ll start seeing AI traffic reported as a distinct channel in your acquisition reports. This makes it easy to compare AI-driven visits against your other marketing sources.
Step 3: Build a Custom Audience for AI Users
The latest version of Google Analytics 4 has made it easier to create custom audiences – groups of users that you can filter and analyse across your reports whenever needed. By default, GA4 includes audiences such as “Mobile Users” but you can also build your own.
In this case, we’ll create one called “LLM Users” to isolate and review all traffic coming from AI tools. You can use this for comparisons or to inform remarketing efforts. Here’s how to create it:
1. Navigate to Admin → Audiences → New audience → Create a custom audience.
2. Name it clearly, such as “LLM referrals”. Then set a condition using Session source and choose a full regex match with the pattern below:
“.*bard.*|.*chatgpt.*|.*openai.*|.*claude.*|.*copilot.*|.*gemini.*|.*perplexity.*”
3. Save the audience. It can take up to 24 hours for GA4 to start populating data.
4. Once a few days have passed, you can now use this to compare GA4 audiences by using the Comparisons feature in standard reports. Go to any report, click Add comparison > Create New, and set the condition to “Audience name”, “exactly matches” with the specific LLMs audience name as the value. Then Save.
5. Then go to Add comparison and select for example “Organic Traffic” and “LLM referrals” then click “Apply”.
6. This will let you just compare Organic Traffic with LLM referrals.
Step 4: Optional – Automate Monitoring With Looker Studio
For easier ongoing analysis, connect your GA4 property to Looker Studio and visualise AI traffic over time. Create a dedicated dashboard showing:
- Sessions and conversions by AI source
- Landing pages with the most AI referrals
- Comparison with organic and paid channels
You can then share this dashboard with your wider team, helping everyone stay informed on how AI traffic is growing.
Interpreting Your Results
As data builds up, you may start noticing trends:
- ChatGPT often drives traffic via embedded citations from shared chats or GPTs.
- Perplexity can generate measurable click-throughs from answer summaries.
- Gemini and Copilot may appear as referral traffic depending on how users open suggested links.
Not all AI referrals will be consistent yet – these platforms are still evolving. However, monitoring them early ensures you’re ready as referral patterns become more stable.
Why Do I See chatgpt.com / (Not Set) in My Referrals?
In some cases you may see chatgpt.com / (not set) as the referral. The (not set) value in GA4 means Analytics couldn’t determine a valid referral source.
With AI tools, this can happen because some clicks don’t pass referrer information at all – for instance, when ChatGPT opens links in a new browser tab or through an in-app browser that blocks referrer headers for privacy. If it’s opened from the mobile app or within a plugin or GPT integration, referrer data can also be stripped.
Conclusion
AI-driven search and recommendation tools are shaping the next wave of digital discovery. Setting up this GA4 tracking framework allows you to capture that data now, compare it with your existing channels, and make data-led decisions about your content strategy.
By combining a custom report, custom channel group, and AI audience, you’ll gain a clear picture of how LLMs like ChatGPT and Gemini influence your traffic. Over time, this insight will become increasingly valuable as AI tools evolve into a standard part of the online search experience.
If you need help tracking your performance and gaining more visibility in both AI tools and search results, get in touch.
Hi! I’m Ben, CEO of The SEO Works
Thanks for taking the time to access this resource. We hope you found it helpful. If you’re ready to take the next step in your digital growth, explore our services page or book a free website review. We’re here to help!
Get Your FREE Website Review