Traffic from AI assistants (GA4)
get_ai_trafficReferral sessions from AI assistants (chatgpt.com, perplexity.ai, gemini, copilot, claude…) according to GA4 (dimension ai_source): per source (sessions, activeUsers, engagedSessions, keyEvents) for the period and the comparison, totals and daily series. site also accepts "all" for the whole account. A property without GA4 returns the error no_data with the panel URL where GA4 is connected (site="all" returns hasGa4=false and a setup note instead). Limitation: Search Console does not separate clicks from AI Overviews / AI Mode; only referral traffic is measurable. / Sessões vindas de IAs segundo o GA4.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Window length in days (default 28). Ignored when startDate and endDate are both given. / Janela em dias. | |
| site | Yes | Property (as in other tools) or "all" for the whole account. | |
| compare | No | Comparison: previous (default) = same-length window immediately before; year = same dates one year earlier; none. / Comparação. | |
| endDate | No | End yyyy-mm-dd. Default: last synced date of the property (Search Console lags ~3 days; never "today"). Every response states the period used. / Fim; padrão = última data sincronizada. | |
| startDate | No | Start yyyy-mm-dd. Default: endDate − (days − 1). |