Product analytics is coming soon. It is available on plans with product analytics. Until it
launches, a project can use it only when early access is on for the project. Other projects get
403 with the code coming_soon (or plan_upgrade_required on a plan without product
analytics). Call analytics.status to see the state of a project.Operations
Reads take
period (24h, 7d, 30d, or 90d; default 7d) or from and to (ISO 8601, at
most 90 days), and an optional environment. The overview compares each number with the previous
period of the same length. Its breakdowns have the top values of page, entry_page,
exit_page, referrer, channel, utm_source, utm_medium, utm_campaign, country,
device, browser, and os. For channel, entry_page, and exit_page, the pageviews field
of a row counts sessions. Call analytics.breakdown with breakdown=<key> and limit (1 to 100,
default 100) to get more rows of one breakdown.
Filters
The overview, events, breakdown, live, properties, and goal conversion reads, the funnel run, and the funnel drop-off errors accept filters. A filter isdimension:value:
Values match exactly. A referrer is a host name, for example
news.ycombinator.com. A country is a
two-letter code. A channel is one of Direct, Search, Social, Referral, Paid, Email, or
Campaign. Filters on the same dimension match any of their values; filters on different
dimensions must all match. Send at most 10. In a GET request, repeat the filter query
parameter:
POST body, send "filters": ["channel:Search", "country:DE"]. A filter that keeps whole
sessions keeps every event of those sessions, so session counts, bounce rate, and funnels stay
correct.
How numbers are counted
- Page views and event counts are exact: each event has an ID, and an event that arrives twice counts once.
- Visitors are approximate unique anonymous IDs.
- Sessions use the browser session ID that errors and session replays also use. A bounce is a session with one page view.
- People in funnels: a visitor who called
identifycounts as the same person as every other visitor with that user ID.
Funnels
A step is a page view by path or an event by name:people, conversion_from_start, conversion_from_previous (percent), and
dropped (people who did not reach the next step). median_seconds_from_previous and
p90_seconds_from_previous are the median and 90th percentile time from the previous step, for the
people who reached the step; they are null on the first step and when no one reached the step.
Send funnel_id instead of steps to run a saved funnel, and filters to run the funnel on part
of your traffic.
To see what went wrong for people who dropped after a step, send the same steps to
analytics.funnelDropoffErrors with step_index (0-based). The response lists the error groups in
their sessions, the number of sessions with each error, sample session IDs for session replay, and
the matching issue.
Goals
A goal is an event or a page that counts as a conversion. A project can have at most 50 goals; creating one more returns409.
- An event goal needs
name(1 to 120 characters) andevent_name(1 to 200 characters).property_key(letters, digits,_,$,.,-; at most 64 characters) andproperty_value(1 to 1024 characters) are optional, and you set them together. - A page goal needs
nameandpath_pattern: a path that starts with/, where*matches any characters. Other characters match only themselves.
analytics.goalConversions returns, for each goal, conversions (approximate visitors who
completed the goal), completions (matching events), and conversion_rate (percent of all
visitors in the range), with the total visitors. It accepts the range and filters.
Live visitors, installation check, and properties
analytics.livereturnsvisitors,pageviews, andtop_pagesfor the last 5 minutes. It acceptsenvironmentand filters; it has no range.analytics.installationshows whether events arrive. For the last 24 hours it returns event counts by kind,receiving, and the page hosts and environments that sent events.last_event_atis the newest event in the last 90 days, ornull.analytics.properties?event=<name>returns the property keys of that event with their event counts and their most common values. It accepts the range and filters.
AI crawler traffic
analytics.aiCrawlers reads the user_agent.original attribute of server spans. Each crawler row
has a confidence:
user_agent: only the user agent matched. Anyone can send that user agent.verified: every client address is in the operator’s published IP ranges.mismatch: some client address is outside those ranges.
user_agent. To check addresses, the span must carry the
client.address attribute.
CLI and MCP
--filter dimension:value for more than one filter; the overview, events, breakdown, live,
properties, goal conversions, funnel run, and drop-off errors commands accept it.
In MCP Code Mode, call search("analytics") before you execute an operation. Send filters of a
read as a list, for example query: { filter: ["channel:Search", "country:DE"] }.
Identity export and deletion
Pass exactly onedistinct_id or account_id. Export responses contain at most 500 events and a next_cursor; send that cursor to continue. Deletion is safe to retry and records an organization audit event. These privacy operations are intentionally hidden from MCP Code Mode.