Skip to content
websitetraffic.
Free growth pack
Menu

Website Traffic guides / Measurement

How to verify a lead form submission in GA4

Jump to the step-by-step worked example

Follow an enquiry from a successful form response to a checked generate_lead event. You will finish with a measurement definition, a tested implementation and a verification record—not just a tag pasted on a page.

Updated November 20, 2026 · Worked implementation pattern · Allow 45–90 minutes with developer access. The sample below is illustrative; it does not report a completed installation in your account.

Before you start: access to the correct Google Analytics property, permission to edit your website, a working form whose server confirms acceptance, and an approved consent/privacy setup. Use a test environment and approved test details. Do not change a production form solely to match this example.

Download the verification worksheet. No email required.

1. Define the action you actually want to count

For this example, a lead means the enquiry service accepted one valid enquiry. A button click, a validation error, a booking-page visit and a booked appointment are different actions. Write the definition before choosing an event.

FieldCompleted example
Eventgenerate_lead
TriggerServer confirms a newly accepted enquiry
Allowed contextform_id: service_enquiry — a fixed label, not a visitor value
Not sentName, email, phone, message, free-text answers or customer identifiers
Separate business measureQualified enquiries that become confirmed bookings

Audit your existing tags first. If a plugin or Tag Manager already sends this same event, fix that implementation instead of adding another. Automatic form activity can be useful, but it is not proof that your server accepted a lead.

2. Confirm the property, stream and installation

  1. Open the intended property in Google Analytics. In Admin → Data collection and modification → Data streams, choose your web stream. Record its website and Measurement ID in your private worksheet.
  2. If the site is new, create the appropriate property and web stream. Confirm the reporting time zone before collecting a baseline.
  3. Open the stream’s Google tag instructions. Use your CMS integration, your existing Tag Manager setup, or the manual installation instructions. Choose one installation path; installing the same tag through several paths can double-count.
  4. Publish through your normal review process. Check that collection follows your consent configuration. Do not bypass consent to make a test pass.

Checkpoint: use Google Tag Assistant with your own device and the site’s normal consent flow. Confirm that you are inspecting the intended tag and destination. A tag found in source code alone does not prove that events reach the correct property.

Google’s setup and installation instructions cover the current platform-specific choices.

3. Fire the event after the server confirms success

The diagram shows the boundary that matters. Failed validation and failed requests must not enter the success branch.

Enquiry-to-event implementation flowSubmit the form, validate and save on the server, then check the response. A failure shows an error and sends no lead event. A newly accepted enquiry shows success and sends one generate_lead event when analytics is permitted.1. Submit and validate the form2. Server confirms the resultFAILURE OR DUPLICATENo new lead eventShow the appropriate statusNEW ENQUIRY ACCEPTEDOne generate_lead eventOnly when analytics is permitted
Implementation diagram, not a Google Analytics screenshot. Acceptance is defined by your form’s actual server contract.

For a site that already uses gtag.js, put the event inside its existing successful-submission handler. Adapt the response fields to your real API. The following is integration pseudocode: analyticsAllowed, result and the success callback must come from your application.

// Inside the existing response handler, after the server result is checked.
// Example contract: accepted === true only after durable acceptance;
// created === true only for a new enquiry, not a replay or duplicate.
if (result.accepted === true && result.created === true) {
  showEnquiryAccepted(); // Your existing successful form state.
  if (analyticsAllowed() && typeof window.gtag === 'function') {
    window.gtag('event', 'generate_lead', {
      form_id: 'service_enquiry'
    });
  }
}

Do not paste this onto a button’s click handler. Prevent repeated submits in the form, and use the server’s duplicate-handling contract. A browser variable alone cannot deduplicate requests across refreshes or tabs. Keep form success independent of analytics availability: an accepted enquiry must still succeed when analytics is blocked.

If you use Tag Manager, have the confirmed-success handler emit one agreed data-layer event and configure one GA4 event tag for it. Do not also send the direct gtag event above. Google’s event implementation guide explains the supported options.

4. Verify a lead form submission in GA4 DebugView

  1. Choose your test device. Start Tag Assistant on the form page with analytics consent enabled for the test. Open DebugView in the matching GA4 property and select that device.
  2. Submit once. Send an approved test enquiry. Confirm the form shows success and the enquiry was accepted by your system.
  3. Find the event. Open generate_lead in the DebugView event timeline. For this example, expect one event with form_id set to service_enquiry. Compare with the fixed label configured for your own form.
  4. Check the negative case. Leave a required field blank and try again. Confirm that validation appears and no additional generate_lead is recorded. Record both results in the worksheet and exclude the test enquiry from business reporting.

