How to Track LLM (AI) Referral Traffic in Google Analytics

Growth
Justin Arnold
Head of Content

Written on
March 13, 2025

AI-powered search is changing how people find and interact with websites.

Millions of users now rely on ChatGPT, Perplexity, Gemini, and other LLMs to search for information, compare products, and make purchasing decisions – bypassing traditional search engines such as Google.

We’re seeing anywhere from 0.5% to 3% of a company’s total website traffic now come from LLMs. And the chances are that it will grow.

Businesses need to track visibility, traffic, and conversions coming from these sources.

Here’s how to create a simple GA4 referral report that shows the Session and Key Event counts from LLMs, such as ChatGPT, Perplexity, Gemini, Copilot, and more:

Step 1: Access GA4 & Create a Custom Exploration Report

d49d62fc 1e9f 48d7 9aa2 8d527d864706 How to Track LLM AI Referral Traffic in Google Analytics
  1. Log in to Google Analytics (GA4).
  2. Click “Explore” in the left-hand menu.
9ea9ef44 cca9 4a90 a71a 92b5dde66f8d How to Track LLM AI Referral Traffic in Google Analytics
  1. Click “Blank” to start a new exploration.
9db40d1a 38b8 446b ad12 f8d30db04b2d How to Track LLM AI Referral Traffic in Google Analytics

Step 2: Configure Your Report

1. Rename the Report

  • Click on “Untitled Exploration”.
  • Rename it to something like “LLM Referral Traffic & Key Events”.
07d5decb 0732 46eb bea2 e0ff64f29a76 How to Track LLM AI Referral Traffic in Google Analytics

2. Add Key Dimensions

Tracking referral traffic requires two key dimensions:

  • Session Source/Medium → Identifies where the traffic originated.
  • Page Referrer → Shows the exact URL that sent the user.

To add them:

  1. Click the “+” sign in the Dimensions section.
9754a92a b7b3 4490 9ac6 39abe43ab9e6 How to Track LLM AI Referral Traffic in Google Analytics
  1. Search for Session Source/Medium and Page Referrer, (these will help filter referral traffic).
d45fef55 f4cb 48c7 8dfa aa240962192f How to Track LLM AI Referral Traffic in Google Analytics
411a7163 718a 499c 969e 3d47e579d87c How to Track LLM AI Referral Traffic in Google Analytics
  1. Click “Import” to add them.
32c57ea4 7da9 41b7 bba7 4c491fb471c0 How to Track LLM AI Referral Traffic in Google Analytics

3. Add Key Metrics

These metrics help track AI-driven traffic performance:

  • Sessions → Total visits from LLMs.
  • Key Events → Specific conversions or actions taken by visitors.

To add them:

  1. Click the “+” sign in the Metrics section.
5e8eb294 e79d 4295 a231 4ac198749390 How to Track LLM AI Referral Traffic in Google Analytics
  1. Search for and select:
  • Sessions
  • Key Events
  • (Optional: Other relevant metrics, such as Engagement Time or Conversions)
46f21530 9394 49ca bfa4 8d6c9cebbf93 How to Track LLM AI Referral Traffic in Google Analytics
  1. Click “Import” to add them.
cfe7cdfb 538b 4542 8a00 1a9aa6246119 How to Track LLM AI Referral Traffic in Google Analytics

Step 3: Filter for LLM Referral Traffic

⚠ Important: If you don’t set a segment, no data will appear.

Set the segment to “All Users” for this report:

a791d262 5201 4563 8280 c5bc5cdf5e10 How to Track LLM AI Referral Traffic in Google Analytics

Apply the Referral Filter

  1. Drag Page Referrer into the Filters section.
3ddb1e57 34c8 49d9 b7ac 2474c2bd3bb7 How to Track LLM AI Referral Traffic in Google Analytics
  1. Add a “Matches Regex” filter with the following regex:
^.*(ai|\.openai|copilot|chatgpt|gemini|gpt|neeva|writesonic|nimble|outrider|perplexity|bard|edgeservices|astastic|copy\.ai|bnngpt).*$
2800151c 98aa 42e9 852e a63e22541229 How to Track LLM AI Referral Traffic in Google Analytics

This filter ensures only LLM referral sources are included.

📌 Tip: If you want to exclude certain sources, use the “Source/Medium Contains” filter.

ea732cf2 8675 4b84 b3db 1c94ebcc8435 How to Track LLM AI Referral Traffic in Google Analytics

And that’s it. You’re all set!

In the case of the site used to set up this sample report, we can see that across the last 28-day period (Feb 13 – Mar 12, 2025):

  • The site received 1,547 visits from AI tools.
  • 11 key events were triggered by LLM traffic.

Step 4: Analyze & Visualize Data (Optional)

Once your report is set up, you can adjust how the data is displayed:

  • Table View → See a detailed breakdown of each referral source.
  • Line Graph → Track traffic trends over time.
  • Bar Chart → Compare referral traffic across different LLMs.

Bonus: Add the Date as a breakdown to analyze traffic trends by day, week, or month.

Step 5: Save & Share Your Report

  1. Click “Save” to store the report in GA4.
  2. (Optional) Click “Share” to generate a link or export the data as a CSV/PDF.

Final Thoughts

Tracking AI-driven traffic in GA4 helps businesses:

  • Understand how LLMs impact visibility and conversions.
  • Identify which AI tools drive the most engagement.
  • Start measuring so you can optimize content for discovery in AI tools (LLMs).

Let's build better together.

ScaleMath Logo
Full stack, senior team: you get us, not just one person.
Your strategic partner: we're here to serve you. Get our input on strategy, product, customer experience, and more.
We've helped renowned companies like:
Get started ->