Free GA4 Measurement Tool

Turn scattered AI referrals into one measurable channel.

Generate GA4-compatible source rules, audit legacy referrals, create a Looker Studio field and test real source values before changing your reports.

Native GA4-awareRE2-safe outputNo data upload
NEW IN GA4

Check the native channel first.

GA4 introduced an AI Assistant default channel and the ai-assistant medium in May 2026. Use custom regex for historical reporting, source audits, unsupported assistants or your own reporting structure—not as a blind replacement.

01

Choose your reporting goal

The output changes to match the job you are doing.

02

Select AI referral sources

Core sources are selected by default. Add only domains you can defend as AI-assistant referrals.

03

Test actual values Optional

Paste source values or complete referrer URLs from GA4 to see what the rule will classify.

What cannot be recovered

Visits with no referrer generally appear as Direct and cannot be proven to originate from an AI assistant. Google AI Overview clicks also share Google search attribution and should not be relabeled using a broad google.com rule.

GA4 AI Traffic Measurement

Group measurable AI referral traffic without pretending every AI visit can be identified.

The AI Referral Traffic Regex Builder for GA4 creates GA4-compatible source rules for detectable AI-assistant referrals, helps audit historical source data, generates custom reporting logic and lets you test real source values before changing your analytics setup.

Quick Answer: How can you track AI referral traffic in GA4?

You can track detectable AI referral traffic in Google Analytics 4 by analyzing traffic-source dimensions such as Session source and Session source / medium, then grouping known AI-assistant referral sources using native GA4 channel classification or carefully tested regex rules. However, only visits that preserve identifiable attribution can be classified reliably. Traffic with no usable referrer may appear as Direct and cannot be proven to have originated from an AI assistant.

AI search visibility and AI referral traffic are not the same metric.

Your company can be mentioned or cited inside an AI answer without receiving a click. Conversely, a visitor can arrive from an AI assistant only when the user actually follows a link and enough attribution information reaches your analytics implementation.

The purpose of this builder is therefore not to estimate “all AI traffic.” It helps you organize the portion of AI-assistant referral traffic that your GA4 data can actually identify.

What the builder can generate

  • AI referral source regex
  • Historical source-audit rules
  • Custom GA4 channel logic
  • Looker Studio CASE logic
  • Source-value testing
  • Custom domain coverage
  • RE2-compatible patterns
  • AI referral grouping guidance
  • Warnings for attribution that cannot be recovered
Measure what the referrer proves. A regex can classify source values that exist in GA4. It cannot reconstruct missing referrers, prove that Direct traffic came from ChatGPT or another assistant, or identify every AI interaction that happened before a website visit.
GA4 Now Recognizes AI Assistants

Check GA4's native AI Assistant channel before building a custom one.

GA4 now includes an AI Assistant default channel. That changes the role of custom regex: it is still useful, but it should complement native classification rather than blindly replace it.

What GA4 now does natively

Google Analytics can classify recognized AI-assistant referral traffic into an AI Assistant default channel.

When Google's channel rules recognize an AI-assistant referrer, GA4 can assign the medium ai-assistant.

This gives analysts a native starting point for current AI-assistant traffic reporting.

Why custom regex still matters

  • Historical data audits
  • Older reporting periods
  • Unsupported referral sources
  • Custom AI channel definitions
  • Source-level analysis
  • Looker Studio dashboards
  • Testing new AI referrers
  • Comparing native vs custom classification

Do not rebuild native GA4 functionality just because you can.

Start by reviewing the AI Assistant channel in your property. Use custom rules when you need greater transparency, additional sources, historical continuity or your own reporting structure.

Understanding GA4 Attribution

Source, medium and source / medium answer different reporting questions.

Before creating an AI traffic regex, understand which GA4 dimension your rule is intended to evaluate.

GA4 dimension What it represents Example use
Session source The publisher, platform, website or source associated with the session. Identify which measurable AI referral source generated the session.
Session medium The general method through which the session was acquired. Distinguish referral, organic, ai-assistant and other traffic classifications.
Session source / medium Combines the source and medium associated with the session. Useful when you want to inspect both the referring source and GA4's medium classification together.
First user source The source associated with the user's first recorded acquisition. Useful for first-touch acquisition analysis rather than every subsequent AI-driven session.
For most session-level AI referral analysis, start with Session source or Session source / medium. First-user dimensions answer a different attribution question and should not be substituted automatically.
How to Use the Builder

Create and validate your AI referral rules in five steps.

The tool is designed to generate reporting logic, but the strongest workflow begins with your actual GA4 source values.

01

Choose your reporting goal

Decide whether you are auditing historical referrals, building a custom GA4 channel or creating a Looker Studio classification field.

02

Select relevant AI sources

Use the supported source list as a starting point and include only referral domains you can reasonably defend as AI-assistant sources.

