Track form submissions in Google Analytics 4

  • google-analytics
  • ga4
  • key-events
  • conversions
  • gravity-forms
  • forms

Updated

The simplest reliable way to count form submissions in Google Analytics 4 (GA4) is a thank-you page. Every visitor who submits the form lands on it, so a view of that page means one submission. You create an event for that page view in GA4, then mark it as a key event (what GA4 used to call a conversion).

You don't need Google Tag Manager for this. To track button, phone, or email clicks instead, see Track button clicks with Google Tag Manager.

Before you start, GA4 should already be collecting visits. See Add Google Analytics 4 to WordPress.

1. Send the form to a thank-you page

  1. Create a page such as Thank you with a short message, and publish it.
  2. In Gravity Forms, open the form's Settings → Confirmations and set the confirmation to Page, then choose your thank-you page.
  3. Submit a test entry and note the thank-you page's address, for example /contact-thank-you/.

Build a contact form with Gravity Forms walks through confirmations step by step.

Use a separate thank-you page for each form you want to count separately, such as /quote-thank-you/ and /contact-thank-you/.

2. Create an event for the thank-you page

GA4 already records a page_view event for every page. You create a new event that copies it only when the page is your thank-you page.

  1. In Google Analytics, go to Admin.
  2. Under the property's Data display settings, open Events.
  3. Click Create event, then Create.
  4. Give it a Custom event name in lowercase with underscores, such as contact_form_submit.
  5. Under Matching conditions, add two conditions:
    • event_name equals page_view
    • page_location contains /contact-thank-you/ (the path of your thank-you page)
  6. Leave Copy parameters from the source event on, and click Create.

The new event only counts submissions from now on. It isn't applied to data GA4 has already collected.

3. Mark it as a key event

A key event appears in GA4's key event reports and can be imported into Google Ads.

  1. In Admin, under Data display, open Key events.
  2. Click New key event.
  3. Enter the exact event name you created, such as contact_form_submit, and save.

Adding it by name means you don't have to wait for the event to show up in the Events list first.

4. Test it

  1. Open your site in a private (incognito) window. If the cookie banner is on, accept cookies.
  2. Submit the form.
  3. In Google Analytics, open Reports → Realtime. Your event should appear within a minute or two.

Standard reports can take a day or two to include new events.

Can I count other page visits the same way?

The same method works for any page view you care about. To count visitors who reach your pricing page from one particular page, for example, create an event with event_name equals page_view, page_location contains your pricing page's path, and page_referrer contains the path of the page they came from.

Why don't GA4's numbers match Gravity Forms?

GA4 usually reports fewer submissions than Forms → Entries:

  • Visitors who decline cookies, or block tracking with an ad blocker, aren't counted.
  • Someone who reloads the thank-you page, or comes back to it later, is counted again.

Treat GA4's number as a trend, and the entries list as the exact count.

On a Dirigible site

  • Your own visits aren't tracked while you're logged in as an administrator, unless Track Admin Sessions is on under Appearance → Customize → Scripts & Embeds → Analytics & Tracking. Test in a private window instead.
  • If the GDPR Banner is on, Google Analytics waits until the visitor accepts cookies. See Set up a GDPR cookie consent banner.
  • With Dirigible SEO active, turn on Private Page (Do Not Index) for your thank-you pages so they don't show up in Google. See Edit the SEO title and meta description for a page.
  • To record which ad or newsletter a lead came from, add campaign fields to the form. See Save UTM parameters with Gravity Forms entries.