---
url: "https://web.dev/articles/autofill-measure"
titulek: "Measure browser autofill on your forms | Articles | web.dev"
h1: "Measure browser autofill on your forms Stay organized with collections Save and categorize content based on your preferences."
popis: "To optimize user experience, it's essential to understand how users interact with your forms. Browser autofill plays a significant role in this process. Learn how to collect and analyze data on how users use autofill in your forms."
jazyk: "en"
kanonicka: "https://web.dev/articles/autofill-measure"
drobecky: ["Articles", "Measure browser autofill on your forms"]
zdroj: "live"
wayback_snapshot: ""
stazeno: "2026-09-14 03:31:03"
znaku: 9573
slov: 1264
kodovani: "iso-8859-2"
sha256: "42a06b91e0f7a7098d26042b9a50b7ea130c089754e2f350ad7e6f9310604b5c"
---
Measure browser autofill on your forms
Stay organized with collections
Save and categorize content based on your preferences.
Maud Nalpas
Published: November 20, 2024
Ecommerce success hinges on a seamless checkout process. Forms are crucial for
conversions. To optimize user experience, it's essential to understand how users
interact with your forms. Autofill plays a significant role in this process. Autofill in Chrome A smooth autofill experience can lead to increased conversions, faster form
submissions, reduced form abandonment, and improved user satisfaction. But do you have visibility into autofill usage and friction on your site? This guide explains how to collect and analyze data on how users use autofill
in your forms. Here's how you can use these autofill insights: **Align your testing approach with real user workflows.** If autofill
usage insights signal that your users heavily rely on autofill, you know
it's crucial to incorporate autofill testing into your workflows. **Identify regressions.** Compare autofill usage signals on individual
fields between deployments that affect form UX. Large variations may mean
that an autofill behavior has regressed. **Ensure your autofill-friendly implementation works as expected.** Detect trends where users seem to manually fill fields you'd prefer them to use autofill on. Demo and code Play around with our [demo](https://chrome.dev/web-identity-demos/autofill-observer-demo/address.html)
and investigate the
[code on GitHub](https://github.com/GoogleChromeLabs/web-identity-demos/tree/main/autofill-observer-demo). Use the demo code to programmatically observe user action on each form field (leave empty, fill manually, fill with autofill, or fill with autofill and then modify the field).
[Try it out](https://chrome.dev/web-identity-demos/autofill-observer-demo/address.html). Things to try: Autofill all fields. Autofill a field, then empty it manually. Autofill a field, then modify it manually. Fill in a field completely manually. Leave a field blank. Browser support The demo works across the latest devices and browser versions.
It relies on detecting the
[:autofill](https://developer.mozilla.org/docs/Web/CSS/:autofill) CSS
pseudo-class, which is well-supported across browsers. Step 1: Collect autofill data Define autofill statuses First, define possible autofill field statuses you're interested in: `EMPTY`: The user leaves the field empty. `AUTOFILLED`: The user fills the field using autofill only. `AUTOFILLED_THEN_MODIFIED`: The user first fills the field using
autofill, and then manually edits the autofilled value. For example, the
user autofills their address and contact details, but manually enters a
different phone number. `ONLY_MANUAL`: The user fills the field completely manually. `// Possible values for autofill statuses const EMPTY = 'empty'; const AUTOFILLED = 'autofilled'; const AUTOFILLED_THEN_MODIFIED = 'autofilled-then-modified'; const ONLY_MANUAL = 'only-manual';` Implement utility functions Now it's time to implement the core functionality of this code: checking if a
field has just been autofilled. Under the hood, this uses two
functions: `getAllAutofilledFields` looks at all `` and `