Sub topic 4
Finding AI assistant sources in your own data
This chapter assumes you know the GA4 interface and standard reports, understand what a referrer and a UTM parameter are, and have at least Editor access to a GA4 property. Before you build a channel group or a tag, you need to know which AI assistant values appear in your own data. That list is the input for everything that follows.
Why you inspect first
Different assistants send different referrer hostnames, and these change over time. ChatGPT has used chat.openai.com and now uses chatgpt.com. Perplexity appears with and without www.. Some assistants append utm_source=chatgpt.com to links they generate. Others send nothing.
If you copy a list from a blog post, you will miss values your site actually receives and may match values you never see. Inspect your own data first, then write rules from what you find.
What GA4 stores for each visit
GA4 records attribution on the session. These are the dimensions you will use:
| Dimension | Meaning | Where it comes from |
|---|---|---|
| Session source | The origin of the session, such as `chatgpt.com` | `utm_source`, or the referrer hostname if no UTM is present |
| Session medium | The type of origin, such as `referral` or `(none)` | `utm_medium`, or `referral` when a referrer is present |
| Session source / medium | Source and medium joined | Derived |
| Session default channel group | GA4's built-in bucket, such as Referral or Direct | Rules applied to source and medium |
| Page referrer | The full referrer URL of one page view | The browser's `document.referrer` |
Session source and medium describe the whole session, based on its first event. Page referrer is an event-level parameter, and it is the raw value. The first is easy to see in reports. The second is available in BigQuery and in explorations, depending on registration, and it is useful when the session fields look wrong.
A visit from an assistant with no UTM tags normally appears as chatgpt.com / referral. A visit from a link that carries utm_source=chatgpt.com appears with the source chatgpt.com, and its medium is whatever utm_medium says, or (not set) if it is missing.
Method 1: Traffic acquisition report
Start with the report that already exists.
- Open Reports, then Acquisition, then Traffic acquisition.
- Change the primary dimension from Session default channel group to Session source / medium. Use the dropdown arrow next to the first column header.
- Set the date range to at least the last 28 days. A short range hides low-volume assistants.
- Use the search box above the table and type a candidate, such as
chatgpt, thengemini,perplexity,copilot,claude,openai, andbing. - Write down every matching row exactly as it appears, including capitalisation,
www.prefixes, and the medium.
Searching with partial words is deliberate. You want to catch chatgpt.com, chat.openai.com, and chatgpt.com / (not set) in one pass.
Method 2: A free-form exploration
The standard report limits what you can add. An exploration lets you look at source, medium, and landing page together.
- Open Explore and create a Free form exploration.
- Import these dimensions: Session source, Session medium, Session source / medium, Session default channel group, and Landing page + query string.
- Import these metrics: Sessions, Engaged sessions, and Key events.
- Put Session source / medium and Session default channel group in Rows. Put Sessions in Values.
- Add a filter on Session source with the condition "matches regex" and the pattern below.
(?i).*(chatgpt|openai|gemini|perplexity|copilot|claude|anthropic|you\.com|phind|poe\.com|deepseek).*This pattern is wider than the one you will use in the channel group. That is intentional. Here you are looking for candidates, so false positives cost you a few seconds of reading. In the channel group, a false positive silently corrupts your reports.
Look at the Session default channel group column next to each row. Most assistant rows will show Referral. Some will show Direct, Unassigned, or Organic Search. Each of those is a different problem, and the later chapters on missing referrers and the custom channel group deal with them. For now, only record what you see.
Method 3: Check the UTM values
Some assistants add UTM parameters when they link to you. To see them, pull in the Session campaign and Session manual source dimensions in the same exploration. Also check for a utm_source value that has the assistant name even when the medium is odd.
Common patterns:
| Source | Medium | What it usually means |
|---|---|---|
| `chatgpt.com` | `referral` | The visitor clicked a link, and the browser sent a referrer |
| `chatgpt.com` | `(not set)` | The link had `utm_source` but no `utm_medium` |
| `chatgpt.com` | `(none)` | Rare. Check how the session was created |
| `perplexity.ai` | `referral` | A click from Perplexity, sent with a referrer |
| `google` | `organic` | Could be a normal search click, or an AI feature inside Search |
A source with medium (not set) is worth special attention. Standard channel rules often fail to place it, so it may land in Unassigned. Your custom channel group rule should match on Source alone for this reason.
Method 4: Look at referrers in raw data
Session fields tell you what GA4 decided. The page referrer tells you what the browser sent. Comparing both exposes mismatches.
If you have the BigQuery export enabled, the following query lists the referrer hostnames that appear on page views, with a first look at which ones look like assistants. It reads one month of data and groups by host.
SELECT
REGEXP_EXTRACT(page_referrer, r'^https?://([^/]+)') AS referrer_host,
COUNT(*) AS page_views
FROM (
SELECT
(SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'page_referrer') AS page_referrer
FROM `my_project.analytics_123456789.events_*`
WHERE event_name = 'page_view'
AND _TABLE_SUFFIX BETWEEN '20261101' AND '20261130'
)
WHERE page_referrer IS NOT NULL
GROUP BY referrer_host
ORDER BY page_views DESC
LIMIT 100;Replace my_project and analytics_123456789 with your project and dataset. Scan the top 100 hosts for assistant names you did not think of. Page referrer includes internal navigation, so your own domain will usually rank first.
Without BigQuery, you can still see the page referrer in an exploration if you register it as a custom dimension. Create an event-scoped custom dimension with the event parameter page_referrer, then wait for it to populate. It collects data only from the time you register it, with no backfill.
Build your source inventory
Collect the findings in one table. This becomes the specification for later chapters.
| Observed source | Observed medium | Channel GA4 assigned | Sessions (28 days) | Notes |
|---|---|---|---|---|
| `chatgpt.com` | `referral` | Referral | 412 | Main source |
| `perplexity.ai` | `referral` | Referral | 87 | Also seen as `www.perplexity.ai` |
| `chatgpt.com` | `(not set)` | Unassigned | 14 | UTM link without medium |
| `gemini.google.com` | `referral` | Referral | 9 | Low volume |
| `copilot.microsoft.com` | `referral` | Referral | 6 |
The numbers above are examples. Yours will differ. Keep the exact strings. A rule for perplexity.ai that is set to "exactly matches" will not match www.perplexity.ai.
Diagram: where each value comes from
Common errors
- Using too short a date range. Low-volume assistants may have zero sessions in a week and several in a month.
- Matching a name that is too short. The text
youorpoeappears in many unrelated hostnames. Always include the domain suffix, as inyou\.com. - Forgetting the dot escape. In regex,
.matches any character. Writechatgpt\.com, notchatgpt.com, in rules you keep. - Trusting one dimension. Session source and page referrer can disagree. When they do, the session value reflects the first event, and the page referrer reflects only that page view.
- Reading data too soon. Standard reports can lag by 24 to 48 hours. Use a longer window and avoid the last two days.
- Treating Google organic as non-AI. Some AI-assisted Search visits are not separable. Note the gap instead of guessing.
What you leave with
After this chapter you should have a written inventory of the source strings, mediums, and current channel assignments for AI assistant traffic on your property. You should also have a list of the assistants that appear as Direct or Unassigned. The next steps use the first list to write channel rules and the second to decide where tagging is needed.
Exercise
In your Traffic acquisition report, a row shows source perplexity.ai, medium referral, and another row shows www.perplexity.ai, medium referral. You plan a channel group rule with the condition Source exactly matches perplexity.ai. What happens, and how would you fix the rule?
Show answer
The rule matches only the first row. Sessions from www.perplexity.ai stay in Referral because exact matching compares the full string. Fix it by using a "matches regex" condition such as (www\.)?perplexity\.ai, or by using "contains" with perplexity. Regex with an escaped dot is safer than a plain "contains" because it avoids matching unrelated hostnames.
Exercise
A session has source chatgpt.com and medium (not set), and GA4 places it in Unassigned. What most likely created this value, and why should your channel rule match on Source alone?
Show answer
The link carried a utm_source=chatgpt.com parameter but no utm_medium. GA4 used the UTM source and left the medium unset, so the built-in rules, which depend on the medium, could not classify it. A rule that checks only Source catches these sessions regardless of the medium.