How to Track WordPress Form Submissions in Google Analytics

You check Google Analytics. Maybe every day. But when someone fills out your WordPress form, does GA4 know it happened?

Probably not. You can see the submission sitting right there in your Ninja Forms dashboard, but as far as your analytics account is concerned, that lead, that registration, that support request never occurred.

Go looking for a fix and you’ll run into a pile of guides pushing you toward yet another analytics plugin, a crash course in Google Tag Manager, or a chunk of custom JavaScript you’re supposed to just paste in and trust. None of that sounds like an afternoon well spent.

Good news: you don’t need any of it. Ninja Forms already has a way to register a form submission as an event in Google Analytics 4, built right into the free core plugin, with no extra plugin and no code. Here’s how to track form submissions in Google Analytics in a few clicks.

What you’ll need

One thing has to already be true before any of this works: your site needs an existing connection to Google Analytics 4, either a direct GA4 connection or through Google Tag Manager. The action below doesn’t create that connection. It just registers a submission as an event once the connection already exists.

If you haven’t set that up yet, the Site Kit by Google plugin is the easiest no-code way to get GA4 talking to your site.

If you don’t have GA4 connected at all, or you’re really after knowing which campaign brought someone to your form rather than just counting that it happened, our guide to tracking UTM parameters on your forms covers a way to capture that without connecting anything to Google Analytics.

How to track form submissions in Google Analytics

This is the fastest way to track form submissions in Google Analytics without adding anything new to your site. Ninja Forms includes a free Google Analytics 4 action built right into the core plugin: add it to any form, give your event a name, and every new submission of that form fires off as a GA4 event automatically. No add-on to buy and nothing extra to install.

  1. Open your form in the builder and click into the Emails & Actions tab.
  2. Click the blue (+) icon to open the Actions window.
  3. Under Core Actions, click Google Analytics 4.
  4. Leave the toggle on GA4 (the default), or switch it to GTM if your site runs Google Tag Manager instead.
  5. Enter an Event Name, something short and clear like webinar_registration or contact_form_submit. This is the name your event will use in GA4.
  6. Save the action, then publish the form.
Ninja Forms builder with the Emails and Actions tab active and the Actions window open, showing the Google Analytics 4 tile under Core Actions.

Click into the action once it’s added and you’ll see the toggle and the Event Name field waiting for you.

The Google Analytics 4 action's settings panel in the Ninja Forms builder, showing the GA4/GTM toggle and a populated Event Name field reading webinar_registration.

That’s all there is to it. Submit the form once yourself to make sure everything’s wired up, then head over to GA4’s Realtime report, where your event should show up within a few minutes and stick around for about half an hour.

Reports outside of Realtime take longer to populate, usually a few hours. Once you’ve seen it land in Realtime once, you know the connection works.

Give Ninja Forms a try today!

Ninja Forms is free! Optional premium features available with any membership.

Using Google Tag Manager instead? Nothing about the setup changes

If your site runs on GTM rather than a direct GA4 connection, you don’t need a different action or a second plugin. The same Google Analytics 4 action handles it. Just toggle it to GTM mode and name your event the same way.

You’ll still need to build one Tag in GTM to catch the event once it hits the data layer. Set up a GA4 Event Tag with your Measurement ID, give it a Custom Event Name variable, and set the Trigger to fire on a Custom Event that matches the Event Name you entered in the action, not the label you gave the action itself inside the builder. Full Tag and Trigger details live in our GA4 action documentation.

What gets sent to GA4?

Every event this action fires carries three consistent details you can use later when you’re building reports:

  • event_category is always form_submit
  • event_label is always ninja_forms_submit
  • form_id is the numeric ID of whichever form was submitted

Building a GA4 Explore report? Filter on event_category to see every form submission across your whole site, or on form_id to isolate just one form.

Not seeing your event in GA4? Check your browser console

Published the action, submitted a test entry, and nothing showed up? The browser console almost always tells you why in one line. Right click the page, choose Inspect, click Console, and submit the form again.

  • gtag isn’t defined. Please make sure you have GA4 installed on your site.” Your site isn’t actually connected to GA4 yet.
    • Solution: Connect it first with Site Kit by Google or your GA4 provider of choice, then submit the form again.
  • gtag isn’t defined. But GTM was detected, did you mean to use GTM in the action settings?” Your site has GTM running but the action is still set to GA4 mode.
    • Solution: Toggle the action to GTM.
  • GTM isn’t defined. Please make sure you have GTM installed on your site.” The action is set to GTM mode but there’s no GTM container on your site to catch it.
    • Solution: Install your GTM container, or switch the action to GA4 if that’s what your site actually uses.
  • GTM isn’t defined. But GA4 was detected, did you mean to use GA4 in the action settings?” The opposite mismatch: GA4 is on the site but the action is in GTM mode.
    • Solution: Flip the toggle back to GA4.
  • No event name defined in the GA4 action settings. Please define an event name.” The action saved without an event name.
    • Solution: Open the action and fill in the Event Name field.
Browser developer console showing a warning message that gtag isn't defined after a Ninja Forms test submission.

No worries either way, because none of this touches the rest of your form. The success message, the admin email, and the stored submission all work the same whether or not this action manages to fire. Worst case, you’re just missing the event in GA4 until you fix the connection.

Want form submissions counted as a GA4 conversion? Mark the event as a Key Event

If you’d rather see your form submission event show up as a conversion goal, GA4 makes that a quick toggle once the event exists. Open GA4’s Admin settings (the gear icon), go to Data display, then Events, find your event in the list, and mark it as a Key Event. From that point on, every submission counts toward your conversion totals.

Start tracking your WordPress form submissions in Google Analytics today

You don’t need another plugin, a Tag Manager crash course, or a developer to get your form submissions showing up in the analytics dashboard you already check. Ninja Forms has this built in, free, waiting under Emails & Actions on any form you already have, and there’s no good reason to pay for something else just to get it. Add the action, name your event, and you’re tracking form submissions in Google Analytics from here on out.

Download Ninja Forms and give it a try.

Try Ninja Forms Today

Always free, with premium features available through our memberships.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.