This chapter covers the core features and capabilities of Form Analytics.
# Generate sample analytics data
python src/form_analytics.py --generate checkout --sessions 50
# Analyze a form's events
python src/form_analytics.py --analyze checkout
# Output as JSON
python src/form_analytics.py --analyze checkout --json
# Run the built-in demo
python src/form_analytics.py --demoFollow this guide to get Form Analytics up and running in your environment.
| Flag | Description |
|---|---|
--analyze FORM_ID | Analyze events for a specific form |
--generate FORM_ID | Generate sample event data |
--sessions N | Number of sessions to generate (default: 20) |
--events-dir DIR | Directory containing event JSONL files (default: events/) |
--json | Output analytics as JSON instead of formatted text |
--demo | Generate sample data and run analysis |
Events are stored as JSONL (one JSON object per line):
{"event": "form_view", "form_id": "checkout", "session_id": "abc123", "timestamp": "2026-03-14T10:00:00Z"}
{"event": "form_start", "form_id": "checkout", "session_id": "abc123", "timestamp": "2026-03-14T10:00:02Z"}
{"event": "field_focus", "form_id": "checkout", "session_id": "abc123", "field": "email", "timestamp": "2026-03-14T10:00:03Z"}
{"event": "field_blur", "form_id": "checkout", "session_id": "abc123", "field": "email", "timestamp": "2026-03-14T10:00:08Z"}
{"event": "form_submit", "form_id": "checkout", "session_id": "abc123", "timestamp": "2026-03-14T10:00:30Z"}
{"event": "form_success", "form_id": "checkout", "session_id": "abc123", "timestamp": "2026-03-14T10:00:31Z"}| Event | Description |
|---|---|
form_view | User loaded the page containing the form |
form_start | User interacted with the form for the first time |
field_focus | User focused on a specific field |
field_blur | User left a specific field |
field_change | User changed a field's value |
field_error | A field validation error occurred |
step_complete | User completed a step (multi-step forms) |
form_submit | User clicked the submit button |
form_abandon | User left without completing the form |
form_success | Form was submitted successfully |
form_error | Form submission failed |
Get the full Form Analytics and unlock everything.
Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.
Access all interactive tools with complete data, all workload profiles, and the full scenario library.
Downloadable source code, configuration files, and working examples from every chapter.
Free updates for life. Every new chapter, tool, and improvement included.