GA4 key events (conversions)
get_ga4_key_eventsSegments the GA4 property linked to the site on ONE key event (conversion, e.g. form_submit): totals, session/user conversion rates, and per channel, source, landing page, page, country and device breakdowns. Also lists the available key events on the property. When keyEvent is omitted, the most active key event in the period is picked automatically. A keyEvent that is not marked as a key event in GA4 returns plain event counts instead (isKeyEvent: false, with a note). A key event whose name has characters other than letters, digits and _ (e.g. "Sign Up") is reported through an event filter instead, with metricMode "event_filter" and a note on what the numbers mean. rawEventCount is the plain count of the event; when GA4 counted fewer key events than that (marked as a key event after it fired, or counted once per session), a note explains the gap. Rates (sessionKeyEventRate, userKeyEventRate) are fractions 0-1, not percentages. Returns a notConfigured result when Google Analytics is not connected or no GA4 property is linked. Date range is optional: omit startDate/endDate to analyze the last 28 settled days (data lags ~2-3 days).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of rows per breakdown table. | |
| endDate | No | Optional. Window end as YYYY-MM-DD (e.g. 2026-05-31). You do NOT need to know today's date or the latest available date: omit this and the server uses the latest settled Search Console date (data lags ~2-3 days behind today). Never pass null or the string "null". | |
| filters | No | Optional GA4 dimension filters applied to every report in the call. Within a list field the values OR together; different fields AND together. Omit entirely for unfiltered data. | |
| siteUrl | Yes | ||
| keyEvent | No | GA4 key event name to segment on (e.g. form_submit). Omit to pick the most active key event of the period automatically; the response lists all available names. | |
| startDate | No | Optional. Window start as YYYY-MM-DD (e.g. 2026-05-03). You do NOT need to know today's date. Omit BOTH startDate and endDate to analyze the last 28 settled days automatically (Search Console data lags ~2-3 days). Never pass null or the string "null". | |
| comparisonEndDate | No | Optional. End of the comparison period as YYYY-MM-DD. Provide BOTH comparison dates to compare two periods; omit both for no comparison (prev* fields are then 0 and hasComparison false). | |
| comparisonStartDate | No | Optional. Start of the comparison period as YYYY-MM-DD. Provide BOTH comparison dates to compare two periods; omit both for no comparison (prev* fields are then 0 and hasComparison false). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | No | ||
| note | No | ||
| pages | No | ||
| range | No | ||
| reason | No | ||
| account | No | ||
| devices | No | ||
| siteUrl | No | ||
| sources | No | ||
| summary | No | Metric totals keyed by GA4 metric name. | |
| channels | No | ||
| keyEvent | No | ||
| timeZone | No | ||
| countries | No | ||
| keyEvents | No | ||
| siteScope | No | ||
| dataSource | No | ||
| isKeyEvent | No | ||
| metricMode | No | ||
| propertyId | No | ||
| prevSummary | No | ||
| currencyCode | No | ||
| landingPages | No | ||
| hasComparison | No | ||
| keyEventNames | No | ||
| notConfigured | No | ||
| rawEventCount | No | ||
| reauthRequired | No | ||
| comparisonRange | No | ||
| prevRawEventCount | No | ||
| propertyDisplayName | No |