How to track contact form submissions in Google Analytics
· 7 min read
Your analytics says 23 enquiries last month. Your inbox has nine. Somebody is wrong, and it is almost always the tracking. Setting out to track contact form submissions sounds like a five-minute job, until you discover that a form can appear to succeed, fail validation, be resubmitted, or complete without the page ever changing. This guide compares the three practical methods, explains which to use when, and covers the AJAX problems that produce phantom leads.
The aim is a number you can quote in a meeting without checking your email to confirm it.
Method one: the thank-you page
The oldest approach is the most dependable one. The form posts, the server processes it, and the visitor lands on a separate URL such as /thank-you. You then count views of that page.
Why it stays popular
- It only happens after the server has accepted the submission, so it reflects reality closely.
- There is nothing clever to break during a theme or plugin update.
- Anyone can verify it: visit the URL and the count goes up.
- It gives you a natural place to say what happens next and how soon you will reply.
Where it goes wrong
Refreshes and bookmarks inflate the count, so avoid counting every view as a separate conversion if you cannot control that. Some form plugins reuse one thank-you URL for several forms, which merges enquiry types. And if your form loads inside a popup or a page section, there may be no page change at all.
One extra caution: never put the customer's name, phone number or email into the thank-you page URL. Personal data does not belong in analytics reports or referrer headers.
Method two: a form-submit trigger in Tag Manager
Google Tag Manager offers a form submission trigger that listens for the browser's native submit event. You add a GA4 event tag that fires when it detects one, optionally limited to a particular form ID or page path.
This works well for simple, traditional forms that post to the server and reload the page. It takes minutes and needs no developer.
The catch that produces phantom enquiries
The submit event fires when the visitor presses the button, not when the enquiry is stored. So it also fires when:
- Validation rejects the form for a missing PIN code or a malformed email.
- The server returns an error or times out.
- A spam check silently discards the message.
- Someone presses submit three times because nothing seemed to happen.
Worse, many modern forms use JavaScript and never fire a native submit event at all, so the trigger sees nothing. Tag Manager also has a "check validation" option, but it only helps with standard browser validation, not with custom scripts or server-side rules.
Method three: a dataLayer push on real success
The most accurate method asks your developer to push a custom event into the dataLayer at the exact moment the form confirms success — typically in the success callback of the AJAX request.
The code is short. When the response comes back successful, the site pushes an event such as form_success with a couple of parameters identifying which form it was. In Tag Manager you create a Custom Event trigger listening for that name and fire your GA4 event tag from it.
Why it is worth the extra effort
- It only fires when the submission genuinely succeeded, so counts match your inbox.
- You can attach useful parameters such as form name, service selected or page location.
- It survives redesigns, because it is tied to your own code rather than to a CSS selector or button text.
- The same event can feed a CRM or a WhatsApp notification later.
Many popular form plugins already push their own success events into the dataLayer. Check the plugin documentation before writing anything, and look at Tag Manager's preview mode to see what events already appear when you submit a test enquiry.
Choosing the right method for your site
- Form reloads the page and reaches a unique thank-you URL: use the thank-you page, with a counting rule of one per session.
- Traditional form, no thank-you page, no developer available: use the Tag Manager submit trigger, and accept that the number is a slight overcount.
- AJAX form, popup form, or multi-step form: use a dataLayer push on success. Nothing else is trustworthy.
- Several different forms: whichever method you choose, pass a parameter identifying the form rather than creating a separate event name for each.
Pitfalls that ruin AJAX form tracking
AJAX forms — the ones that show a green confirmation message without reloading — cause most of the confusion. Watch for these specifically:
- Counting the message appearing, not the request succeeding. Some themes show the message optimistically before the server responds.
- Triggering on a click of the button instead of the outcome. This counts everyone who tried, including those who failed.
- Selectors that break. Triggers based on a CSS class or button text stop working the day someone edits the wording, and nobody notices for months.
- Forms inside iframes. Third-party booking or lead widgets often run in an iframe, where your Tag Manager container cannot see the submit at all. You usually need the vendor's own event or a postMessage callback.
- Spam submissions counted as leads. Add a honeypot field or challenge, and confirm your tracking fires after the spam filter, not before.
Verify the setup in ten minutes
Whichever method you chose, run this check before you rely on the numbers:
- Submit a real test enquiry from a phone on mobile data.
- Confirm the email actually arrived in the inbox that receives enquiries.
- Check the event appeared exactly once in GA4 DebugView.
- Deliberately submit an invalid form and confirm no event fires.
- Press submit twice quickly and see whether you get one event or two.
- Repeat for every form on the site, including the footer and popup versions.
- After a week, compare recorded submissions with real enquiries received and note the gap.
Repeat the first three steps after every theme or plugin update. Broken form tracking is silent by nature.
Make the inbox and the report agree
Pick your method, test it properly, and then keep a simple monthly tally of enquiries received so the two numbers can be compared. If your forms are AJAX-based and nobody on your side can add a dataLayer push, our team handles this routinely alongside website support work.
Frequently asked questions
Can I track a form without Google Tag Manager?
Yes. A thank-you page needs no extra tooling at all, and a developer can call gtag directly in the form's success handler. Tag Manager mainly makes later changes easier without touching site code.
Why does analytics show more submissions than emails received?
Usually because the tracking fires on the button press rather than on success, or because spam submissions are counted before filtering. Deliverability problems with the notification email are the next suspect.
Should each form on my site have its own event name?
No. Use one event name and a parameter such as form_name or form_location. That keeps reports tidy and still lets you break results down by form.
How do I know which page the enquiry came from?
GA4 records the page path with the event, and you can also add a hidden field to the form storing the landing page so the information travels with the lead itself.
Thinking about a website?
See what a package covers and what it costs, or ask us about your own project.