Free GA4 Measurement Tool
Generate GA4-compatible source rules, audit legacy referrals, create a Looker Studio field and test real source values before changing your reports.
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.
Tracking configuration
This builder classifies detectable source and referrer values. It cannot reconstruct stripped referrers, prove that Direct traffic came from AI, or isolate Google AI Overview clicks from other Google search clicks. Validate generated rules against your property before using them in executive reporting.
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.
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.
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.
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.
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.
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. |
The tool is designed to generate reporting logic, but the strongest workflow begins with your actual GA4 source values.
Decide whether you are auditing historical referrals, building a custom GA4 channel or creating a Looker Studio classification field.
Use the supported source list as a starting point and include only referral domains you can reasonably defend as AI-assistant sources.
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.
Paste actual GA4 source values or referrer URLs into the testing area and confirm which ones the generated rule matches.
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.
Referral domains and GA4's native classifications can change. Revisit the rule as new AI assistants emerge or existing platforms change their referral behavior.
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.
Instead of checking sources one by one:
A regex can combine approved source values into one matching rule.
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.
Not every interaction with an AI assistant leaves enough information for GA4 to identify the originating platform.
The browser arrives at your site with referral information that GA4 records as an identifiable source.
A link contains valid campaign parameters that provide explicit source and medium information.
GA4 recognizes the referring AI-assistant source and classifies it through its AI Assistant channel rules.
If no usable attribution reaches GA4, the visit may appear as Direct or another non-specific source.
Browser, app, redirect or privacy behavior can remove or alter referral information before the visitor reaches your analytics implementation.
A brand mention or citation that produces no website visit cannot appear as referral traffic in GA4.
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.
Genuine direct visits can occur when users type the address or use a saved bookmark.
Redirects, apps, privacy tools and technical tracking conditions can cause referral information to disappear.
PDFs, documents and other sources can also generate sessions without useful referral information.
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.
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.
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.
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.
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.
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.
Once you have a defensible AI referral segment, compare the quality and business impact of those visits rather than reporting sessions alone.
Establish how much measurable traffic comes from identifiable AI referral sources.
Compare engagement behavior with organic search, referral and other acquisition channels.
Measure whether AI-referred visitors complete important actions rather than judging the channel on volume alone.
Identify which pages most often receive measurable AI referral sessions.
Compare different AI assistants instead of treating every measurable AI referral as one identical source.
Where your tracking supports it, evaluate whether AI traffic contributes to qualified leads, purchases or revenue.
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. |
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.
Review past GA4 source data and estimate the measurable portion of AI-assistant referral traffic using defensible source matching.
Add AI referral traffic alongside organic search and AI citation metrics without presenting them as interchangeable.
Create a dedicated AI referral label in Looker Studio so clients can monitor measurable sessions and conversions over time.
Discover which articles, tools, service pages or product pages receive identifiable AI-driven visits.
Compare engagement and lead quality from AI referrals against Organic Search, Referral and other channels.
Test unfamiliar referring domains against your current classification and decide whether they belong in your reporting rules.
Add measurable AI referral traffic to acquisition reporting while keeping it distinct from rankings, impressions and traditional search traffic.
Connect AI visibility work with measurable website visits and downstream business outcomes.
Build transparent source definitions, validate regex behavior and audit native GA4 classification against custom reporting requirements.
Create repeatable AI referral reporting across client properties without claiming attribution that the underlying data cannot support.
Determine whether identifiable AI-assistant traffic generates meaningful engagement, leads or revenue.
Understand whether AI assistants are sending measurable visitors and which website pages benefit from that traffic.
Do not create unnecessary custom logic if GA4 already classifies the traffic in a way that satisfies your reporting requirement.
Test against values that actually exist in your property instead of assuming every AI platform always sends the same hostname.
Match domains or source patterns you can justify. Broad fragments can accidentally classify unrelated websites as AI traffic.
Missing referral data is not enough evidence to assign an AI source.
Google Search traffic can include many different search experiences. A broad google.com rule cannot isolate AI Overview traffic reliably.
Keep a record of exactly which domains are included, why they were included and when the definition was last reviewed.
Large differences can reveal unsupported sources, matching problems or changes in GA4's native classification.
Sessions alone do not establish value. Evaluate engagement, key events, leads, purchases or other outcomes relevant to your business.
Direct answers to common questions about ChatGPT traffic, AI Assistant attribution, GA4 regex, Direct traffic and AI search reporting.
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.
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.
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.
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.
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.
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.
Google Analytics supports RE2 regular-expression syntax. Some regex features available in other programming environments are therefore not supported.
Google documents GA4 regex as case sensitive by default. Build and test your rule with the actual source values present in your property.
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.
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.
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.
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.
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.
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.
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.
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.
No. AI visibility can include brand mentions and citations without clicks. AI referral traffic measures identifiable visits that actually reach your website.
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.
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.
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.
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.
Combine referral measurement with citation, Search Console and technical-change analysis to understand whether AI visibility is producing measurable business impact.
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.