What it does

Details for one event. Optionally break down by a custom property. Volume metric — counts include AI-mediated human browsing (ai_user_action).

Example prompts

Ask:

"Show me details for the signup_started event on mysite.com last 30 days."
"How is the spring_launch_clicked event split by referrer?"
"For the demo_booked event, group by source."

A typical response, grouped by referrer_host:

Event signup_started, last 30 days, grouped by referrer_host:

  news.ycombinator.com    72 events
  twitter.com             58 events
  reddit.com              41 events
  (direct)                34 events
  dev.to                  22 events
  google.com              19 events
  perplexity.ai            8 events
  duckduckgo.com           6 events

Returns event counts segmented by a property of your choice. The group_by_property argument can be any property you attach when firing the event (e.g. plan, variant, source) plus the built-in dimensions referrer_host, utm_source, browser, device_type, country.

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?.event('signup_started', {
  plan: 'pro',
  source: 'pricing_cta'
});

Or directly from your backend, hitting the ingest endpoint:

POST https://t.mcp-analytics.com/event
Content-Type: application/json
{
  "site_id": "abc12345",
  "event_name": "demo_booked",
  "properties": { "rep": "alex", "deal_size": "10k" }
}

A first-party Ruby gem and npm wrapper around this endpoint are on the Pro roadmap.

List all event names with list_events first if you're not sure what's being tracked.

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