Python event tracking script for custom events, user actions, and page views. Stores to JSON or SQLite with querying and aggregation built in. Runs on Python 3.10+ stdlib only — no pip installs needed.
Track custom events with name, category, and arbitrary properties
Dual storage backends: JSON files or SQLite database
Built-in aggregation: count, group-by, and time-series queries
Event filtering by date range, category, and custom properties
Automatic timestamping with ISO 8601 format
Bulk event import from JSON files
Summary reports with top events and activity timelines
CLI interface for tracking and querying from the terminal
# Track a custom event
python event_tracker.py track --name "signup" --category "user" --props '{"plan": "pro"}'
# Query events by date range
python event_tracker.py query --from 2026-01-01 --to 2026-03-14
# Generate event summary
python event_tracker.py summary --backend sqlite --db events.db