03

Add custom domains if necessary

Add domains that appear in your own analytics but are not already represented.

Use domains rather than protocols, URL paths or manually written wildcard syntax.

04

Test real source values

Paste actual GA4 source values or referrer URLs into the testing area and confirm which ones the generated rule matches.

05

Implement and validate

Copy the appropriate output into your reporting workflow, then compare the resulting channel totals with raw source-level data before using it in executive reporting.

06

Review periodically

Referral domains and GA4's native classifications can change. Revisit the rule as new AI assistants emerge or existing platforms change their referral behavior.

GA4 Regex Explained

Why a regex is useful for grouping AI referral sources.

What is a GA4 regex?

A regular expression, or regex, is a pattern used to match multiple text values with one rule. In GA4, regex can be used in reporting, explorations, audiences, custom channel groups and other configurations. For AI referral analysis, a regex can group several known source domains into one logical AI-traffic category.

A simplified concept

Instead of checking sources one by one:

source-a.example source-b.example source-c.example

A regex can combine approved source values into one matching rule.

Why the exact syntax matters

Google Analytics uses RE2-style regular expressions.

Regex metacharacters such as periods, parentheses, pipes and anchors have specific meanings, which is why blindly pasting domain names into a handcrafted expression can produce unintended matches.

GA4 regex is full-match and case-sensitive by default. If your rule is intended to match part of a value instead of the complete value, the expression must be designed accordingly. Test the generated pattern against real property values before relying on it.
What GA4 Can Actually See

AI traffic measurement starts with attribution evidence that survives the click.

Not every interaction with an AI assistant leaves enough information for GA4 to identify the originating platform.

YES

Detectable referral

The browser arrives at your site with referral information that GA4 records as an identifiable source.

UTM

Tagged link

A link contains valid campaign parameters that provide explicit source and medium information.

GA4

Native AI classification

GA4 recognizes the referring AI-assistant source and classifies it through its AI Assistant channel rules.

DIR

Missing referrer

If no usable attribution reaches GA4, the visit may appear as Direct or another non-specific source.

APP

App or privacy loss

Browser, app, redirect or privacy behavior can remove or alter referral information before the visitor reaches your analytics implementation.

NO

No click

A brand mention or citation that produces no website visit cannot appear as referral traffic in GA4.

AI Traffic vs Direct Traffic

Can Direct traffic in GA4 be assumed to come from ChatGPT or other AI assistants?

Short Answer: No.

Direct / none traffic cannot be reliably reclassified as AI traffic without additional evidence. GA4 uses Direct when it does not have clear referral or campaign-source information. Missing attribution can happen for many reasons, so a rise in Direct traffic after AI adoption is not proof that the traffic came from an AI assistant.

01

Typed & bookmarked visits

Genuine direct visits can occur when users type the address or use a saved bookmark.

02

Lost attribution

Redirects, apps, privacy tools and technical tracking conditions can cause referral information to disappear.

03

Offline and untracked sources

PDFs, documents and other sources can also generate sessions without useful referral information.

Do not create a model such as “Direct growth = dark AI traffic” and present it as measured AI traffic. You may investigate correlations, but they should remain clearly labeled as estimates or hypotheses.
Google AI Overviews

Can GA4 regex isolate traffic from Google AI Overviews?

Short Answer: Not reliably from a broad Google referral rule.

Clicks from Google AI search experiences can share Google search attribution with other Google search traffic. A regex that simply classifies google.com as AI traffic would therefore overstate AI referrals by capturing conventional Google traffic as well.

What not to do

Do not add a broad Google domain rule to an AI referral regex and assume every matching session originated from an AI Overview.

That would contaminate your AI reporting with normal Google Search sessions.

What to do instead

Keep Google Search reporting separate unless you have defensible evidence that distinguishes a particular AI-search source.

Use Search Console and other Google reporting data as complementary evidence rather than forcing unsupported attribution inside GA4.

Three Reporting Workflows

Use the regex differently depending on the question you are trying to answer.

HIST

Historical Audit

Apply a source rule to historical GA4 data to identify measurable AI referral sources that existed before your current reporting structure.

This is especially useful for trend analysis and retrospective client reporting.

GA4

Custom GA4 Channel

Build your own AI-traffic definition when you need source coverage or segmentation beyond the native default channel.

Document the exact rules so your reporting remains reproducible.

LOOK

Looker Studio Field

Group AI sources inside reporting dashboards without changing the underlying acquisition data.

This can be useful when clients need a dedicated AI referral traffic line or comparison.

Beyond Sessions

AI referral traffic volume is only the beginning of the analysis.

Once you have a defensible AI referral segment, compare the quality and business impact of those visits rather than reporting sessions alone.

USR

Users & Sessions

