Audit GA4 collection before trusting your lead count
Your office has the inquiry and Google Analytics 4 (GA4) shows traffic. The lead event is missing. Before you change the campaign budget, follow one test inquiry from the saved business record to the event in GA4. Check where the server sent it, what it sent, and what the property received.
Francisco Contreras · Founder, Machina
5 min read

Find the saved lead before looking in GA4
A missing lead event can make a working campaign look weak. In our July 2026 audit of an anonymized pest-control company, GA4 recorded 527 sessions in the 30 days before the audit but no server-side generate_lead events. A separate form event sent by the browser was arriving. We replayed the server request and got HTTP 404 from www.google.com/mp/collect. That failure explained the missing server event. To tag a campaign link before it goes out, use our free UTM builder.
We start with the record the business uses to follow up. Ask the person who receives inquiries to confirm the test is there, then give the site maintainer its internal ID and submission time. That pins the investigation to a specific save. If your team still needs to agree on what counts as a lead, start with the measurement plan in Part 1.
Trace one inquiry through the live form
The test starts with the form customers actually use, opened in a browser with analytics allowed. We confirm the intended GA4 property and web stream, agree with the office how to label the test inquiry, submit once, and record the time and time zone. If the inquiry never reaches the business record, we inspect the form save before changing tracking.
Once the inquiry is saved, we look in the server log for the send attempt. We look for the event name, destination host and path, measurement ID and response status, or a reason the send was skipped. If the log has neither a send nor a skip, we check whether this form reaches the code that sends the event. The internal record keeps the lead ID. We leave the API secret out of logs and keep contact details and free-text answers in the business record.
Check the destination, payload and live event
The destination comes first. The web Measurement Protocol reference lists https://www.google-analytics.com/mp/collect and a separate EU endpoint. We check that the HTTPS POST includes the intended stream’s measurement ID and API secret in the query string. A 2xx status such as HTTP 204 confirms receipt of the request. GA4 may still leave the event unprocessed.
Next, we send a representative request to /debug/mp/collect with validation_behavior set to ENFORCE_RECOMMENDATIONS. We correct the fields named in validationMessages until it comes back empty. The validation server does not check the measurement ID or API secret, and its test events stay out of reports.
A live test through the repaired form uses /mp/collect for the server send. We check the HTTP status and look for the event under Event count by Event name in Realtime for the intended property. In our repair test, the corrected payload passed validation, a live send returned HTTP 204, and generate_lead appeared in Realtime.
If the validator is clear and the live send returns 204 but the event is absent, verify the live deployment’s stream settings and the browser ID it sent. Check the processed report later to confirm the count your team actually uses.
Carry the browser ID through the save
For a new server path, we read the existing client_id and session_id in the browser with separate gtag get calls, then carry both through the save when the analytics send is allowed. The browser ID connects the lead to earlier website activity. The session ID connects it to that visit. The Measurement Protocol reference recommends session_id with engagement_time_msec for accurate session and engagement metrics, including Realtime. If the page measures engagement time since its preceding event, we pass that value. The server cannot infer dwell time from a form save.
In the audited repair, we got session_id from the GA session cookie and sent a nominal engagement_time_msec of 1. That got the event into Realtime, but the value is a placeholder, not a measurement of engagement.
When we repaired the audited site, we removed a timestamp fallback that had stood in for a missing browser ID. A fresh value cannot identify the browser that sent earlier events. We kept the save independent of the send. In a test through the header quote form, the inquiry saved without a browser ID and the server skipped the event. When a browser ID is missing or the applicable consent rules exclude the send, we keep the inquiry in the office’s queue and log the reason for the skip.
Compare saved, eligible and received leads
Our database check found a gap the GA4 report alone could not show. Of 29 saved inquiries, 20 carried a browser ID. The other nine were still in the business record. We could not tell from those records why each ID was missing.
We compare the same forms and dates in one time zone. First we count saved inquiries, then records eligible to send under the site’s setup, then processed GA4 generate_lead events. If eligible saves outnumber GA4 events, we read the send and skip logs before changing the form. If GA4 is higher, we check whether two triggers recorded one save or a retry sent it again.
Mark the verified inquiry as a key event
In our audit, a general cta_click was marked as a key event. We keep clicks and form attempts available to diagnose the page, but count an inquiry only when it saves. Enhanced Measurement can collect form_start and form_submit when form interactions are enabled. We check those events alongside custom tags so one saved inquiry does not become two reported leads.
When one test save produces two lead events, we find the trigger for each. We inspect the browser tag and server send, then choose one event to supply the lead count. We also test a rejected submission. It should leave the lead count unchanged even if the browser saw a form interaction. Once an eligible save produces exactly one lead event and a rejected attempt produces none, we mark generate_lead as the key event for accepted inquiries.
Turn the test into a release check
After a form, tag or consent change, we repeat the eligible submission and the missing-ID or consent-denied path in a controlled test. We expect one saved inquiry on each successful submission, one lead event for the eligible case and a recorded skip for the excluded case. We assign someone to compare the counts after release.
In our marketing analytics work, we agree on the one event that counts as a lead, then reconcile the website, GA4 and sales record against a saved inquiry. Once that count holds up, Part 3 shows how to follow inquiries into booked jobs. If the counts still differ, reach out to Machina and tell us which system shows the extra or missing inquiry.
Sources
- Field audit of the anonymized GA4 property
- The server-side repair and verification
- Implementation timeline and database check
- Google Analytics Measurement Protocol web reference
- Google Analytics Measurement Protocol validation for web events
- Google Analytics Measurement Protocol verification for web events
- Google Analytics Enhanced Measurement
Keep reading
Related guides
Explore related work
Next steps
Let's talk about your project
Tell us what you're working on. We'll tell you if we can help — and exactly what we'd do.
