New

50% off Shop Products & 50% off 1st Month of Retainer Packages. Terms apply*. Contact us to apply your discount.

How to Track AI Traffic in Google Analytics 4

🎁 Limited time offer

Win a Free Backlink Bundle from Kahunam

⏰ Event ends October 31st, 2025

Subscribe to our newsletter and get a chance to win a valuable backlink bundle to boost your website's SEO. One lucky subscriber will be selected!

*Terms and conditions apply.

🏆 Enter to Win

Subscribe to the Newsletter

Secure signup
No spam
Home » Articles » Web Analytics » How to Track AI Traffic in Google Analytics 4

AI tools like ChatGPT, Perplexity, Claude, and Google Gemini are sending more traffic to websites. Most businesses can’t see this traffic properly in Google Analytics because AI platforms don’t always pass referrer information, so traffic appears as “Direct”.

This guide shows you how to track AI traffic in GA4 so you know where your visitors really come from.

How to Track AI Traffic

Method 1: Quick Check in Reports

Use this to see if you have AI traffic right now.

Steps:

  1. Go to Reports > Acquisition > Traffic acquisition
  2. Change the dropdown from “Session default channel group” to “Session source”
  3. Look for these sources:
    • chatgpt.com
    • perplexity.ai
    • claude.ai
    • gemini.google.com
    • copilot.microsoft.com

If you see these, you have AI traffic. Move to Method 2 or 3 for proper tracking.

Method 2: Create a Saved Report

Create a report that shows only AI traffic.

Steps:

  1. Go to Reports > Library
  2. Find “Traffic acquisition” report, click the three dots (⋮)
  3. Select “Make a copy” and name it “AI Traffic”
  4. Click “Add filter”
  5. Set dimension to “Session source”, match type to “matches regex”
  6. Paste this pattern:
^(chatgpt\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|openai\.com)$
  1. Click “Apply” and “Save”
  2. Go to Library > “Edit collection” > drag your report into the menu > “Publish”

Now you have a one-click AI traffic report in your navigation.

Method 3: Create AI Channel Group

This is the best method. It automatically categorizes AI traffic as its own channel. It applies retroactively to all your historical data.

Steps:

  1. Go to Admin > Data display > Channel groups
  2. Click three dots (⋮) next to “Default channel grouping”
  3. Select “Copy to create new”
  4. Click “Add new channel” like “Traffics from AI”
  5. Set dimension to “Source”, match type to “matches regex”
  6. Paste this pattern:
^(chatgpt\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|openai\.com)$
AI tracking in GA4
  1. Click “Save channel”
  2. Important: Click “Reorder” and drag “AI Traffic” above “Referral”
  3. Click “Save group”

Why reorder matters: GA4 assigns traffic to the first matching channel in the list. If Referral is first, AI traffic gets labeled as generic referral.

reorder channel in GA4

How to use it:

Go to any acquisition report, change the channel grouping dropdown to your new “Channels + AI” group. AI Traffic now appears as its own channel.

Understanding the Regex Pattern

The pattern tells GA4 which domains are AI platforms. It looks complex but it’s simple:

  • ^ = start of domain
  • $ = end of domain
  • | = OR (matches any of these)
  • \. = literal dot in the domain

Current AI platforms in the pattern:

  • ChatGPT: chatgpt.com, openai.com
  • Perplexity: perplexity.ai
  • Claude: claude.ai
  • Gemini: gemini.google.com
  • Copilot: copilot.microsoft.com

To add a new platform:

Add |newplatform\.com before the $ symbol.

Example: ^(chatgpt\.com|perplexity\.ai|deepseek\.com)$

Which Method to Use?

Method 1: Just checking if you have AI traffic
Method 2: You want a dedicated AI report
Method 3: You want permanent, automatic tracking (recommended)

Use Method 3 if you’re serious about tracking AI traffic. It’s the most complete solution.

Frequently Asked Questions

Why don’t I see any AI traffic?

Most AI traffic appears as “Direct” because AI platforms don’t pass referrer data. You’re only seeing the minimum. Your actual AI traffic is higher.

Can I see what question people asked the AI?

No. AI platforms don’t pass the user’s query, unlike search engines. You only see which page they landed on.

How much AI traffic is normal?

Average websites see about 0.17% of traffic from AI, but this is growing fast. Tech sites see more. ChatGPT accounts for about 78% of AI referrals, Perplexity 15%, Gemini 6.4%.

Is this real people or bots?

Check engagement metrics. Real users show normal session duration and behavior. Bots have very short sessions. AI referral visitors typically spend 6-10 minutes per session.

Do I need to update this regularly?

Yes. Check monthly for new AI platforms. Add them to your regex pattern when they start sending traffic.

Will this slow down my website?

No. These methods only organize data GA4 already collects. No new tracking code is added.

Conclusion

AI traffic is growing fast but most of it hides in your “Direct” traffic.

Use Method 3 (Channel Group) for automatic, permanent tracking. Update your regex pattern when new AI platforms launch. Check your reports monthly to see growth trends.

The AI traffic you track is only the minimum, the actual number is higher because of missing referrer data.

Why your website is not working?

We will assist you by sending helpful material once a month. Join the newsletter to receive what you need for your website.

Just posted

Become an expert website owner

Join our community of website professionals and learn how to achieve website success through our helpful newsletter.

Book a Discovery Call