Sign inGet started
Tracking

Traffic from ChatGPT

View as MarkdownOpen in ChatGPTOpen in Claude
Connect your agent
Add to CursorAdd to VS Code

See visits from ChatGPT and other AI assistants, which page ChatGPT read before each visit, and the conversions and orders those visits led to.

Updated

To track traffic from ChatGPT, you need three things: count the visits that arrive with ChatGPT's referrer or UTM tag, see which page ChatGPT read for the person before they came, and see what those visits led to. Google Analytics 4 does the first: its AI Assistant channel counts the visits. nextanalytica does all three. It puts ChatGPT, Claude, Perplexity and other assistants in their own channel, joins each visit to the page the assistant fetched in the 30 minutes before it, and counts the conversions and orders that followed. Your agent reads it all in one answer.

This command adds nextanalytica to Claude Code:

claude mcp add --transport http nextanalytica https://mcp.nextanalytica.app/mcp

Why does ChatGPT traffic hide in Direct?

Analytics knows where a visit came from by its referrer or its UTM tags. When neither names ChatGPT, the visit lands in Direct. That happens in two common cases:

  • The link loses its referrer. Some apps open links without saying where they came from, and add no UTM tag.
  • The person doesn't click at all. Many people read ChatGPT's answer, then type your address or search your name later. Their visit is Direct or Organic search.

So every tool that counts only referrers undercounts ChatGPT. nextanalytica says so in its own answers, and gives you two ways to see more: the page fetch before the visit, and what people say when you ask them.

How do you see ChatGPT traffic in GA4?

GA4's default channel group has an AI Assistant channel. A visit lands in it when its referrer is on Google's list of AI assistants, such as ChatGPT, Gemini, DeepSeek, Copilot or Grok; GA4 then sets its medium to ai-assistant. Visits from Google's own AI Overviews and AI Mode aren't in it.

You can also build a custom channel group with your own rules: a standard property has room for 2 of them, and they apply to past data too.

What GA4 can't show is what happened before the click. ChatGPT reads your page with its own bot, ChatGPT-User, which never runs the Google tag, so GA4 never sees which page ChatGPT read or whether the visit followed it.

How does nextanalytica count ChatGPT visits?

Every visit gets a channel from its referrer, its UTM tags and its ad click id. AI assistants is a channel of its own, and each visit in it names its assistant:

AssistantKnown by
ChatGPTchatgpt.com, chat.openai.com
Claudeclaude.ai
Perplexityperplexity.ai
Geminigemini.google.com
Copilotcopilot.microsoft.com
DeepSeek, Grok, Meta AI, MistralTheir own chat addresses

The same names count as a UTM source, so a link tagged utm_source=chatgpt is a ChatGPT visit too. A click on a ChatGPT ad is different: it goes to Paid search, still named ChatGPT, so you can tell ads from answers. See ChatGPT Ads.

Ask your agent:

  • "How many visits came from ChatGPT this month, and to which pages?"
  • "Compare ChatGPT, Perplexity and Claude visits with last month."
  • "Which pages do people land on from AI assistants, and do they convert?"

Which page did ChatGPT read before the visit?

When a person asks ChatGPT about your site, ChatGPT often fetches your page right then, as ChatGPT-User. A small sender on your server (a Cloudflare Worker, Next.js middleware or the WordPress plugin) passes that fetch to nextanalytica. Then every ChatGPT visit gets one level:

LevelWhat it means
fetched_pageChatGPT fetched the page the visit entered on, in the 30 minutes before it
fetched_siteChatGPT fetched another page of your site in those 30 minutes
ai_referredThe visit came from ChatGPT with no fetch in those 30 minutes

The same works for Claude (Claude-User), Perplexity (Perplexity-User), Meta AI and Mistral. Your agent also reads which pages assistants fetch most, and the median time from a fetch to the visit.

See AI crawlers to add a sender.

What did ChatGPT visits lead to?

For each level, nextanalytica counts the visits, their conversions and the orders in them, in your project's currency. So your agent can answer "Did the people ChatGPT sent buy anything?" with a number, not a guess.

Ask your agent:

  • "What did AI assistant visits lead to this month?"
  • "Which pages does ChatGPT read before people buy?"

What about people who never clicked?

Ask them. Add "How did you hear about us?" to a sign-up form or your checkout, and send the answer as the event heard_from:

window.nextanalytica.track("heard_from", { answer: "ChatGPT told me" });

nextanalytica reads the answer in the person's own words, so "Chat GPT", "chatgpt.com" and "gpt-4o" all count as ChatGPT. Your agent then sees how many people an assistant sent, their conversions and orders, and how many of them also came through the AI assistants channel, without counting anyone twice. See Custom events.

How do GA4 and nextanalytica compare?

nextanalyticaGoogle Analytics 4
Visits from AI assistantsTheir own channel, named by assistantThe AI Assistant channel
Which page the assistant read before the visitYes, with a sender on your serverNo: the assistant's bot never runs the tag
Conversions and orders after an assistant's fetchYes, for each levelNo
People who heard about you from an assistantCounted from their own answer, next to the channelOnly if you build it yourself
ChatGPT ads apart from ChatGPT answersYes: ads in Paid search, answers in AI assistantsDepends on your UTM tags
Who reads itYour agent, through MCPYou, in GA4's reports

How do you set it up?

  1. Add the tag to your site. See Add the tag.
  2. Add a sender for AI crawlers, so your agent sees the fetches. See AI crawlers.
  3. Optional: ask "How did you hear about us?" and send heard_from.
  4. Connect your agent and ask "How much traffic came from ChatGPT this month, and what did it lead to?"

Your agent can do the first two for you: it reads the tag and the sender's setup from nextanalytica and adds them to your code. See Let your agent set it up.

Next steps

Related
  • What the tag collects: Page views, clicks, forms, scroll, errors and page speed, counted without code. What never leaves the page.
  • Add the tag: Put one script line in the head of every page. Where it goes in plain HTML, site builders and each framework.
  • Next.js analytics: Add analytics to Next.js with @nextanalytica/tag: install, events, consent and AI crawlers, counted without cookies until a yes and read by your agent.
  • Next.js custom events: Send custom events from a Next.js app with @nextanalytica/tag: sign-ups, demo requests and conversions your agent reads by channel.
  • Next.js cookie consent: Wire a cookie banner in Next.js to analytics: count without cookies until the answer, and pass the saved answer on every page.
  • Next.js revenue tracking: Record orders in a Next.js app, from the browser or from your server, so revenue ties to the visit, channel and campaign it came from.
Still have questions?
Was this page useful?