How to track form submissions in GA4
Count website enquiries when your form accepts them. Use a dedicated confirmation page or a Google Tag Manager event, then test the setup in DebugView.
To track form submissions in GA4, identify what happens after your website accepts an enquiry. It may redirect the visitor to a thank-you page or show a confirmation on the same page. Use that success signal to send one generate_lead event for each accepted enquiry. Check that the enquiry also arrives in your inbox, form dashboard or CRM. Google’s recommended lead event.
What GA4 form_submit can tell you
With form interactions enabled in Enhanced Measurement, GA4 can record form_start and form_submit. These help you see whether visitors begin and submit a form. A submit button click shows an attempt, and an automatically detected submission can occur before you know whether the server accepted it. Base your lead total on the successful outcome and check for tags or plugins that already send generate_lead. Google’s Enhanced Measurement event definitions.
Option 1. Use a dedicated thank-you page
Use this method if your website can show the confirmation page once per accepted enquiry. The site needs to handle reloads and direct visits so they do not display the same confirmation and count a second lead. If that safeguard is unavailable, use the confirmed-success method below.
- Check that the form redirects to a path such as
/enquiry-confirmed/only after the server accepts the enquiry. Try an invalid test submission and confirm that the thank-you page does not load. - In GA4, open Admin, go to Events under Data display, then select Create event. Choose the correct web stream and Create without code. Use
page_viewas the source and match the dedicated confirmation URL. Name the new eventgenerate_leadand mark it as a key event if enquiries are an important outcome. - Reload the confirmation page and try opening the URL directly. If ordinary visits can trigger the same event, use the confirmed-success method below or have your website emit a tracking signal only when it first confirms an accepted submission.
Google’s thank-you page key event tutorial explains the event setup in more detail.
Option 2. Use Google Tag Manager for a form that stays on the page
For a form that submits in the background (often called AJAX), ask your developer to send a data layer event when the form reports that the server accepted the enquiry. Check the result your form provider returns. A button click, a loading spinner or an HTTP success code on its own may give an incomplete picture.
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ event: 'form_accepted' });
Place the example in your form’s confirmed-success callback. Configure a Custom Event trigger named form_accepted and use it to fire a Google Analytics: GA4 Event tag named generate_lead for the correct GA4 property. Make sure only one tracking rule sends that event for this form. After testing, publish the Tag Manager changes and mark the event as a key event in GA4 if you want to report it as a priority action. Google Tag Manager custom event triggers · Google’s GA4 event setup guide.
Keep customer details out of Analytics
Use a fixed label such as contact_form if you need to identify the form in Analytics. Keep names, email addresses, telephone numbers and message text out of the analytics data layer, event parameters and confirmation URL. Check that your tag follows the website’s consent settings and that the form itself continues to work when analytics consent is declined. Google’s guidance on avoiding personal information in Analytics · Google’s website consent mode guide.
Check each outcome in GA4 DebugView
Open Tag Manager Preview or enable debug mode with Tag Assistant. In your GA4 property, open Admin → Data display → DebugView and select your test device. Use test details and complete each check. Google’s DebugView guide.
| Test | Expected result |
|---|---|
| Send a valid enquiry | One generate_lead event and one accepted enquiry in the form system or inbox. |
| Leave a required field empty or simulate a server rejection | Zero generate_lead events. |
| Double-click Submit, reload the confirmation page or open its URL directly | One event for an enquiry accepted once. Zero additional events from reloading or reopening the confirmation URL. |
| Decline analytics consent | The form still accepts valid enquiries. Analytics follows your site’s configured consent behaviour. DebugView may show no event. |
| Inspect the event details | The expected GA4 property shows generate_lead. Its URL and event parameters contain no customer details. |
Once the tests pass, compare GA4 with the enquiries your team actually received. Consent choices can make the totals differ. To judge the value of the enquiries, record which ones lead to a quote or booking. How to measure enquiries from local SEO · How to improve your website enquiry form.