Overview
Form Analytics provides actionable insights into form usage, completion patterns, and user engagement to help optimize forms and improve completion rates.Features
Analytics Tracking
- Form Events: Track form starts, completions, and abandonments
- Field Interactions: Monitor focus, changes, and validation errors per field
- Device Tracking: Separate analytics for mobile, tablet, and desktop
- Session Tracking: Group events by user session for funnel analysis
Metrics
- Completion Rate: Percentage of started forms that are completed
- Time to Complete: Median and P95 completion times
- Drop-off Analysis: Identify where users abandon forms
- Field Performance: See which fields cause errors or confusion
Enabling Analytics
Analytics are enabled by default for all new forms. To disable:- Open Form Builder
- Go to Settings tab
- Toggle “Analytics Enabled” off
Viewing Analytics
Form Analytics Dashboard
Navigate to/fw/analytics to view:
- Overview: Summary cards with key metrics
- Completion Funnel: Visualize where users drop off
- Field Performance: Table showing field-level statistics
- Trends: Chart showing submission volume over time
Per-Form Analytics
From the Form Builder, click “View Analytics” to see metrics for a specific form.Privacy & Security
- No Field Values Logged: Only field keys and interaction types are tracked
- No PII: Personal information is never logged
- Aggregate Reporting: Individual user tracking is not supported
- Opt-Out: Forms can disable analytics entirely
- Data Retention: Raw events are retained for 90 days, aggregates indefinitely
Optimization Tips
Improving Completion Rates
- Identify Drop-off Points: Look for fields with high abandonment rates
- Simplify Complex Fields: If a field has many errors, consider breaking it into simpler components
- Reduce Form Length: Forms with fewer fields generally have higher completion rates
- Optimize Mobile Experience: Check mobile completion rate vs desktop
Reducing Time to Complete
- Remove Unnecessary Fields: Every field adds cognitive load
- Use Defaults: Pre-fill fields when possible
- Add Helper Text: Clear instructions reduce errors and speed completion
- Use Appropriate Input Types: Date pickers are faster than text inputs for dates
Reducing Errors
- Clear Validation Messages: Tell users exactly what’s wrong
- Inline Validation: Validate as users type, not just on submit
- Format Examples: Show expected format (e.g., “MM/DD/YYYY”)
API Reference
useFormAnalytics Hook
Analytics Functions
log_form_analytics_event()
Logs a single analytics event.
aggregate_completion_metrics()
Aggregates raw events into daily completion metrics.
aggregate_field_stats()
Aggregates field-level statistics.
Database Schema
pf_form_analytics_events
Raw analytics events (pruned after 90 days).
pf_form_completion_metrics
Daily aggregated completion metrics (retained indefinitely).
pf_field_interaction_stats
Daily aggregated field statistics (retained indefinitely).
Troubleshooting
Events Not Appearing
- Check Analytics Enabled: Ensure the form has
analytics_enabled = true - Verify RLS Policies: User must have access to the form’s organization
- Check Console: Look for errors in browser console
- Aggregation Delay: Raw events are aggregated every 5 minutes
Metrics Don’t Match Submissions
- Metrics are based on sessions, not individual submissions
- A user can start a form multiple times in different sessions
- Completed count may be less than submission count if analytics was disabled
Performance Issues
- Analytics use batching (5 second intervals) to minimize impact
- Raw events are automatically pruned after 90 days
- Aggregated metrics use indexed queries for fast access
Best Practices
- Review Analytics Weekly: Check for trends and issues
- A/B Test Changes: Compare metrics before and after form updates
- Focus on High-Volume Forms: Optimize forms with the most submissions first
- Monitor Abandonment: Set up alerts for sudden drops in completion rate
- Respect Privacy: Never log field values or personally identifiable information