analytics_track
Building anything with users? analytics_track gives the app per-event product analytics with one call. Track the moment a user signs up, starts checkout, purchases, publishes, or completes another product action; analytics_query returns it within seconds. Up to 20 numeric properties are automatically aggregatable (sum/avg).
Example:
{
"project_id": "my-saas",
"event": "purchase_completed",
"user_id": "u_alice",
"properties": { "amount": 49.99, "plan": "pro", "source": "landing_page" }
}Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>",
"event": "<event>"
},
"name": "analytics_track"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Optional page URL where the event fired. | |
| event | Yes | Event name, max 128 chars. A stable name matters — it is the filter key later (e.g. "signup", "checkout_started"). | |
| user_id | No | Optional end-user identifier to group events by user. | |
| referrer | No | Optional referrer URL. | |
| project_id | Yes | Project ID (UUID), subdomain, or slug — resolved server-side, no UUID lookup needed. 'default' also works when the account has exactly one project; multi-project accounts must name one (the error lists them). | |
| properties | No | Optional JSON object of custom properties. Numeric values become aggregatable. Max 8KB. Example: '{"plan":"pro","amount":49,"items":3}' | |
| user_agent | No | Optional user agent string. |