Analytics (Local / Demo Tracking)
LaunchKit Pro tracks safe usage events locally — no Google Analytics, Mixpanel, or other paid service required.
Environment variables
Backend:
env
ANALYTICS_ENABLED=true
ANALYTICS_PROVIDER=LOCAL
ANALYTICS_DEMO_TRACKING_ENABLED=true
ANALYTICS_RETENTION_DAYS=90Frontend:
env
NEXT_PUBLIC_ANALYTICS_ENABLED=true
NEXT_PUBLIC_ANALYTICS_PROVIDER=LOCALSet ANALYTICS_ENABLED=false or NEXT_PUBLIC_ANALYTICS_ENABLED=false for a complete no-op. The frontend client fails silently if the API is unreachable.
Tracked events
| Event | When |
|---|---|
page_view | Dashboard or admin route change |
demo_login | Demo account sign-in (backend) |
demo_restricted_action | Demo restriction warning shown |
ai_generate_clicked | AI generate action |
billing_plan_selected | Plan checkout started |
file_upload_attempt | File upload started |
webhook_test_clicked | Webhook test button |
search_used | Global search query executed |
No PII, IP addresses (unless policy-safe and truncated), passwords, or secrets are stored.
API
| Endpoint | Access | Description |
|---|---|---|
POST /analytics/events | Public (optional JWT) | Record a safe event |
GET /admin/analytics/summary | Admin | Totals, demo events, top modules |
Admin UI
Open /admin/analytics for:
- Total and demo event counts
- Last 24h / 7d totals
- Top event types and dashboard modules
- Recent events table (safe fields only)