What it does
Details for one event. Without group_by_property the response lists the event's observed custom properties in `properties` (name, occurrences, distinct_values — ordered by occurrences, capped at 50), so a follow-up call can pick a real property name. With group_by_property the response is `items` with the top 100 property values by count (a high-cardinality property is truncated at 100 — the counts then cover those rows only, not the event total); if that property was not observed on this event in the period, `items` is empty and the response adds `note` plus `observed_properties` (the names the event actually carries) instead of leaving an empty list ambiguous. An unobserved property is not proof it does not exist — an earlier period may still carry it. Volume metric — counts include AI-mediated human browsing (ai_user_action). `sessions_with_event` counts browser sessions only, since server-side-ingested rows carry no session, so it can be 0 while `total_count` is not.
Example prompts
Ask:
"Show me details for the signup_started event on mysite.com last 30 days."
"How is the signup_started event split by plan?"
"For the demo_booked event, group by the rep property."
A typical response, grouped by the custom plan property:
Event signup_started, last 30 days, grouped by plan:
free 182 events
pro 64 events
(not set) 14 events
Returns event counts segmented by a property of your choice. The
group_by_property argument slices by custom event
properties only: any key you attach when firing the event
(e.g. plan, variant, source).
For built-in dimensions like browser or device type, use
breakdown instead;
for referrers and UTM tags, use
top_referrers and
top_sources.
Volume metric: counts include AI-mediated human browsing if the event was fired from a Claude/ChatGPT-fetched page.
To fire custom events from your JS:
window.mcpa('track', 'signup_started', {
plan: 'pro',
source: 'pricing_cta'
});
Custom events are a client-side thing: they fire from the visitor's
browser via the snippet above. There is also a server-side ingest
endpoint (POST /ingest/server, authenticated with your
site's ingest secret from /settings), but it
exists to capture what the JS snippet can't see: AI crawlers and bots
that never execute JavaScript. Human traffic is deliberately dropped
on that path so the JS beacon and the middleware don't double-count.
Don't route human conversion events through it.
List all event names with
list_events first if
you're not sure what's being tracked — its response also includes each
event's observed property names, so you don't have to guess what to
group by. If you pass a property the event doesn't carry, the response
says so explicitly (with the properties it does carry) instead of
returning a bare empty list.
Arguments
| Name | Type | Required | Description / Default |
|---|---|---|---|
site_id |
string | required | Site identifier from list_sites (8-character base32, e.g. 'wjxayhdd'). |
event_name |
string | required | Custom event name to drill into (case-sensitive). Use list_events to discover available event names. 'pageview' is the auto-tracked default; anything else came from a mcpa('track', name, props) call in the customer's site code. |
period |
string | optional |
Time window. Keywords: today, yesterday, last_7_days, last_30_days, last_90_days, last_12_months. Or a custom date range YYYY-MM-DD..YYYY-MM-DD (inclusive).
default: last_7_days
|
group_by_property |
string | optional | Optional name of a custom property to slice the event by. Example: if events were tracked with mcpa('track', 'signup', {plan: 'pro'}), pass 'plan' here to see counts per plan value. |
How to call it directly
If you're integrating from your own code rather than a chat client, this is the JSON-RPC payload:
curl -X POST https://mcp-analytics.com/mcp \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "event_details",
"arguments": {
"site_id": "abc12345",
"event_name": "signup_started"
}
}
}'
Token comes from /settings after you sign up. Replace any required arguments above.
Related tools
top_user_agents: Top User-Agent strings with their traffic_class.top_languages: Top browser languages (de-DE, en-US, ...) of visitors.engagement_overview: Real reading time + scroll depth from the engagement beacon (fired on pagehide).compare_periods: Compare a metric between two periods.get_started_guide: Markdown walkthrough of the mcp-analytics workflow: adding sites, installing the tracker, querying analytics, custom events.