Establish how much measurable traffic comes from identifiable AI referral sources.

ENG

Engagement

Compare engagement behavior with organic search, referral and other acquisition channels.

KEY

Key Events

Measure whether AI-referred visitors complete important actions rather than judging the channel on volume alone.

LAND

Landing Pages

Identify which pages most often receive measurable AI referral sessions.

SRC

Source Mix

Compare different AI assistants instead of treating every measurable AI referral as one identical source.

REV

Revenue or Leads

Where your tracking supports it, evaluate whether AI traffic contributes to qualified leads, purchases or revenue.

AI Visibility vs AI Traffic

A citation can matter even when nobody clicks it.

GA4 measures website behavior after a measurable visit. It cannot measure every way an AI-generated answer influences awareness or buying decisions.

Metric What it measures Example evidence
AI Mention Your brand appears inside an AI-generated answer. Captured AI answer or monitoring dataset.
AI Citation Your website appears as a visible supporting source. Citation URL in an AI answer.
AI Referral A user clicks through and identifiable attribution reaches your website analytics. GA4 Session source / medium.
AI-Assisted Conversion AI exposure may have influenced a later conversion even when direct attribution is incomplete. Requires broader customer-journey analysis rather than a referral regex alone.

Do not use GA4 as your only AI visibility metric.

Combine measurable referral traffic with citation monitoring, brand mentions, Search Console data, lead quality and conversion outcomes. GA4 tells you what happened after measurable visits reached your property; it does not observe the entire AI discovery journey.

Practical Use Cases

When an AI referral regex is most useful.

01

Historical AI Traffic Audit

Review past GA4 source data and estimate the measurable portion of AI-assistant referral traffic using defensible source matching.

02

SEO & GEO Reporting

Add AI referral traffic alongside organic search and AI citation metrics without presenting them as interchangeable.

03

Client Dashboards

Create a dedicated AI referral label in Looker Studio so clients can monitor measurable sessions and conversions over time.

04

Landing Page Analysis

Discover which articles, tools, service pages or product pages receive identifiable AI-driven visits.

05

Conversion Analysis

Compare engagement and lead quality from AI referrals against Organic Search, Referral and other channels.

06

New Source Detection

Test unfamiliar referring domains against your current classification and decide whether they belong in your reporting rules.

Who Should Use It

Built for teams that need defensible AI traffic reporting.

SEO Professionals

Add measurable AI referral traffic to acquisition reporting while keeping it distinct from rankings, impressions and traditional search traffic.

AEO & GEO Specialists

Connect AI visibility work with measurable website visits and downstream business outcomes.

Analytics Professionals

Build transparent source definitions, validate regex behavior and audit native GA4 classification against custom reporting requirements.

SEO Agencies

Create repeatable AI referral reporting across client properties without claiming attribution that the underlying data cannot support.

Marketing Teams

Determine whether identifiable AI-assistant traffic generates meaningful engagement, leads or revenue.

Website Owners

Understand whether AI assistants are sending measurable visitors and which website pages benefit from that traffic.

GA4 AI Tracking Best Practices

How to keep AI referral reporting accurate enough to trust.

Check the native AI Assistant channel first

Do not create unnecessary custom logic if GA4 already classifies the traffic in a way that satisfies your reporting requirement.

Use real GA4 source values

Test against values that actually exist in your property instead of assuming every AI platform always sends the same hostname.

Keep the regex narrow

Match domains or source patterns you can justify. Broad fragments can accidentally classify unrelated websites as AI traffic.

Do not label Direct as AI

Missing referral data is not enough evidence to assign an AI source.

Do not classify all Google traffic as AI

Google Search traffic can include many different search experiences. A broad google.com rule cannot isolate AI Overview traffic reliably.

Document your source list

Keep a record of exactly which domains are included, why they were included and when the definition was last reviewed.

Compare native and custom totals

Large differences can reveal unsupported sources, matching problems or changes in GA4's native classification.

Measure business outcomes

Sessions alone do not establish value. Evaluate engagement, key events, leads, purchases or other outcomes relevant to your business.

Know the Limitations

What an AI referral regex can — and cannot — measure.

The tool can help you

  • Group identifiable AI referral sources
  • Generate GA4-compatible regex
  • Audit historical source values
  • Test source matching
  • Create custom channel logic
  • Create Looker Studio classification logic
  • Add custom AI referral domains
  • Standardize reporting definitions

The tool cannot

  • Recover stripped referral data
  • Prove that Direct traffic came from AI
  • Measure users who never clicked a citation
  • Measure every AI mention
  • Measure every AI citation
  • Reliably isolate Google AI Overview traffic using google.com alone
  • Reconstruct the full customer journey
  • Guarantee that referral behavior will remain unchanged