Open Tag Assistant and find DebugView under Admin → Data display → DebugView. If you see no device or event, check the stream, debug mode and consent on the test device. See Google’s DebugView instructions.

TestExpected resultIf it fails
New accepted enquiryOne lead event; fixed form ID; no personal dataCheck the destination ID, success branch and event tag
Required field missingValidation shown; zero lead eventsMove tracking away from the submit click
Server rejects or times outError shown; zero lead eventsRequire confirmed acceptance before tracking
Double click or request replayNo second event for the same accepted enquiryCheck duplicate tags, disabled-submit state and server deduplication
Refresh confirmation pageNo extra lead event just from refreshingDo not count a freely reloadable page as a new submission
Analytics unavailableForm still works; analytics follows the approved consent behaviorSeparate business success from analytics callbacks

Record what you actually observe in the downloadable worksheet. Do not mark a test “pass” merely because the code looks correct. Re-test a failed case after fixing it. Remove temporary debug settings after testing; if you added a debug_mode parameter, remove the parameter rather than setting it to false.

5. Mark the verified event and review useful outcomes

In Admin → Data display → Events, mark the intended event as a key event. If it is not listed yet, use Create event with the code-based option and the exact event name, following Google’s current instructions. This configuration does not replace the website code that sends the event. Do not create a second page-view-based rule for the same submission.

Leave a monetary value unset unless you have an agreed, defensible valuation. A lead is not revenue. Record the event definition, owner, deployment date, consent assumptions and last successful test beside the code.

After data has processed, compare complete reporting periods. Report GA4 lead events separately from accepted enquiries in your system and confirmed appointments. Consent, blockers, duplicate handling, time zones and reporting delays can make these counts differ. Investigate the difference before claiming a conversion rate improvement.

Completion checklist: correct property; one installation path; accepted-success trigger; no personal data; success, failure and duplicate cases checked; one meaningful key event; a named person responsible for retesting after form changes.

Continue with the baseline and tracking QA lesson and the qualified-lead follow-up lesson.

A small-business owner taking notes beside a laptop at a sunlit desk
Illustration of a business owner reviewing website performance.

Worked example · Fictional business

Can you trace a visit to a real enquiry?

Lakeview Home Organizing wants to know whether its pantry-organizing page brings qualified enquiries. Use one landing page and one enquiry form to follow the same process on your site.

  1. Match the web stream
  2. See one test visit
  3. Verify one accepted lead
  4. Compare two periods
  1. Match the property to the live site. In GA4, open Admin → Data streams → your web stream. Write down the website URL, Measurement ID and reporting time zone. Open the actual landing page with Tag Assistant and check that the destination ID matches. Note whether analytics requires opt-in.
  2. Generate a visit you can recognize. Use a dedicated browser session and follow your site’s normal analytics choice. Open your landing page with a clearly labelled test campaign, such as ?utm_source=owner_test&utm_medium=qa&utm_campaign=measurement_check. Check Reports → Realtime for the page and page view. Use the settled Traffic acquisition report for attribution. Mark your visit as a test in your log.
  3. Check delivery and the event separately. Submit one labelled test enquiry. Confirm it arrived in the inbox or CRM and that DebugView or Realtime shows one generate_lead from the correct form. Try an invalid submission and verify no lead event fires. Repeat or reload the success screen to check for duplicates. Keep test enquiries out of the qualified-lead count.
  4. Export two complete periods. In Reports → Acquisition → Traffic acquisition, choose Session source / medium or Session campaign. Use the Landing page report for page-level evidence. Export two equal, non-overlapping periods with the same property, filters and scope. Keep raw exports. Enter report totals into the portfolio template and preserve each source and date range.
Expected evidence. Save the landing page URL, a timestamped test result, a note confirming delivery and both dated exports. If the visit appears but the accepted enquiry does not, check the form's success trigger. If the event appears but delivery fails, fix the form path before interpreting lead counts.

Example decision. Lakeview recorded 32 then 45 landing-page sessions and 1 then 3 qualified enquiries across two 28-day periods. The counts are small. Open the enquiry records and check fit before putting more effort into the channel.

Download the baseline CSV · Download the worked example · Try the sample dashboard

Continue with the Search Console walkthrough · Google’s Realtime reference · Google’s Traffic acquisition reference