Skip to main content

How to track AI Traffic in GA4

Written by Alp Aysan
Updated over 7 months ago

1. Create a Segment for AI Referrals

  1. Go to Explore โ†’ Blank in GA4.

  2. On the left panel, under Segments, click + Add segment โ†’ Session segment.

  3. Choose Condition โ†’ set:

    • Dimension = Session source / medium

    • Match type = matches regex

    • Value =

    .*(openai\.com|chatgpt\.com|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|perplexity\.ai).*
  4. 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 source

  • Landing page + query string

  • (Optional) If youโ€™ve added custom tagging in GTM: ai_source and ai_model

Drag into your tab settings:

  • Rows โ†’ Landing page + query string

  • Columns โ†’ 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:

  • Sessions

  • Engaged sessions

  • Conversions (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.

Did this answer your question?