Track LLM Traffic in Google Analytics 4 (GA4)

Author's Image
DylenUpdated: Mar 18, 2025
Post Cover

As AI search engines are becoming more used every day it became crucial to understand how much traffic they're driving to your website. Here's a step-by-step guide to tracking organic traffic from AI sources like ChatGPT, Claude, Perplexity, and Gemini in Google Analytics 4.

Setting Up LLM Traffic Tracking

  1. Log into your Google Analytics 4 account
  2. Navigate to Reports > Acquisition > Traffic acquisition
  3. Click the Add filter button (+ icon)

Setting up LLM traffic filter in Google Analytics 4

  1. Select Session source / medium as your dimension
  2. Choose "Matches regex" as the operator
  3. Paste the following regex pattern:
^*\.openai.*|.*copilot.*|.*chatgpt.*|.*gemini.*|.*gpt.*|.*neeva.*|.*writesonic.*|.*nimble.*|.*perplexity.*|.*google.*bard.*|.*bard.*google.*|.*bard.*|.*edgeservices.*|.*bnngpt.*|.*gemini.*google.*$

Applying regex filter to track LLM traffic in Google Analytics 4

This regex pattern will capture traffic from popular AI sources including:

  • ChatGPT and OpenAI
  • Google Gemini
  • Perplexity AI
  • Microsoft Copilot
  • Google Bard (legacy)
  • Claude (via edgeservices)
  • Other AI assistants

Checking results 4

Understanding Your AI Traffic Data

Once you've applied the filter, you'll see a breakdown of sessions originating from AI sources. This data can help you:

  • Measure the effectiveness of your GEO strategies
  • Understand which AI platforms drive the most traffic
  • Track changes in AI-driven traffic over time
  • Compare AI traffic with traditional search engine traffic

Pro Tips

  1. Create a Custom Report: Save this view as a custom report for easy access
  2. Segment Analysis: Compare AI traffic behavior with traditional organic traffic
  3. Monitor Trends: Watch for emerging AI sources and update your regex as needed

Tracking AI traffic in Google Analytics 4 is a crucial step in understanding the impact of your GEO efforts. By implementing proper tracking, you can make informed decisions about your content strategy and ensure you're effectively reaching audiences through both traditional search and AI platforms.

Grow now!

Smart SEO,
Faster Growth!

Get 7 free articles
Set up in minutes
Cancel anytime
AI-powered optimization

Most Read Articles