
A Contact Form 7 report exporter can stop working even when submissions still reach Google Analytics. One common cause is a request containing a valid dimension and a valid metric that cannot be used together. Treat the reporting request as a contract: discover the property’s fields, check the proposed combination, and only then request event data.
This guide concerns a custom GA4 Data API exporter. It does not add tracking to a form or provide credentials. Establish the collection signal first using the GA4 and Google Tag Manager guide, and keep submission counts separate from CRM outcomes.
Write down the question before choosing fields
Start with a sentence such as: “How many recorded cf7_submission events occurred on each reporting date?” That calls for a date grouping, an event count and an exact event-name filter. It does not require every campaign, audience and page dimension available in the property.
Keep a small request specification containing the numeric GA4 property ID, reporting dates, event name, field API names and filters. The numeric property ID is different from a web stream’s G- measurement ID. A copied example using another property’s custom dimension is not evidence that your own property exposes that field.
Also define the unit being counted. Event count is not unique people, accepted CRM records or delivered messages. A technically accepted report request cannot resolve those differences for you. Use the separate inquiry and unique lead metrics when explaining the report to a sales team.
Read property metadata first
Google’s getMetadata reference describes the available dimension and metric definitions. Query the actual property, particularly when using registered custom definitions. Preserve each returned API name with its description so a user-facing label does not silently become an invented request field.
Compare that metadata with the Core Reporting schema. For example, eventName and eventCount are API identifiers, while a friendly spreadsheet heading can say “Submission events.” Keep those presentation labels in a separate mapping.
If the desired form category is absent, review collection and custom-definition registration. Do not substitute another field merely because its name looks similar. Likewise, a missing credential or permission is an access failure, not a reason to label a report as having zero leads.
Use compatibility as a preflight check
The checkCompatibility method evaluates fields that can be added to a Core report. Use the same dimensions, metrics and dimension or metric filters you plan to send to runReport. It is not a compatibility checker for Realtime reports, which follow different rules.
The following request body illustrates a small event report. The event name is an example and must match the name actually collected in your property. Send it to the checkCompatibility endpoint for your numeric property using an authorized reporting client.
{
"dimensions": [{"name": "date"}],
"metrics": [{"name": "eventCount"}],
"dimensionFilter": {
"filter": {
"fieldName": "eventName",
"stringFilter": {
"matchType": "EXACT",
"value": "cf7_submission"
}
}
},
"compatibilityFilter": "COMPATIBLE"
}
The compatibility filter narrows the returned candidates. It does not repair an incompatible starting request. If the proposed set fails, simplify it to a known baseline and add one field at a time. Record which addition caused failure so the next maintainer can reproduce the decision.
Run the report with its own required settings
Once the combination is reviewed, build the runReport request with the required date range and relevant report settings. Remove compatibilityFilter, which belongs to the compatibility call. A passing preflight does not choose dates, confirm collection or fetch report rows.
Store the request specification alongside the exported result. If you later change a filter from one form to all forms, give that report definition a new revision. Otherwise two exports with identical column headings can describe different populations, making an apparent improvement impossible to interpret.
Keep the exporter conservative about errors. An API rejection, expired authorization or exhausted reporting quota should produce a failed refresh status. Preserve the previous successful artifact with its own timestamp rather than overwriting it with an empty “today” report.
Distinguish a valid empty report from a failed request
A successful request with no rows needs investigation of its dates, filters and collection history. First check the exact event spelling and whether the chosen period contains known test activity. Then compare an authorized baseline request without optional dimensions. Do not assume changing the field combination creates missing historical events.
Use the DebugView and Realtime workflow to examine collection separately. Those interfaces answer a different question from a processed Core report. Their observations should be recorded with timestamps rather than treated as a promise of immediate historical export availability.
Approve a small reporting fixture
Before scheduling exports, retain a sanitized request and a sample response from an authorized test property. Check returned headers, dates and numeric values against the request specification. Test one deliberate invalid field and confirm the exporter reports failure visibly. Use synthetic records when testing downstream spreadsheet transformations.
For WordPress-side submission trends, review Svetlik Analytics for Contact Form 7, our free plugin. The custom GA4 API workflow remains separate. A useful report makes its source, counted event and last successful refresh clear enough that readers can decide whether the numbers answer their question.
