Skip to main content
Glama

SEO GSC Wizard MCP

GA4 key events (conversions)

get_ga4_key_events
Read-only

Segments 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

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of rows per breakdown table.
endDateNoOptional. 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".
filtersNoOptional 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.
siteUrlYes
keyEventNoGA4 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.
startDateNoOptional. 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".
comparisonEndDateNoOptional. 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).
comparisonStartDateNoOptional. 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

TableJSON Schema
NameRequiredDescriptionDefault
hintNo
noteNo
pagesNo
rangeNo
reasonNo
accountNo
devicesNo
siteUrlNo
sourcesNo
summaryNoMetric totals keyed by GA4 metric name.
channelsNo
keyEventNo
timeZoneNo
countriesNo
keyEventsNo
siteScopeNo
dataSourceNo
isKeyEventNo
metricModeNo
propertyIdNo
prevSummaryNo
currencyCodeNo
landingPagesNo
hasComparisonNo
keyEventNamesNo
notConfiguredNo
rawEventCountNo
reauthRequiredNo
comparisonRangeNo
prevRawEventCountNo
propertyDisplayNameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / filters / properties / hostName / description
      Previous value: -"GA4 hostName values, matched exactly (any of), e.g. [\"www.example.com\"]. When the linked GA4 property is shared with other sites, results are already limited to this site's hostnames (see `siteScope` in the response); setting hostName replaces that automatic scope, e.g. to read another stream or several hosts at once."New value: +"GA4 hostName values, matched exactly (any of), e.g. [\"www.example.com\"]. When the linked GA4 property is shared with other sites, results are already limited to this site's hostnames (see `siteScope` in the response). For the property owner, setting hostName replaces that automatic scope, e.g. to read another stream or several hosts at once; on a property shared with you it only narrows within the scope."
    • addedOutput schema / properties / metricMode
      Added value: +{
      +  "$ref": "#/properties/siteUrl"
      +}
    • addedOutput schema / properties / reauthRequired
      Added value: +{
      +  "$ref": "#/properties/hasComparison"
      +}
  2. Changed2 schema fields changed
    • addedOutput schema / properties / prevRawEventCount
      Added value: +{
      +  "$ref": "#/properties/range/anyOf/0/properties/days"
      +}
    • addedOutput schema / properties / rawEventCount
      Added value: +{
      +  "$ref": "#/properties/range/anyOf/0/properties/days"
      +}
  3. Changed5 schema fields changed
    • addedInput schema / properties / filters / properties / hostName
      Added value: +{
      +  "description": "GA4 hostName values, matched exactly (any of), e.g. [\"www.example.com\"]. When the linked GA4 property is shared with other sites, results are already limited to this site's hostnames (see `siteScope` in the response); setting hostName replaces that automatic scope, e.g. to read another stream or several hosts at once.",
      +  "items": {
      +    "maxLength": 256,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 300,
      +  "type": "array"
      +}
    • addedOutput schema / properties / isKeyEvent
      Added value: +{
      +  "$ref": "#/properties/hasComparison"
      +}
    • addedOutput schema / properties / keyEventNames / $ref
      Added value: +"#/properties/siteScope/anyOf/0/properties/hostnames"
    • removedOutput schema / properties / keyEventNames / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / siteScope
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "hostnames": {
      +          "anyOf": [
      +            {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "includesSubdomainsOf": {
      +          "$ref": "#/properties/siteUrl"
      +        },
      +        "note": {
      +          "$ref": "#/properties/siteUrl"
      +        },
      +        "sharedWithSites": {
      +          "$ref": "#/properties/siteScope/anyOf/0/properties/hostnames"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  4. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources