[ CONVEX COMPONENT · STABLE · MIT ]
@vllnt/convex-analytics
Generic, configurable analytics component for Convex — any event, any dimension, any domain; rollup-on-write with funnels, retention, uniques
STABLE 0.1.0 · 2 GitHub stars
Package details
Install
The untagged install gets the latest stable version (0.1.0). The canary tag tracks main (0.1.1-canary.46dc78e).
pnpm add @vllnt/convex-analytics
pnpm add @vllnt/convex-analytics@canaryRegister the component
Add it to your app’s convex/convex.config.ts, then run npx convex dev to generate the references.
import { defineApp } from "convex/server";
import analytics from "@vllnt/convex-analytics/convex.config";
const app = defineApp();
app.use(analytics);
export default app;Use it
Usage, options and examples are in the package README.
Downloads
- Last 7 days
- 51
- Since first publish
- 7,887
Downloads per week since 15 June 2026, oldest on the left. Weeks count back from 23 November 2026, so the first one may be shorter than seven days.
51 downloads in the last 7 days. 7,887 downloads since 15 June 2026. Source: npm, counted through 23 November 2026.
Show downloads per week as a table
| Week | Downloads |
|---|---|
| 15 June 2026 | 409 |
| 16 June 2026 to 22 June 2026 | 352 |
| 23 June 2026 to 29 June 2026 | 612 |
| 30 June 2026 to 6 July 2026 | 465 |
| 7 July 2026 to 13 July 2026 | 171 |
| 14 July 2026 to 20 July 2026 | 265 |
| 21 July 2026 to 27 July 2026 | 29 |
| 28 July 2026 to 3 August 2026 | 29 |
| 4 August 2026 to 10 August 2026 | 379 |
| 11 August 2026 to 17 August 2026 | 232 |
| 18 August 2026 to 24 August 2026 | 28 |
| 25 August 2026 to 31 August 2026 | 582 |
| 1 September 2026 to 7 September 2026 | 673 |
| 8 September 2026 to 14 September 2026 | 1,617 |
| 15 September 2026 to 21 September 2026 | 586 |
| 22 September 2026 to 28 September 2026 | 430 |
| 29 September 2026 to 5 October 2026 | 168 |
| 6 October 2026 to 12 October 2026 | 43 |
| 13 October 2026 to 19 October 2026 | 63 |
| 20 October 2026 to 26 October 2026 | 88 |
| 27 October 2026 to 2 November 2026 | 328 |
| 3 November 2026 to 9 November 2026 | 224 |
| 10 November 2026 to 16 November 2026 | 63 |
| 17 November 2026 to 23 November 2026 | 51 |
Release history
Every release on a timeline, oldest on the left. A tall mark with its version is a stable release; a short mark is a canary build. The time axis is the one of the downloads chart, so a release stands above the week it shipped in.
1 stable release and 10 canary builds since 15 June 2026. Latest stable: 0.1.0 on 1 September 2026.
Show every release as a table
| Version | Kind | Published |
|---|---|---|
| 0.1.1-canary.46dc78e | canary | 31 October 2026 |
| 0.1.0 | stable | 1 September 2026 |
| 0.1.0-canary.a5028f9 | canary | 1 September 2026 |
| 0.1.0-canary.2b9f918 | canary | 31 August 2026 |
| 0.1.0-canary.67f5cc1 | canary | 31 August 2026 |
| 0.1.0-canary.e99d8e6 | canary | 16 June 2026 |
| 0.1.0-canary.55667b0 | canary | 16 June 2026 |
| 0.1.0-canary.332b387 | canary | 15 June 2026 |
| 0.1.0-canary.a68a60c | canary | 15 June 2026 |
| 0.1.0-canary.531be7c | canary | 15 June 2026 |
| 0.1.0-canary.e8e8f2b | canary | 15 June 2026 |
Changelog
The newest stable releases of @vllnt/convex-analytics, with the notes from its changelog.
0.1.0
First stable release (the earlier
0.1.0-canary.*builds were published from June 2026). The component is a generic, domain-neutral analytics core — the earlier web-locked draft was replaced before any public release, so the generic rebuild is folded into this single0.1.0entry.Added
- Generic core — free-string event
name, opaquesubjectRef/sessionRef, host-typed scalarprops(nov.any()), and host-declareddimensions. Zero hardcoded domain. - Rollup-on-write — counts are incremented as events land, so
metric/top/timeseriesread in O(1) (backed by@convex-dev/aggregate+@convex-dev/sharded-counter). - Verb set —
track,metric,top,timeseries,uniques,funnel,retention,distribution,list,configure; all generic across any event / dimension / domain. - Distribution —
distribution(name, measure, { buckets })is a histogram over a numericpropsmeasure (declared upper-bound bins + overflow, withcount/sum), computed from raw events in range (index-backed, bounded). - Granularities —
minute/hour/dayrollup buckets (minuteopt-in for short live windows), end-to-end throughtrack, the read verbs, and the REST routes. - Config surface —
scope,dimensions,granularities,retentionDays,sampleRate,sessionIdleMs,propsValidator; sensible defaults, zero config required. Config is applied (not ignored) —dimensions/granularities/sampleRateper call, retention / sampling / idle persisted for the crons viaconfigure. - Opaque
scopepartition on every table, mutation, and query for multi-tenant isolation. - Per-session rate limiting, dedupe, and sampling built into
track. - Schema — five sandboxed tables (events, rollups, subjects, sessions, config); raw events TTL-pruned, rollups kept forever.
- Crons — daily
prune(raw-event TTL) andcloseSessions(idle close), idempotent; plus abackfillmutation to re-derive rollups. - Web preset — opt-in
@vllnt/convex-analytics/web:webDimensions,parseUserAgent,geoFromHeaders,trackPageview. The generic core carries no web fields. - React hooks — optional
@vllnt/convex-analytics/react:useMetric,useTop,useTimeseries,useUniquesover the host's re-exported aggregate query refs. - REST API — five generic
x-api-key-authed routes (/track, /metric, /top, /timeseries, /uniques), timing-safe key comparison. - Testing —
@vllnt/convex-analytics/testexport for convex-test, registering the child components sotrackis exercised end-to-end.
Fixed (since the first canary)
- Register automatic session-closing and event-retention cron jobs, including zero-config scopes.
- Seek expired events by
(scope, ts), page scope discovery, and bound/reschedule maintenance at 500 rows per transaction. - Preserve valid rollups when backfill input exceeds its supported 50,000-event bound instead of deleting them and silently rebuilding from truncated input.
- Count funnel subjects through later valid repeated steps, isolate rate limits and counters with
collision-safe tuple keys, and reopen sessions without moving
lastTsbackward.
Changed (since the first canary)
- Treat Convex
_generatedoutput as CLI-owned, exclude it from formatting, and expose a dedicated codegen script. - Adopt the stable v2 vllnt toolchain, TypeScript 7 validation, Convex 1.45,
convex-test0.0.56, and the latest compatible direct dependencies. - Use explicit table names for Convex database patch/delete operations.
- Generic core — free-string event
Licence
Released under the MIT licence. The full text is in the source repository.
[ PACKAGE ]
- Stable
- 0.1.0
- Canary
- 0.1.1-canary.46dc78e
- GitHub stars
- 2 GitHub stars
- Licence
- MIT
- Issues
- Open an issue