Event User Leaderboard
rybbit_get_event_user_leaderboardRanks top users for a specific event, showing who triggered it most often. Answers questions like who sent the most messages or clicks in a time range.
Instructions
Returns the top users for a given event (e.g. who triggered the most message_sent, who clicked the most ad_click). Groups by identified_user_id + traits.username. Answers questions like 'who sent the most messages today'. By default only identified users are ranked; when that leaves events out, note says how many and how to include them. Events are read in pages of 1000, roughly 0.5 s each: the default maxScan of 5000 takes about 3 s, 50000 about 20 s.
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": {
"siteId": "<siteId>",
"eventName": "<eventName>"
},
"name": "rybbit_get_event_user_leaderboard"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topN | No | Top N users (default 25). | |
| siteId | Yes | Site ID (numeric ID or domain identifier) | |
| endDate | No | End date in ISO format (YYYY-MM-DD) | |
| filters | No | Array of filters. Example: [{parameter:'browser',type:'equals',value:['Chrome']},{parameter:'country',type:'equals',value:['US','DE']}] | |
| maxScan | No | Maximum events to read, newest first (default 5000). | |
| timeZone | No | IANA timezone (e.g., Europe/Prague). Default: UTC | |
| eventName | Yes | Event name to rank users by (e.g. 'message_sent', 'signup', 'ad_click'). | |
| startDate | No | Start date in ISO format (YYYY-MM-DD) | |
| identifiedOnly | No | If true (default), exclude anonymous users without identified_user_id. Set false on sites that do not identify users. | |
| pastMinutesEnd | No | Alternative to dates: minutes ago end (default 0 = now) | |
| pastMinutesStart | No | Alternative to dates: minutes ago start (e.g., 60 = last hour) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Caveat about this response, e.g. how many rows were returned and how to get the rest | |
| groups | Yes | Grouped event counts, sorted by count DESC by default | |
| hasMore | Yes | True if scan was capped by maxScan and more data exists | |
| scanned | Yes | Total events scanned across pagination | |
| hitCount | Yes | Events matching eventName / property filters | |
| truncated | No | True when rows were dropped to keep the response under the size cap | |
| windowEnd | No | ||
| windowStart | No |