Skip to content

Setup and data

How to track form submissions without sending what people typed

Count a completed form as a conversion without sending names, emails or message text, and do not treat a click on Submit as a success.

The CrispStats team · · 8 min read

In short

A form submission is a conversion only when the form was actually accepted: the browser let the submit through, or your server said it succeeded. Record an event name, or a thank-you page, and nothing from the fields. An email, a name, a phone number or the message body does not belong in the event, in the URL, or in a property called label. A click on the Submit button is a weaker signal, because it also fires when validation fails.

The form is often the only conversion a marketing site has. It is also the easiest place to copy an email address into an analytics tool by accident, because the interesting part of the submit is exactly the data you should not collect. This page is the narrow version: count the completed submit, and leave every field where it was typed. The rate that sits on top of the count is in how to calculate conversion rate. What counts as personal data is in PII examples in analytics.

What is a form submission in analytics?

A completed send of the form, counted once per success, with a name you chose and no field values. It is a conversion if that send is the outcome you care about, and it is just an event if you are only watching volume.

Three moments get called a submission, and only the last two are one:

  • The button click. The person pressed Submit. The browser may still block the send because a required field is empty.
  • The submit event. The browser accepted the form and is about to send it. HTML validation has already passed. You do not yet know that the server stored it.
  • The accepted result. The server responded with success, or the browser landed on the thank-you page that only exists after a real send.

Pick the latest moment you can observe. A contact form that posts and redirects can use the thank-you page. A form that stays on the same page and shows an error from the server should wait for that response. Counting the button is how a form with strict validation looks more popular than it is.

Why should the event leave out every field?

Because the fields are the person’s data, and the analytics question does not need them. “How many people asked for a demo” is a count. The address, the name and the message are a record that belongs in the inbox or the CRM, not in a traffic tool.

The usual leaks are dull. A property named email is the obvious one. So is name, phone, company when the company is a sole trader, and the free-text message, which often contains a phone number in the second sentence. A hidden field that your form plugin fills with the address is still a field. So is the label of the control, if the label is the address the person typed.

URLs leak the same way. A form with method="get" puts every field in the query string of the next page. Analytics that records the page URL then stores the address even though you never wrote an event. Use post. Give the thank-you page a path with no query string. PII examples covers the other places a form value hides, including page titles.

How do you count a submit that succeeded?

Use the thank-you page when the form navigates, and the submit event or the server response when it does not. Never copy the form into the event.

A thank-you page

If a successful send always lands on /thanks, and nothing else links there, a pageview of that path is the conversion. You add no form code. The fields were posted to your server and are not in the address.

<form id="contact" method="post" action="/thanks">  <!-- fields stay in the form. Nothing here is copied into analytics. --></form>

The goal is a page rule for /thanks. People who open that URL from a bookmark are also counted, so do not publish the path, and do not use a page people visit for other reasons, such as the homepage.

The submit event, with an empty payload

When the form does not navigate, send one event from the submit listener. crispstats("contact form") has a name and no properties. The browser only fires submit after its own checks pass, so empty required fields do not count.

var form = document.getElementById("contact");form.addEventListener("submit", function () {  crispstats("contact form");});

If your code calls preventDefault and sends the form itself, the submit event has fired before you know the server accepted it. Wait for the response:

form.addEventListener("submit", function (event) {  event.preventDefault();  submitContactForm().then(function (ok) {    if (ok) crispstats("contact form");  });});

submitContactForm is your code. It may read the fields, because it is the product, not the analytics. The analytics call on the next line takes no fields. A property is allowed only when it cannot identify someone: form: "footer" is fine, plan: "team" is fine if they picked it from a list that is not personal, and the message text is not.

Why is a click on Submit the wrong event?

A click fires when validation fails, when the person presses the button twice, and when a script button is not a submit at all. It over-counts the conversion and under-describes it.

A data-cs-event attribute on the button counts the click, which is what you want for a control that does not send a form. On a submit button it counts attempts. Button clicks is the right guide for those controls. For a form, prefer the submit listener or the thank-you page, and do not also tag the button, or each success is stored twice.

The last column stays “only if you copy them” on purpose. None of these signals require the fields.
SignalFires whenIncludes failed attemptsSees field values
Click on the Submit buttonThe pointer hits the buttonYesOnly if you copy them
submit eventThe browser accepts the formNo, for HTML validationOnly if you copy them
Server responded OKYour handler got a successNoOnly if you copy them
Thank-you pageThe browser loaded that pathNo, if only success redirects thereOnly if the URL contains them

How do you turn submits into a conversion rate?

Divide the people who completed the form by the people who could have, over the same dates. Do not divide by the number of attempts.

The denominator is usually the visitors or the sessions that saw the form, not the whole site. A homepage that contains no form will crush the rate if you include it. The numerator is unique people if one person can submit twice and you care about people, or completions if every send matters. Conversion rate is that fraction, and the calculation guide covers the choices that change the result. Mark the event or the thank-you path as a goal so the rate is computed for you instead of from an export.

  1. Write down the success: “the server accepted the contact form”, not “clicked Submit”.
  2. Count it once per success. A double click that sends one email is one conversion.
  3. Use the same period and the same audience for the denominator.
  4. Keep field values out, so a later audit of the event does not become an audit of the inbox.

What does a month of a contact form look like?

Attempts, accepted submits and the rate are three different numbers. Reporting the largest one makes the form look healthier than the inbox.

A worked example: attempts against accepted sends

This example uses made-up numbers. The contact page has 2,000 visitors in a month. The Submit button receives 260 clicks. HTML validation blocks 70 of them. The submit listener fires 190 times. The server rejects 30 as spam and accepts 160. The thank-you page, shown only after acceptance, is viewed 160 times.

The conversion rate against visitors is 160 ÷ 2,000 = 8%. The button-click rate is 260 ÷ 2,000 = 13%. Both use the same visitors. The 13% figure counts people who never reached you. If the event had included the email field, those 160 addresses would now sit in the analytics database as well as in the inbox. The event contact form with no properties has the 160 and none of the addresses.

How does CrispStats record a form submission?

CrispStats does not read forms. Nothing is sent unless you send it, or the visitor lands on a page. Call crispstats("contact form") from the submit path above, or make a goal whose rule is the thank-you path. A data-cs-event attribute is the click, so leave it off the Submit button when the submit event is already in place.

Properties are optional and flat. Use them for the form’s location or the plan someone picked from a list. Do not put an address, a name or the message in a property. The script sets no cookies and does not identify the visitor. A goal’s conversion rate is completing visitors divided by visitors, which matches the 8% in the example when the goal is the accepted send. Goals and the event list are described on the funnels page.

Guide questions. Straight answers.

What people ask after reading this.

  • Send an event with a name and no field values, or count the thank-you page the form redirects to. The email stays in the form handler. It is not a property, a page title or a query parameter.

  • No. The click also happens when validation fails and when the person presses the button more than once. Use the form's submit event, the server's success response, or the thank-you page.

  • Listen for submit, send the form with your own code, and fire the analytics event only after the server accepts it. The analytics call still takes no fields.

  • Yes, if the label is not personal. A property like footer or contact is fine. The person's name, email, phone number and message are not.

  • Divide accepted submits by the visitors who could submit, over the same dates. Visitors of the page that holds the form are the usual denominator. Button clicks are a different, larger number.

Not answered here? Write to hello@crispstats.com

Your traffic, crisp and clear

One script, no cookies, and every feature from the first day. Set up takes about as long as pasting a snippet.

© 2026 CrispStats. All rights reserved.

Get an AI summary of CrispStats