Step 1: count the visits that identify themselves
An AI visit can identify itself in two ways. The browser can send the assistant's address as the referrer, or the assistant can add a utm_source tag to the link it hands out. These are the values Promvia's own classifier matches today, and the same ones to look for in any analytics tool:
- ChatGPT: referrer chatgpt.com or chat.openai.com; tag utm_source=chatgpt.com or utm_source=chatgpt.
- Perplexity: referrer perplexity.ai or www.perplexity.ai; tag utm_source=perplexity.
- Gemini: referrer gemini.google.com or vertexaisearch.cloud.google.com; tag utm_source=gemini.
- Microsoft Copilot: referrer copilot.microsoft.com; tag utm_source=copilot.
- Claude: referrer claude.ai; tag utm_source=claude.
- Smaller ones the classifier also knows: you.com, poe.com, meta.ai and grok.com.
In Google Analytics 4, start with what is already there. The default channel group has an AI Assistant channel for visits from sources such as ChatGPT, Gemini, Copilot and Grok. Open Acquisition > Traffic acquisition, keep the Session default channel group dimension, and read the AI Assistant row. Google applies it when the referrer matches its list of assistants; its page does not say whether a visit that carries only a utm_source tag, with no referrer, ends up there.
To control the list yourself, and to catch tagged visits by their source, build a custom channel group:
- In Admin, under Data display, open Channel groups and click Create new channel group. It starts as a copy of the default group. You need the Editor role or above on the property.
- Click Add new channel, name it AI assistants, and add the condition Source matches regex.
- Paste a pattern built from the list above: ^(www\.)?(chatgpt\.com|chat\.openai\.com|chatgpt|perplexity\.ai|perplexity|gemini\.google\.com|gemini|copilot\.microsoft\.com|copilot|claude\.ai|claude)$ — in GA4 a referral's source is the referring hostname, and a tagged visit's source is the utm_source value, so one pattern covers both.
- Click Reorder and move AI assistants above Referral. Google says traffic goes into the first channel whose definition it matches, so below Referral the assistants' referral visits would be counted as Referral instead.
- Save the group, then pick it as the dimension in Traffic acquisition. Google says custom channel groups apply to your reports retroactively.
Google's help page ships its own example pattern for this channel. It is written to be broad: one of its alternatives matches any source containing "google" followed by "bard", and another any source containing "gpt". Ours is narrower on purpose and lists exact sources; test either against your own Source values before you rely on it, and add a source when an assistant you care about is missing.
ChatGPT automatically includes the UTM parameter utm_source=chatgpt.com in referral URLs, enabling clear tracking and analysis of inbound traffic from ChatGPT search results.
Step 2: accept that part of it lands in Direct
Some assistants send nothing. When we clicked through to our own site from each assistant on 24 August 2026, Claude on desktop sent no referrer, and on iPhone none of the four apps sent one. ChatGPT and Perplexity tagged their links with utm_source, so those visits were still identifiable; Claude and Gemini on iPhone added nothing, and their visits landed in Direct. No analytics setting recovers a referrer that was never sent. The full measurement is in why AI traffic shows up as Direct.
What you can do is estimate, and keep the estimate apart from the count. Promvia's estimate is a separate figure, labelled as inferred: visits with no AI signal that landed on a deep page (not the homepage) which an AI engine cited for one of your tracked questions in the previous 30 days. It is never added to the confirmed number. If you do this by hand, compare Direct visits to your deep pages with the pages assistants cite for your questions, and label the result as inferred.
Step 3: do not count crawler requests as traffic
Your server log will show requests from OAI-SearchBot, ChatGPT-User, PerplexityBot, ClaudeBot and others. None of these is a visit. They are machines reading pages: search crawlers building an index, user-triggered fetchers retrieving a page for one answer, and training crawlers collecting text. Browser analytics is the wrong place to count them: Promvia's snippet reports only from a page running in a browser, and a crawler that fetches the HTML without running its scripts never triggers it. The server log is where they are.
They are also not a live signal of an answer being written. When we joined our own log to the answers that cited promvia.app between 26 August and 5 October 2026, only 1 of 63 ChatGPT answers and 0 of 104 Perplexity answers had a verified fetch of a cited page in the 10 minutes before. What came first was the index crawl: OAI-SearchBot had fetched the page in 116 of 129 cases, and PerplexityBot in 174 of 174. All the questions named our brand, so this is one site's log, not a rule. The join, with the rows, is in joining server logs to AI citations.
Step 4: read your server or CDN logs for the bots
- Filter the access log by user agent for the AI crawlers: GPTBot, OAI-SearchBot and ChatGPT-User (OpenAI); ClaudeBot, Claude-SearchBot and Claude-User (Anthropic); PerplexityBot and Perplexity-User (Perplexity); plus CCBot, Bytespider and Meta's agents.
- Check the source IP against the list the operator publishes. A user agent is a claim anyone can send; on our site, every GPTBot request that failed the IP check was our own monitoring. The verified crawler table lists each operator's IP file.
- Keep the three purposes apart: search-index crawls, user-triggered fetches and training crawls answer different questions, and adding them up gives a number that means none of them.
- On a CDN, the edge log is the place to read: a request blocked by bot protection never reaches your origin server's log.
- Human visits are in the same log, with their Referer header. Reading them there has the same limits as in Step 1 and Step 2: a referrer that was never sent is not in the log either.
Step 5: what Promvia's snippet does, and what it does not
- It is one script tag. On each page load it sends one pageview with the page URL, the referrer and a first-party visitor id kept in a cookie for a year. On Shopify the same thing runs as a theme app embed.
- The server classifies the visit: referrer first, matched by hostname including subdomains, then the utm_source tag. It records which of the two identified the visit, because a referrer is reported by the browser while a tag can be written by anyone who makes the link. A click from one of your own pages is internal navigation and is not counted, whatever it is tagged with.
- The query string is read in memory for utm_source and then dropped; only the address and path are stored.
- Conversions you report, and Shopify orders through the store's order webhooks, are credited to the most recent AI visit in the 30 days before them.
- If you would rather not install anything, Promvia can read the AI rows from your own GA4 property with read-only access: sessions, key events and purchase revenue per day for the same list of sources.
- For crawlers it needs your CDN logs (a Vercel log drain, Cloudflare Logpush or a Cloudflare Worker), because the snippet runs in browsers and never sees a bot. A crawler hit is marked Verified only when it came through one of those connectors and its IP is inside the operator's published range.
- What it does not do: recover a referrer that was never sent, or count an inferred visit as confirmed. Paid plans have not opened yet; traffic and revenue attribution is on the free plan.
Frequently asked questions
Does Google Analytics 4 track ChatGPT traffic automatically?
Partly. GA4's default channel group has an AI Assistant channel, applied when the referrer matches Google's list of assistants. Visits that arrive with no referrer are not in it; a custom channel group that matches the Source, which a utm_source tag sets, also catches the tagged ones.
What is utm_source=chatgpt.com?
A tag ChatGPT adds to the links it hands out; OpenAI says it is included in referral URLs automatically. In our August 2026 test it was the only thing that identified a click from the ChatGPT iPhone app, which sent no referrer.
Are AI crawler hits in my server logs AI traffic?
No. They are bots reading pages, for a search index, a single answer or training. Count them separately from visits, verify them by IP before you trust the user agent, and do not add them to your visitor numbers.
Where do clicks from Google AI Overviews and AI Mode go in GA4?
Into Organic Search. Google's definition of the AI Assistant channel excludes them and its Organic Search channel includes them, so GA4 does not separate them from other Google search clicks. Measuring those needs a different method from referrals, which we cover in our guide to tracking Google AI Overviews and AI Mode.