Abandoned forms: see where users give up
Track abandoned forms by combining custom milestone events with masked session replay frames that photograph exactly where visitors drop off.
On this page 9 sections
- How does form abandonment tracking work?
- Setting up your project for analytics and replay
- Protecting sensitive user data in form fields
- Emitting milestone events across the form lifecycle
- Finding abandoned forms in the CLI and API
- Inspecting visual frames of abandoned forms
- Comparing event tracking against replay frames
- Monitoring form health with Mission Control
- FAQ
You track form abandonment by pairing custom analytics events at each form step with session replay frames that capture the exact moment a user stops typing and leaves. With thelastapi, you do not need complex event wiring on every single input field. The built-in session recorder detects abandoned forms automatically and lets you pull rendered visual frames of what the user saw right before giving up.
When people drop out of a signup flow or checkout, numbers in a spreadsheet tell you the drop-off percentage, but they cannot tell you why. Seeing the actual page state—whether an inline validation error triggered, an input rejected a phone number, or a layout shifted—makes the difference between guessing and fixing the problem.
How does form abandonment tracking work?
Traditional form tracking relies on adding JavaScript listeners to every blur, focus, or change event across all fields. This produces thousands of noisy events in your database and still fails to show you the visitor's screen.
thelastapi handles form abandonment at two levels:
- High-level step tracking with custom events. You record clean lifecycle markers like opening a form, completing a step, or encountering a submission failure.
- Visual context through session replay and frames. When you enable the
replayresource, the browser records user interactions with automatic masking. The replay engine identifies abandoned forms as specific lifecycle moments. You can inspect the recording directly or extract rendered static frames using the API and CLI.
Because thelastapi includes Analytics and replay directly in the platform, you get both aggregate metrics and session-level visibility with a single script tag.
Setting up your project for analytics and replay
If you are starting a new project, you can include analytics and replay from the command line:
vibiz init "My SaaS" --resources analytics,replayIf you already have a running project, add the replay resource to your existing setup:
vibiz add replayNext, add the snippet to your HTML head. On thelastapi hosting, the environment provides NEXT_PUBLIC_VIBIZ_ANALYTICS_KEY and NEXT_PUBLIC_VIBIZ_ANALYTICS_URL. You can also read the exact script snippet with the CLI:
vibiz analytics snippetPaste the snippet before the closing </head> tag:
<script defer src="https://thelastapi.dev/v1/script.js" data-key="vz_pk_live_123"></script>If your application runs on an external host, you can still use the same setup. Initialize a project with --resources analytics, add your external domain with vibiz domains add example.com --elsewhere, and install the tag. The analytics engine drops events coming from unapproved domains to prevent spam.
Protecting sensitive user data in form fields
Tracking forms requires strict privacy rules. You should never store cleartext passwords, payment cards, or authentication codes in session recordings.
thelastapi handles privacy directly in the browser before any data leaves the user's device:
- Pass-through text: Standard input fields are shown as typed so you can see confusing inputs or validation failures.
- Always excluded: Password fields, credit card fields, and one-time-code fields are never recorded under any circumstances.
- Pattern masking: Any credit card number or IBAN typed into an ordinary text field is masked automatically in the browser.
- PII masking: Page text that resembles an email address, phone number, card, or IBAN is masked before upload.
When you have custom fields that hold sensitive customer information, you can explicitly instruct the recorder to redact them using HTML attributes:
<form id="onboarding-form">
<!-- Standard field: visible in replay to spot formatting errors -->
<label for="company">Company Name</label>
<input type="text" id="company" name="company" />
<!-- Sensitive field: blocked entirely from recording -->
<label for="tax-id">Tax ID / SSN</label>
<input type="text" id="tax-id" name="tax_id" data-vibiz-sensitive />
<!-- Mask an entire region containing personal data -->
<div data-vibiz-mask>
<p>Billing Contact: Jane Doe</p>
<p>Direct Extension: 404</p>
</div>
<button type="submit">Complete Setup</button>
</form>For teams with strict compliance needs in regions like the EU or UK, you can set require_consent: true in your replay configuration via PATCH /v1/projects/:id/resources/replay. When enabled, recording remains paused until you explicitly trigger vibiz('replay', 'start') after receiving user consent. To learn more about masking rules, see our guide on session replay for a small site.
Emitting milestone events across the form lifecycle
While replays show visual context, custom events give you the conversion rates and aggregate counts. Keep event names simple and use properties to pass details like step numbers or form IDs.
In the browser, use the global vibiz function:
// When the visitor starts typing in the form
vibiz('event', 'Form Started', { form_id: 'signup_v2' });
// When the visitor moves past a multi-step section
vibiz('event', 'Form Step Completed', { form_id: 'signup_v2', step: 1 });
// When inline validation rejects an input
vibiz('event', 'Form Error', {
form_id: 'signup_v2',
field: 'team_size',
reason: 'required'
});You can also record events from your backend API when processing form submissions using @vibiz/app. Server-side tracking ensures you record true completions even if the user closes their browser tab immediately after clicking submit. Learn more in our guide on server-side event tracking from your backend.
import { vibiz } from '@vibiz/app';
// In your API route or form handler
export async function handleFormSubmit(userId: string, formData: any) {
await vibiz.user(userId).track('Form Submitted', {
properties: { form_id: 'signup_v2', plan: formData.plan }
});
}Finding abandoned forms in the CLI and API
When visitors drop out of a session, how do you find the exact recordings to inspect? You can filter sessions from your terminal using vibiz replays:
# List sessions that hit issues over the last 7 days
vibiz replays --errors --period 7d
# List sessions on a specific checkout path
vibiz replays --path /signup --period 7dTo view a single session and grab a direct link to the replay viewer:
vibiz replay rpl_abc123The output gives you the visitor's timeline, signals (such as rage clicks or dead clicks), and an authenticated link to watch the session. To check for script failures during checkout, see how to see the JavaScript errors your visitors actually hit.
Inspecting visual frames of abandoned forms
Watching hours of video is tedious. thelastapi provides a faster way: replay frames.
The replay engine parses the session and generates still pictures at critical lifecycle moments: the first page, subsequent pages, JavaScript errors, rage clicks, dead clicks, the session end, and abandoned forms.
To extract PNG frames of an abandoned session:
vibiz replays frames rpl_abc123 --moments error,rage_click --limit 6 --out ./framesYou can also call the API directly from your tools or automated diagnostic scripts:
curl "https://thelastapi.dev/v1/replays/rpl_abc123/frames" \
-H "Authorization: Bearer $VIBIZ_API_KEY"The API returns a JSON response containing each moment and an image URL:
{
"frames": [
{
"kind": "abandoned_form",
"offset_ms": 42100,
"page": "/onboarding",
"label": "form#onboarding-form",
"viewport": { "width": 390, "height": 844 },
"status": "ready",
"image": {
"url": "https://thelastapi.dev/v1/files/frame_xyz.png",
"expires_at": "2026-03-30T15:00:00.000Z"
},
"cost_micro_usd": 4000
}
],
"cost_micro_usd": 4000,
"new_frames": 1
}Each frame rebuilds the page as a static document at the visitor's exact viewport size. A mobile checkout drop-off renders at mobile dimensions. Any sensitive or masked data remains masked with bullets, asterisks, or striped boxes. Image URLs remain active for one hour, and requesting an existing frame again is free.
Comparing event tracking against replay frames
Both techniques solve different parts of form abandonment. Use this comparison to plan your implementation:
| Feature | Custom Analytics Events | Replay Frames |
|---|---|---|
| Primary Use | Funnel conversion and aggregate drop rates | Visual root cause and layout issues |
| Setup Required | Add vibiz('event', ...) calls | Add the script tag; works automatically |
| Data Payload | JSON up to 8 KB, up to 30 properties | Reconstructed DOM snapshot rendered as PNG |
| Privacy Handling | You choose which properties to send | Automatic masking for cards, phones, and emails |
| Pricing | $0 per event | Recording $0; storage $0.023/GB-month (+20%) |
| Inspection Tool | vibiz analytics and aggregate tables | vibiz replays frames and session player |
Monitoring form health with Mission Control
You do not need to check individual replays every day. thelastapi includes Mission Control and health checks to alert you when user experience degrades.
Mission Control runs hourly checks across all projects. The Experience step flags an alert when three or more sessions encounter errors, five or more hit rage clicks, or ten or more hit dead clicks in a 24-hour window. If a broken form validation script causes visitors to furiously click a broken submit button, Mission Control catches it:
# Check the health status of all projects
vibiz health
# Filter only to failing projects
vibiz health --failingWhen an alert appears, Mission Control supplies a link directly to the relevant session replay so you can resolve the bug before more visitors abandon your forms.
If you are building subscription forms or billing flows, you can also connect your checkout events directly to our customer portal.
To get started, install the script tag on your signup or checkout pages, run your first test submission, and use vibiz replays to confirm that user inputs and drop-offs are captured clearly.
Frequently asked questions
How does the recorder handle passwords and credit cards typed into forms?
Password, credit card, and one-time-code fields are never recorded by the script under any circumstances. In addition, credit card numbers, IBANs, email addresses, and phone numbers found in general page text are masked directly in the browser before upload.
Can I stop specific form fields from being recorded if they contain private personal data?
Yes. Add the `data-vibiz-sensitive` attribute to any input element you want excluded from the recording, or wrap a container element with `data-vibiz-mask` to mask an entire section.
What does replay storage cost when capturing form sessions?
Analytics events and recording replay sessions are recorded at $0. Replay storage is recorded at $0.023 per GB-month, billed with the default margin (+20% today), and sessions are retained for 30 days by default.
How do I pull screenshots of an abandoned form without watching the whole recording?
Run `vibiz replays frames <id> --out frames` in your terminal or call `GET /v1/replays/:id/frames` via the API. The system generates static viewport-sized PNG snapshots at critical moments, including when a form is abandoned.