Resources / Measurement / Tutorial
Measure AI referrals in GA4
Create a documented GA4 view of recorded AI-answer referrals, verify its rules with real traffic, and keep unknown traffic out of the AI total.
The result you are building
This tutorial produces a GA4 report view for recorded answer-engine referral sessions: sessions whose source data matches a documented rule. It does not measure people who saw an AI answer without clicking, and it does not prove that a recorded referral caused a conversion.
GA4 currently includes an AI Assistant default channel for traffic from sources such as ChatGPT, Gemini, DeepSeek, Copilot, and Grok, while excluding Google’s AI Overviews and AI Mode. Inspect that channel first. Google documents ai-assistant as its medium and may set it when a referrer matches its maintained assistant list; do not assume the medium will always be referral. Create a custom channel group when your reporting question needs a narrower, documented rule or separate engine rows. (Google’s default-channel documentation)
Prerequisites and limits
Before changing configuration, you need:
- access to the correct GA4 property and at least Editor permission to create or edit a channel group;
- a web data stream that is collecting session traffic and the on-site events you plan to inspect;
- a written list of observed source values or real authorized referral links to validate the rule;
- agreement on which events are key events, and on the timezone, reporting period, and privacy rules; and
- a way to record the rule version, owner, effective date, and validation evidence.
GA4’s default channel group cannot be edited. Custom channel groups can use source, medium, source platform, campaign fields, and other supported traffic-source fields; their rules are evaluated in order, with traffic assigned to the first matching channel. Google’s custom-channel documentation describes the available fields and permissions.
This procedure has been checked against Google’s public documentation. It has not been run in this site’s GA4 property, and the fictional values below are examples only.
Inspect the source data before writing a rule
- Open Reports, then Acquisition, then Traffic acquisition in the chosen GA4 property. If the report is absent, an Editor can restore it from the report library; see Google’s Traffic acquisition instructions.
- Set a period long enough to contain known referral activity.
- Change the primary dimension to Session source / medium. If a second dimension helps, add Session source or Session medium one at a time; use an Exploration when the comparison needs more fields together.
- Search for a known, authorized referral source or inspect rows that could contain answer-engine traffic.
- Record the exact displayed values, landing pages, session count, and a few source examples that must not match.
Referral patterns change over time. Inspect a sufficiently long history before creating a segment, filter, or channel rule, then identify the exact referring domains and any retained subfolders or paths. For example, retain a verified historical bing.com/chat pattern when it exists in the property, but treat copilot.microsoft.com as the current Copilot candidate to verify; do not turn bare bing.com into a Copilot rule. Your property’s recorded history—not a copied public hostname list—determines the production pattern.
Traffic acquisition is the right starting report because its “Session” dimensions describe the source of the current session. User acquisition instead uses first-user dimensions and answers a first-recorded-acquisition question. Google also documents non-direct last-click attribution for session sources. Treat this view as sessions attributed under GA4’s rules, not a count of independently verified new answer-engine clicks. A current-arrival audit additionally needs the arrival evidence. Do not combine user and session scope. (Google’s acquisition comparison)
Make a small rule register before configuration:
| Channel label | Exact observed source pattern | Must match | Must not match | Owner |
|---|---|---|---|---|
| ChatGPT referral | chatgpt.com, if verified in this property | inspected chatgpt.com rows with ai-assistant or referral as applicable | a campaign merely named “ChatGPT” | Analytics owner |
| Copilot referral | record after inspection | verified value only | conventional Bing search | Analytics owner |
The table is deliberately incomplete. Do not copy a generic hostname list into production without confirming how the property receives it. Referrers, apps, redirects, consent, and provider changes can produce different values.
Create the custom channel group
- Open Admin. Under Data display, choose Channel groups.
- Select Create new channel group, starting with a copy of the default group if you want its other channels preserved.
- Name it clearly, for example
Recorded answer-engine referrals v1. Add a description with the inclusion rule and owner. - Add a channel for each engine that needs a separate row, such as
ChatGPT referral. - Add a condition using Source that exactly matches or contains the observed value, choosing the narrowest condition that matches the verified examples. Add Medium only when the inspected data supports it.
- Put specific engine channels above AI Assistant as well as broad channels such as Referral that could otherwise match them. If the copied AI Assistant channel comes first, it can capture the traffic before your separate engine rule is reached.
- Save the group. Record the rule order, patterns, exclusions, and effective date in the rule register.
Custom channel groups are available in Acquisition reports, Explorations, and custom reports, and Google says they can be applied to reports retroactively. That does not make a newly written pattern historically correct; annotate the date on which the team validated the rule. (Google’s custom-channel documentation)
Work through a rule and its expected matches
Assume a fictional property has verified chatgpt.com as the source for the traffic it wants to separate. Create ChatGPT referral with Source → exactly matches → chatgpt.com. For this example, leave Medium unrestricted because both inspected media below belong to the intended source rule. This is a teaching fixture, not a universal production rule or proof that a hostname identifies every visit’s precise answer surface.
| Fictional input | Expected custom channel | Why |
|---|---|---|
Source chatgpt.com, medium ai-assistant | ChatGPT referral | Exact source match; specific rule precedes AI Assistant |
Source chatgpt.com, medium referral | ChatGPT referral | Same verified source with a different recorded medium |
Source notchatgpt.com, medium referral | Existing fallback, not ChatGPT referral | A contains rule could incorrectly capture it |
Source newsletter, medium email, campaign ChatGPT tips | Existing email rule | Campaign wording is not the source condition |
Source (direct), medium (none) | Existing Direct rule | No matching source is present |
These expected results test the logic. Then compare it with recorded property rows and, where possible, a real arrival. If the first row remains in AI Assistant, inspect channel order before widening the source condition. If unrelated hostnames enter the channel, use exact matching or explicitly bounded patterns and retest the exclusions.
Read the referral report
Return to Reports → Acquisition → Traffic acquisition. Use the session-scoped version of the new custom channel group as the primary dimension where the report supports it, then drill into Session source / medium. Review sessions, users, engagement, key events, total revenue, and landing pages for each recognized engine.
Use this view for the current-session question: “What did visits matched by this rule do?” For first recorded acquisition, use User acquisition with a compatible first-user source view. For paths that continue into later sessions, use an Exploration or an approved warehouse analysis with an explicit identity and lookback rule. GA4 Path exploration can span more than one session, so it does not by itself mean “same-session path.” (Google’s Path exploration documentation)
Keep these labels in the report:
- Recorded referral session: matched this channel rule in the current session.
- Unknown or unattributed: did not carry enough data for this rule; do not add it to the channel.
- First recorded acquisition: a user-level view, reported separately.
- Recorded assist: a later-outcome analysis with its own identity and lookback rule, reported separately.
Turn report counts into an interpretable result
Suppose a fictional report has 40 matched sessions, 6 sessions containing a qualified-lead event, and 8 total firings of that event. The session success rate is 6/40 = 15%, not 8/40 = 20%: two extra firings do not establish two extra successful sessions. Use the Session key event rate for the selected event, or a session-level export that can identify which sessions contained it. An event count alone is insufficient.
A usable report sentence would be: “Under source rule v1, 6 of 40 recorded matched sessions contained the qualified-lead event during the reporting window. The event fired 8 times. This describes the recorded sessions; it does not estimate unclicked answer exposure.” Save the event definition and rule beside the numbers. The website analytics worked dataset teaches the separate user, order, and assist calculations.
Verify with a real referral when available
Use a real, authorized answer-engine link only if one is available and its use complies with the product and organization rules. Open the link in a clean browser context, land on the intended page, and complete a harmless test event if the site has one. After GA4 processing, check that the session appears with the expected source, medium, landing page, and custom-channel row.
Save the test time, URL, browser context, expected rule, actual source values, and result. Also check one non-AI referral and one direct session to ensure the rule has not captured them. If no legitimate referral link is available, validate only against existing recorded source values and mark end-to-end referral validation as pending.
Do not manufacture UTM parameters on a link merely to prove an organic referral rule. A manually tagged campaign is a different acquisition mechanism and should be reported as such.
Investigate mismatches before changing the conclusion
If the test lands in Direct, Referral, or another channel, inspect the raw source values, redirect chain, consent state, landing-page redirects, cross-domain settings, and rule order. A missing referrer can result from ordinary browser or app behavior as well as an implementation problem. It is not evidence that the session should be counted as AI.
If the group captures conventional search or unrelated referrals, narrow the source condition and rerun the controlled check. Preserve previous rule versions so trend changes can be explained. The final report should show the rule name and version, date range, matching source values, unknown-traffic treatment, event definitions, and any incomplete validation.
Take the next measurement step
Use website analytics for AI answer-engine journeys to define first-acquisition, same-session, and assisted-outcome views without adding their revenue. Use AI influence and incrementality when the decision concerns unclicked answer exposure or broader demand. Neither calculation should be filled with unattributed GA4 traffic.