events_count
Count CUSTOM PRODUCT events for a specific project in a time window, optionally filtered to one event name and/or one user. Custom events are emitted by explicit analytics.track() calls in app code (signup_completed, payment_succeeded, etc.). This does NOT count page views — use pageviews_count or weekly_digest for those. Returns count, unique visitors, and a truncated flag if the scan hit the maximum scan size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional event name to filter by (e.g. 'signup_completed'). If omitted, counts all custom events in the window. Do NOT pass 'page_view' here — page views are in a separate table. | |
| user | No | Optional. Filter to one visitor/user. Accepts userEmail (case-insensitive) or visitorId (exact). For the full per-user snapshot prefer user_activity. | |
| since | No | Start of window as unix milliseconds. Defaults to 7 days ago. | |
| until | No | End of window as unix milliseconds. Defaults to now. | |
| project | Yes | Project name (case-insensitive, e.g. 'slopbench') or project id from list_projects. |