Attribution is an evidence problem. Use the most specific data available and clearly separate measured traffic from estimated or inferred AI influence.
Frequently Asked Questions

GA4 AI referral traffic and regex tracking explained.

Direct answers to common questions about ChatGPT traffic, AI Assistant attribution, GA4 regex, Direct traffic and AI search reporting.

Can GA4 track traffic from ChatGPT and other AI assistants?

Yes, when the visit reaches your site with identifiable referral or campaign-source information that GA4 can record. Not every AI-driven visit preserves that attribution, so GA4 cannot measure all AI influence.

Does GA4 have an AI traffic channel?

Yes. GA4 now includes an AI Assistant default channel for recognized AI-assistant traffic. Custom regex remains useful for historical analysis, unsupported sources, validation and custom reporting structures.

What is the GA4 ai-assistant medium?

GA4 can use the medium value ai-assistant when a referrer matches its recognized AI-assistant classification rules. This helps separate supported AI referral traffic from conventional referral and search channels.

Why would I need a custom AI referral regex if GA4 has a native AI Assistant channel?

Custom regex can still be useful for historical backfill, unsupported referral sources, source audits, custom channel definitions, Looker Studio dashboards and comparing your own source list with GA4's classification.

What GA4 dimension should I use for AI referral analysis?

Session source and Session source / medium are useful starting points for session-level acquisition analysis. The correct dimension depends on whether you are analyzing individual sessions, first-user acquisition or another attribution scope.

What is a GA4 regex?

A GA4 regex is a regular-expression pattern used to match values in Analytics data. It can combine multiple AI-assistant referral sources into one reporting rule instead of creating separate conditions for every source.

What regex engine does GA4 use?

Google Analytics supports RE2 regular-expression syntax. Some regex features available in other programming environments are therefore not supported.

Is GA4 regex case sensitive?

Google documents GA4 regex as case sensitive by default. Build and test your rule with the actual source values present in your property.

Does GA4 regex use full or partial matching?

Google Analytics uses full-regex matching by default. If you need to match a value containing a pattern rather than the complete value, the expression needs appropriate metacharacters for partial matching.

Can I track ChatGPT referral traffic in GA4?

If a ChatGPT-originated visit reaches your property with identifiable attribution, GA4 can record that source. The exact source value should be confirmed in your own property rather than assumed from a static list.

Can I track Perplexity traffic in GA4?

Yes, when Perplexity-driven clicks preserve referral information that GA4 records. Use your actual Session source values to validate the source before adding it to custom reporting logic.

Can I track Claude referral traffic in GA4?

Claude-driven visits can be measured when identifiable attribution reaches GA4. As with other AI assistants, some visits may lose referral information before the session is recorded.

Can Direct traffic actually be AI traffic?

It is possible that some visits influenced by an AI assistant lose referral information and appear as Direct. However, Direct also includes many non-AI scenarios, so you cannot reliably reclassify it as AI traffic without additional evidence.

Can I identify Google AI Overview traffic in GA4?

A broad Google referral rule cannot reliably distinguish AI Overview clicks from conventional Google Search traffic. Avoid classifying all google.com traffic as AI referral traffic.

Why might AI referral traffic appear as Direct?

Referral information can be lost because of app behavior, redirects, browser privacy controls, technical attribution conditions or other factors. When GA4 lacks clear source information, a session may be processed as Direct.

Does AI referral traffic include people who saw my brand in ChatGPT but did not click?

No. GA4 records activity on your website or app. Someone who sees your brand or citation in an AI answer but never visits your property does not generate a measurable referral session.

Is AI referral traffic the same as AI visibility?

No. AI visibility can include brand mentions and citations without clicks. AI referral traffic measures identifiable visits that actually reach your website.

Can AI referral traffic be used to measure GEO performance?

It can be one useful GEO metric, particularly for website visits and conversions. A stronger GEO measurement framework also considers citations, mentions, relevant query coverage, branded demand and business outcomes.

Should I measure AI traffic by sessions or users?

Both can be useful. Sessions help measure individual visits, while user metrics provide a broader audience view. Choose the metric according to the question you are trying to answer and keep attribution scope consistent.

What should I measure after identifying AI referral traffic?

Compare landing pages, engagement, key events, leads, purchases or revenue with other acquisition channels. This helps determine whether AI referrals produce meaningful business value rather than simply additional sessions.

How often should I update my AI referral regex?

Review it periodically and whenever GA4 changes its native channel definitions, new AI assistants begin sending measurable traffic or existing platforms change their referral behavior.

Defensible AI Attribution

Measure the AI traffic you can prove — not the traffic you hope was AI.

Use the AI Referral Traffic Regex Builder for GA4 to audit identifiable AI referral sources, test real source values, create custom reporting logic and connect measurable AI-driven visits with engagement, conversions and business outcomes.

Scroll to Top