Read the visits that came from AI assistants
get_ai_trafficThe sessions Google Analytics attributes to AI assistants for the project's site: how many arrived, how engaged they were, and how many key events they triggered. This is the tool for 'is any of this visibility turning into visits'.
Instructions
The sessions Google Analytics attributes to AI assistants for the project's site: how many arrived, how engaged they were, and how many key events they triggered. This is the tool for 'is any of this visibility turning into visits'.
Pass by to rank the period instead of totalling it: source for the assistants that sent the visitors, page for the pages they land on. assistant narrows any of the three to one assistant. A ranking answers with the strongest entries rather than a list to walk to the end of.
Google's figures answer a different question from everything else here: visibility counts the answers that named the brand, and this counts the people who then arrived. Search Console covers ordinary Google results — ctr is a rate between 0 and 1, and position counts from 1, so lower is better. AI traffic is Google Analytics sessions whose referrer was recognised as an assistant, which undercounts by design: an assistant that names the brand without linking it sends nobody, and somebody who reads an answer and then types the domain arrives as direct traffic. Its engagementRate is a rate between 0 and 1 too. Read a rise here as people acting on the answers, never as how often the brand is named. Mind the two senses of the phrase: the aiTraffic field on a prompt is the demand behind that question, while get_ai_traffic counts sessions that reached the site.
A project whose integration is not connected answers this with zeros and empty lists, which reads exactly like a site nobody visits. Call get_integrations_status before reporting a zero or an empty list as a finding: it says whether Search Console, Google Analytics, the bot tracker and the sitemap are connected, and a sync that is failing. Not connected means the figures say nothing about the site, never that it had no traffic; say the integration is missing and that it can be connected in the PromptEye app.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | Rank the period along this axis instead of reporting its totals. | |
| limit | No | How many entries to return, at most 200. Ignored without `by`. | |
| endDate | No | Last day to report on, inclusive. Defaults to today, and must be within 366 days of startDate. | |
| assistant | No | Only sessions from this AI assistant, matched without regard to case against the referrer: `openai` also matches chatgpt, `anthropic` matches claude, `google` matches gemini, and `microsoft` matches copilot and bing. | |
| projectId | Yes | The project to work on — its id from list_projects. Required on every call, so that parallel conversations never read or write each other's project. | |
| startDate | No | First day to report on, inclusive. Defaults to 30 days before today. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | Yes | The axis the period is ranked along. null = totals in summary. | |
| data | Yes | The ranking, most sessions first. null when by is not set. | |
| summary | Yes | The period's totals. null when by is set. | |
| assistant | Yes | The assistant the figures are narrowed to. null = all assistants. | |
| nextCursor | Yes | Pass as cursor to read the next page. null = this was the last page. |