Skip to main content
Glama

SEO GSC Wizard MCP

GA4 custom dimension breakdown

query_ga4_custom_dimensions
Read-only

Breaks GA4 traffic down by ONE custom dimension registered on the property linked to a site (the site's own event parameters or user properties, e.g. customEvent:source_format), optionally CROSSED with a second dimension - which is how a question like "which article sent how many readers to which page" is answered: primary customEvent:source_path, secondary customEvent:target_path, filtered to the one event that carries them. Metrics per row are eventCount, sessions, activeUsers and keyEvents, plus any registered custom metrics asked for. Run list_ga4_custom_dimensions first for the exact names; an unregistered name is rejected here rather than silently returning an empty report. Returns a notConfigured result (not an error) 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 breakdown rows returned.
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
dimensionNoapiName of the custom dimension to break down by, from list_ga4_custom_dimensions (e.g. customEvent:source_format). Omit to use the property's first registered custom dimension; the response reports the choice.
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".
valueFiltersNoNarrow the whole report to rows whose custom dimension matches a value - the way to drill from "every source_path" into "the target pages of ONE source_path". Filters AND together.
customMetricsNoUp to 3 registered custom METRIC apiNames to add as extra columns (from list_ga4_custom_dimensions metricNames).
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).
secondaryDimensionNoOptional second dimension to cross the first with, producing one row per PAIR of values. Either another custom dimension apiName, or one of: eventName, pagePath, landingPage, sessionDefaultChannelGroup, sessionSourceMedium, country, deviceCategory.
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
rowsNo
rangeNo
reasonNo
accountNo
metricsNo
siteUrlNo
summaryNoMetric totals keyed by GA4 metric name.
rowCountNo
timeZoneNo
dimensionNo
siteScopeNo
totalRowsNo
truncatedNo
dataSourceNo
propertyIdNo
prevSummaryNo
hasComparisonNo
notConfiguredNo
reauthRequiredNo
comparisonRangeNo
availableMetricsNo
secondaryDimensionNo
availableDimensionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 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 / reauthRequired
      Added value: +{
      +  "$ref": "#/properties/hasComparison"
      +}
  2. Changed6 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"
      +}
    • changedOutput schema / properties / availableDimensions / $ref
      Previous value: -"#/properties/metrics"New value: +"#/properties/siteScope/anyOf/0/properties/hostnames"
    • changedOutput schema / properties / availableMetrics / $ref
      Previous value: -"#/properties/metrics"New value: +"#/properties/siteScope/anyOf/0/properties/hostnames"
    • addedOutput schema / properties / metrics / $ref
      Added value: +"#/properties/siteScope/anyOf/0/properties/hostnames"
    • removedOutput schema / properties / metrics / 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"
      +    }
      +  ]
      +}
  3. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources