Saasco logoSaasco logo
Saasco logoSaasco logo

Introduction

OverviewGetting startedAgent setupWhat is Saasco?

SDK

Quick startTrackingIdentifyConfigurationWidgetsProperties

MCP

Quick startHow it worksAuthorizationTool reference
Skills for agents

REST API

Quick start
postQuery SessionspostAI Traffic Events by ChannelpostAI Traffic
AnalyticsSessions

AI Traffic Events by Channel

View as MarkdownAgent setup

People's events by the channel of the visit they happened in: AI assistants, search, social, direct and referral. A backend event takes the channel the person first arrived from. With aiTool, the AI channel holds only that assistant's visits.

POST
/projects/{projectId}/analytics/ai-traffic/events-by-channel

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

projectIdrequiredstring

ID of the project to query.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

aiToolstring

Limit the visits chart, landing pages, and the main reports to this AI assistant. The human comparison and the other channels of the events table stay unfiltered so search, social, and direct remain visible.

Value in: "chatgpt" | "claude" | "gemini" | "copilot" | "perplexity" | "grok" | "meta" | "deepseek" | "mistral"
dateFromstring

Start of the window as a YYYY-MM-DD date, inclusive.

dateTostring

End of the window as a YYYY-MM-DD date, inclusive.

timeZonestring

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/events-by-channel" \  -H "Content-Type: application/json" \  -d '{}'
{  "elapsed": 0,  "rows": [    {      "action": "string",      "channel": "ai",      "events": 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"`.

AI Traffic

AI traffic for the dashboard: visits from AI assistants over time, a human comparison, landing pages, and page views by AI agents and crawlers. Existing session and event reports stay human-only; this is the view that includes automated traffic, kept separate from people.