Machina

What we do

Services

Explore all services

Machina — Marketing that moves numbers.

Start a free strategy call

Nineteen industries

One growth engine.

Design, advertising, development, and marketing built for the sectors driving what comes next — AI, fintech, health tech, and beyond.

All industries

Machina — Marketing that moves numbers.

Start a free strategy call
Technology

Audit GA4 collection before trusting your lead count

Traffic can be flowing into GA4 while the lead event never arrives. The second part of this guide shows how to inspect the path, test a server event, and separate a real inquiry from the clicks that came before it.

Francisco Contreras

Francisco Contreras · Founder, Machina

6 min read

An incomplete arc of forest-green impasto strokes surrounds a wide white clearing.

The lead can vanish behind healthy traffic

In the case behind this series, an anonymized pest-control company saw 2,328 events and 527 sessions in a 30-day GA4 report. Its pages were being counted. Its server lead event was not. The contact route sent generate_lead to www.google.com/mp/collect, while the documented web endpoint is www.google-analytics.com/mp/collect. The case audit recorded a 404 response from the wrong host and no server lead events in GA4.

A dashboard built from received events cannot report a missing event. This is why Part 1 starts with a measurement plan: a claim about tracked leads needs an outside record of how many leads the business saved. The audit starts there, then follows each step to the report.

Inventory the setup, then test one real path

Write down the property ID, web stream, measurement ID, events marked as key events, custom dimensions, and data retention. The Admin API can export much of that configuration, while the Data API reads reports. A small site can also make the inventory in the interface. Save a dated copy so a later change has a baseline.

Next, make one test inquiry through the public form. Confirm that the server saved it. Inspect the request or server log for the Measurement Protocol host, response status, event name, and expected fields. Then look for the event in GA4 Realtime and, later, the processed report. Keep the test record ID in the business system; do not send the customer's name or contact details as ordinary GA4 event parameters. Mark each saved lead as eligible only when the required analytics consent and a real browser ID are present. Log the reason for each excluded send as a short code beside the internal lead ID, without personal details in GA4.

Two compact groups of dark-green acrylic slabs stand apart across a white gap.
The inquiry can exist in the office ledger while the GA4 report stays empty. Check the actual server request and GA4 receipt to find the fault.

Fix the host, then prove the event arrived

The host error in the case was a simple string, but its effect was complete. The request went to a general Google web host, which had no GA4 collection path. Change the destination to the Measurement Protocol endpoint for the web stream, using the measurement ID and API secret from that stream. Keep the secret on the server.

Google's validation endpoint is a separate test. Send a representative payload to /debug/mp/collect with strict validation and inspect validationMessages. Validation traffic does not appear in reports, and the validator does not check the API secret. After it passes, send a real test to /mp/collect, check the HTTP status, and confirm the named event appears in Realtime. A 2xx response means the endpoint received the request; Google warns it does not guarantee processing.

A release test passes when the inquiry is saved once, an eligible test sends one generate_lead to the intended stream, the payload has no validation messages, the live request succeeds, and that event appears in Realtime. Record the saved lead ID and time so the two records can be compared. Log delivery failures and reconcile counts after each release. If the server saved ten inquiries and GA4 shows none, investigate before anyone uses the lead report to change spend. Compare the same dates and define which inquiries were eligible for an analytics send, since cookie and consent availability may reduce that count.

Send the identity the browser actually supplied

The case route also tried to create a new client_id from a timestamp when no browser ID was available. That would make an unlinked browser identity rather than recover the visitor who submitted the form. The repaired flow used a captured, real client ID when one existed and skipped the GA4 server send when it did not. The lead still remained in the company's database.

A web server event needs the real client_id. Google also advises sending session_id and engagement_time_msec so visits and time spent are counted well. One way to get the first two values is gtag get in the browser, then pass them with the accepted form to the server. Store only what the flow needs and honor consent. Test with a real browser visit. A server request does not inherit the browser's visit from the measurement ID alone.

A short repair checklist for a server lead event.
CheckWhat to verify
DestinationUse the documented collection host and the intended web stream.
IdentitySend a real client ID; never make one from a timestamp.
SessionInclude the session ID and engagement time when available, then check reporting.
DeliveryValidate structure, inspect the live response, and find the event in Realtime.
CountsCompare eligible saved inquiries with received lead events.

Google Measurement Protocol reference and validation guide; the host and synthetic-ID defects come from the local case audit.

Keep the leads analytics cannot join

The case research counted 29 saved leads; 20 had a client ID and nine did not. That is an observed 20-of-29 capture rate for this small set, not an industry benchmark. The research does not prove why each missing ID was absent. Consent, blocking, tag load, and browser behavior should all be checked before assigning a cause.

Do not erase those nine business records. They still belong in the office's lead and job reports, where staff can follow up and record outcomes. The GA4 count describes the subset with a usable analytics join. Label it that way when you compare reports.

Choose key events from outcomes, not activity

The same property marked a general cta_click as a key event. A button click can help diagnose a page, but it does not show that a homeowner submitted a request. Google distinguishes key events from Google Ads conversions: a meaningful GA4 key event may be used to create an Ads conversion, but the two are separate choices. Review both lists before bidding uses the signal.

Use the measurement plan to choose the canonical event. If the question is how many valid inquiries arrived, choose the server-accepted form; if the question is how many sales-ready leads arrived, choose a later qualified-lead state. A connected phone call may need its own verified outcome. If browser and server both report the same accepted form, keep both only when the reporting purpose is clear and make sure an Ads conversion does not count them as two independent leads. A job application may be important to hiring, yet it should not train an ad campaign seeking customers.

Horizontal forest-green acrylic slabs are interrupted by irregular white channels.
Three button presses can precede one inquiry. Counting clicks as lead outcomes makes the report answer the wrong question.

Check Enhanced Measurement settings too. GA4 can send form_start and form_submit on its own. The site may also send form events. Check names and triggers before you turn either path off. A form attempt and a saved inquiry are different steps.

Leave the audit with a repeatable check

The case also had a two-month event-data retention setting. Google offers 14 months for standard GA4 properties, and says this setting affects Explorations and funnel reports, not standard aggregated reports. Raise it if those reports need a longer view; increasing retention can only preserve data that has not already been deleted.

A useful audit ends with a small routine: one test inquiry after a form release, a check that the server event arrives, and a regular comparison of saved eligible leads with GA4 events. Part 3 carries that verified lead into the later job and builds the checks that keep the path working.

FAQ

Frequently asked questions

Does a 204 response prove GA4 recorded my event?

No. It shows the collection endpoint accepted the HTTP request. Validate the payload separately, use the correct stream credentials, and confirm a live test in Realtime and later reports.

What should I do when a lead has no GA4 client ID?

Keep the lead in the business system. Do not create a fake browser ID to make the analytics event appear attributed. Check the tag, consent, and browser path to understand the missing ID.

Should a CTA click be a GA4 key event?

Only if that click itself is the business outcome you intend to measure. On a lead site it is usually a diagnostic action; an accepted inquiry or qualified call is a better outcome to evaluate.

Can Enhanced Measurement duplicate form tracking?

Yes. Its form interaction option can send form_start and form_submit alongside custom form events. Compare names, triggers, and counts, then keep the collection paths that answer distinct questions.

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.

We use cookies and analytics to understand how visitors use our site and improve your experience. Privacy Policy · Do Not Sell or Share My Personal Information