How do I track form submissions in GA4?

Applies to: Google Analytics 4 (GA4)
Last updated: May 2025


Problem

You want to track when users submit a form on your website—such as a contact form, newsletter signup, or lead capture form—but GA4 does not automatically track form submissions.


Solution

To track form submissions in GA4, you’ll use Google Tag Manager (GTM) to detect the form interaction and send a custom event to GA4. This event can then be marked as a conversion if needed.


Step-by-Step Guide Using Google Tag Manager

Step 1: Enable Form Variables (Optional but Helpful)

  1. Go to https://tagmanager.google.com
  2. Navigate to your GTM container
  3. Go to Variables > Configure
  4. Enable:
    • Form ID
    • Form Classes
    • Form Element
    • Form Target
    • Form URL

Step 2: Create a Trigger for Form Submissions

  1. Go to Triggers > New
  2. Choose Trigger Type: Form Submission
  3. Check Wait for Tags and Check Validation if needed
  4. Configure trigger to fire on:
    • All Forms (if you only have one form)
    • Or Some Forms, with conditions like:
      • Form ID equals contactForm
      • Page Path contains /contact

Name and save your trigger (e.g., “Contact Form Submit”).


Step 3: Create a GA4 Event Tag

  1. Go to Tags > New
  2. Choose Tag Type: GA4 Event
  3. Set:
    • Event Name: form_submit or something descriptive like contact_form_submit
    • Event Parameters:
      • form_id: {{Form ID}}
      • page_path: {{Page Path}}
  4. Link this tag to the form submission trigger you created
  5. Save and publish

Step 4: Test the Setup

  1. Use GTM’s Preview mode
  2. Submit the form on your site
  3. Check that:
    • The trigger activates
    • The GA4 event tag fires
    • The event appears in GA4 DebugView

Step 5: Mark the Event as a Conversion (Optional)

  1. Go to Admin > Conversions in GA4
  2. Click New conversion event
  3. Enter the exact event name (e.g., contact_form_submit)
  4. Save

Now this form submission is counted as a conversion.


Advanced Notes

  • If your form uses AJAX or JavaScript to submit (no page reload), standard form triggers might not work—you may need to use a Click Trigger or a Custom Event Trigger.
  • You can track multiple forms by creating distinct triggers or by passing form identifiers (like ID or class) as parameters.
  • For multi-step forms, consider tracking each step as a separate event.

You may also like...