llms.txt Content
# Convalytics
> Full-stack analytics for Convex apps. No account needed, agent sets up everything, human claims later.
Full product manual: https://convalytics.dev/llms-full.txt
OpenAPI spec: https://convalytics.dev/openapi.json
Pricing: https://convalytics.dev/pricing.md
## How it works
1. Run `npx convalytics init` — no write key needed, auto-provisions a project
2. CLI returns a claim URL — share it with the human to connect to their account
3. Agent reads convex/schema.ts and all mutations/actions to understand the data model
4. Agent proposes a tracking plan (event names, files, functions, props)
5. User approves → agent instruments the approved events
6. Run `npx convalytics verify` to confirm
Events flow immediately — no need to wait for claiming.
## Zero-config setup
npx convalytics init
Auto-provisions a project, installs the SDK, patches config, sets the env var,
adds the browser script tag, and installs the agent skill file.
If the user already has a write key:
npx convalytics init WRITE_KEY
## Event discovery
After install, read convex/schema.ts and every file in convex/. For each mutation/action
that represents a user action, propose an event:
- Event name: snake_case noun_verb (user_signed_up, payment_succeeded)
- File and function where it should be added
- Props to attach from existing args/data
Aim for 5-15 events covering the core user journey. Skip internal/admin functions.
Wait for user approval before instrumenting.
## Tracking
import { analytics } from "./analytics";
const identity = await ctx.auth.getUserIdentity();
await analytics.track(ctx, {
name: "user_signed_up",
userId: String(userId),
userEmail: identity?.email, // first-class field — NOT in props
props: { plan: "pro" },
});
## Server-side track() API
await analytics.track(ctx, {
name: string, // required
userId: string, // required — stable user ID
userEmail?: string, // o
OpenAPI Spec (preview)
{
"openapi": "3.1.0",
"info": {
"title": "Convalytics API",
"version": "1.0.0",
"description": "Public HTTP API for Convalytics: free web and product analytics for Convex apps. Authenticated via a write key (public identifier, safe to ship in client code).",
"contact": {
"url": "https://convalytics.dev"
},
"license": {
"name": "MIT",
"url": "https://github.com/Dan-Cleary/convalytics/blob/main/LICENSE.txt"
}
},
"servers": [
{
"url":