AI Traffic
AI traffic for the dashboard: visits from AI assistants over time, a human comparison, landing pages, events by channel, and automated agents and crawlers. Existing session and event reports stay human-only; this is the view that includes automated traffic, kept separate from people.
Authorization
Authorization In: header
Path Parameters
ID of the project to query.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Limit the visits chart, landing pages, and the main reports to this AI assistant. The human comparison and the channel table stay unfiltered so search, social, and direct remain visible.
Start of the window as a YYYY-MM-DD date, inclusive.
End of the window as a YYYY-MM-DD date, inclusive.
IANA timezone for calendar dates. The dashboard sends the signed-in user's local zone.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/projects/string/analytics/ai-traffic" \ -H "Content-Type: application/json" \ -d '{}'{ "automated": [ { "company": "string", "kind": "agent", "sessions": 0, "verification": "verified" } ], "browsers": [ { "browser": "string", "sessions": 0 } ], "buckets": [ "string" ], "byTool": [ { "id": "chatgpt", "sessions": [ 0 ] } ], "comparison": { "ai": [ 0 ], "human": [ 0 ] }, "conversions": [ { "action": "string", "channel": "ai", "events": 0, "users": 0 } ], "countries": [ { "countryCode": "string", "sessions": 0 } ], "landingPages": [ { "pathname": "string", "sessions": 0 } ], "sources": [ { "id": "chatgpt", "sessions": 0 } ], "statistics": { "elapsed": 0 }}Query Sessions
The session-level counterpart to Query Events, grouping visits rather than individual events. Adds session-only metrics (`pageViews`, `bounceRate`, `avgSessionSec`) that cannot be derived from the event stream. Use this for traffic and engagement reporting, and Query Events for anything keyed on a specific action. Page path is not a session dimension — a visit spans many pages. Top pages is Query Events with `groupBy: "pathname"` and `action: "Page View"`.
Get Funnel Steps
Runs a sequential funnel over the named events and returns the number of users reaching each step. Order is significant: a user counts at step N only if they fired steps 1 through N in the given order within the window. Users are counted by anonymous ID, so the same person on two devices counts twice.