PilotMCP

Google Analytics 4

Les 35 outils de lecture que Pilot MCP sert pour Google Analytics 4, tirés du serveur.

Pilot MCP sert 35 outils pour Google Analytics 4, tous en lecture. Leur nom commence par google_analytics_. Les 31 outils d'écriture du connecteur ne sont pas servis : Pilot MCP est en lecture seule.

Google Analytics 4 en lecture : rapports (standard, croisés, temps réel, entonnoirs), propriétés et flux, événements clés, dimensions et métriques, audiences, liens et accès.

Ce que dit chaque fiche

Le nom, la description et les paramètres viennent de la liste que le serveur sert à votre assistant (tools/list). Les descriptions sont en anglais : c'est le texte que votre assistant reçoit. Votre assistant n'a pas à remplir les accès à la régie : Pilot les ajoute à chaque appel.

Familles d'outils

Audiences

google_analytics_get_audience

Google Analytics: Get Audience · lecture · rejouable

Get details of a single audience by its ID. Returns the audience's display name, description, membership duration, event trigger, exclusion duration mode, and filter clauses. Example: get_audience({ propertyId: "123456789", audienceId: "1234" })

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID.
audienceIdstringouiAudience ID (numeric string), e.g. "1234".

google_analytics_get_audience_export

Google Analytics: Get Audience Export · lecture · rejouable

Get the status and metadata of an audience export.

Description complète, telle que le serveur la sert
Get the status and metadata of an audience export.

Use this after calling create_audience_export to check whether the export has
completed processing. The response includes:
  - name: resource name of the export
  - audience: which audience was exported
  - audienceDisplayName: human-readable name
  - state: "CREATING", "ACTIVE", "FAILED"
  - beginCreatingTime / creationQuotaTokensCharged
  - rowCount: number of users in the export (once active)
  - dimensions: which dimensions were requested

Poll this endpoint until state === "ACTIVE" before calling query_audience_export.

Full reference: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get
ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID.
audienceExportIdstringouiThe audience export ID (numeric), e.g. "12345". The full resource name is constructed automatically.

google_analytics_get_expanded_data_set

Google Analytics: Get Expanded Data Set · lecture · rejouable

Retrieves a single expanded data set by its ID for a GA4 property. Returns the full expanded data set resource including its display name, dimension names, metric names, and dimension filter expression.

ParamètreTypeRequisDescription
propertyIdstring ou numbernonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. 123456789 or "properties/123456789").
expandedDataSetIdstringouiThe ID of the expanded data set to retrieve.

google_analytics_list_audience_exports

Google Analytics: List Audience Exports · lecture · rejouable

List all audience exports for a GA4 property.

Description complète, telle que le serveur la sert
List all audience exports for a GA4 property.

Returns an array of audience export resources with their current state,
audience info, dimensions, and row counts. Useful for discovering existing
exports or checking on multiple exports at once.

Each export in the list includes:
  - name: full resource name
  - audience / audienceDisplayName
  - state: "CREATING", "ACTIVE", or "FAILED"
  - dimensions, rowCount, creation time, etc.

Full reference: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list
ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. "123456789" or "properties/123456789".

google_analytics_list_audiences

Google Analytics: List Audiences · lecture · rejouable

List all audiences defined on a GA4 property. Returns each audience's resource name, display name, description, membership duration, and filter clauses. Example: list_audiences({ propertyId: "123456789" })

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. "123456789" or "properties/123456789".

google_analytics_list_expanded_data_sets

Google Analytics: List Expanded Data Sets · lecture · rejouable

Lists all expanded data sets for a GA4 property. Expanded data sets allow you to create pre-defined combinations of dimensions and metrics that can be used for reporting. Returns an array of expanded data set resources including their display names, dimension names, and metric names.

ParamètreTypeRequisDescription
propertyIdstring ou numbernonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. 123456789 or "properties/123456789").

Événements clés, dimensions et métriques

google_analytics_get_channel_group

Google Analytics: Get Channel Group · lecture · rejouable

Retrieves a single custom channel group by its ID. Returns the full channel group resource including display name, description, and all grouping rules that define how traffic is categorized.

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. "123456789" or "properties/123456789").
channelGroupIdstringouiThe channel group ID to retrieve.

google_analytics_get_custom_dimension

Google Analytics: Get Custom Dimension · lecture · rejouable

Retrieves a single custom dimension by its ID for a GA4 property. Returns the full custom dimension resource including parameter name, display name, scope, and description.

ParamètreTypeRequisDescription
propertyIdstring ou numbernonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. 123456789 or "properties/123456789").
customDimensionIdstringouiThe ID of the custom dimension to retrieve.

google_analytics_get_custom_dimensions_and_metrics

Google Analytics: Get Custom Dimensions and Metrics · lecture · rejouable

Retrieve only the custom dimensions and custom metrics defined for a GA4 property.

Description complète, telle que le serveur la sert
Retrieve only the custom dimensions and custom metrics defined for a GA4 property.

This is a convenience wrapper around get_metadata that filters results to only
include fields where customDefinition === true.

Returns:
  {
    custom_dimensions: [ {apiName, uiName, description, ...}, ... ],
    custom_metrics:    [ {apiName, uiName, description, ...}, ... ]
  }

Custom dimensions/metrics are those you define yourself in GA4 Admin > Custom definitions.
They typically have apiNames like "customEvent:my_param" or "customUser:my_property".

Use this when you need to discover property-specific custom fields for reporting.

Full reference: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/getMetadata
ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. "123456789" or "properties/123456789".

google_analytics_get_custom_metric

Google Analytics: Get Custom Metric · lecture · rejouable

Retrieves a single custom metric by its ID for a GA4 property. Returns the full custom metric resource including parameter name, display name, scope, measurement unit, and description.

ParamètreTypeRequisDescription
propertyIdstring ou numbernonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. 123456789 or "properties/123456789").
customMetricIdstringouiThe ID of the custom metric to retrieve.

google_analytics_get_key_event

Google Analytics: Get Key Event · lecture · rejouable

Get details of a single key event by its ID. Returns the event name, counting method, default value, and timestamps. Example: get_key_event({ propertyId: "123456789", keyEventId: "5678" })

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID.
keyEventIdstringouiKey event ID (numeric string), e.g. "5678".

google_analytics_list_channel_groups

Google Analytics: List Channel Groups · lecture · rejouable

Lists all custom channel groups defined on a GA4 property. Channel groups let you organize traffic sources into meaningful categories for reporting. Returns an array of channel group resources including their display names, descriptions, and grouping rules.

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. "123456789" or "properties/123456789").

google_analytics_list_custom_dimensions

Google Analytics: List Custom Dimensions · lecture · rejouable

Lists all custom dimensions for a GA4 property. Returns an array of custom dimension resources including their parameter names, display names, scopes, and descriptions.

ParamètreTypeRequisDescription
propertyIdstring ou numbernonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. 123456789 or "properties/123456789").

google_analytics_list_custom_metrics

Google Analytics: List Custom Metrics · lecture · rejouable

Lists all custom metrics for a GA4 property. Returns an array of custom metric resources including their parameter names, display names, scopes, measurement units, and descriptions.

ParamètreTypeRequisDescription
propertyIdstring ou numbernonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. 123456789 or "properties/123456789").

google_analytics_list_key_events

Google Analytics: List Key Events · lecture · rejouable

List all key events (conversions) configured on a GA4 property. Returns each key event's resource name, event name, counting method, create/update times, and default value settings. Example: list_key_events({ propertyId: "123456789" })

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. "123456789" or "properties/123456789".

Liens et accès

Google Analytics: Get Firebase Link · lecture · rejouable

Get details for a specific Firebase link on a GA4 property. Returns the link's Firebase project ID, creation timestamp, and full resource name.

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. '123456789' or 'properties/123456789'.
firebaseLinkIdstringouiThe Firebase link ID to retrieve.

Google Analytics: Get Google Ads Link · lecture · rejouable

Get details for a specific Google Ads link on a GA4 property. Returns the link's Google Ads customer ID, ads personalization setting, creator email address, and creation timestamp.

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. '123456789' or 'properties/123456789'.
googleAdsLinkIdstringouiThe Google Ads link ID to retrieve.

Google Analytics: List Firebase Links · lecture · rejouable

List all Firebase links for a GA4 property. Returns each link's Firebase project ID, creation timestamp, and resource name. Useful for auditing which Firebase projects are connected to a property.

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. '123456789' or 'properties/123456789'.

Google Analytics: List Google Ads Links · lecture · rejouable

List all Google Ads links for a GA4 property. Returns each link's Google Ads customer ID, ads personalization setting, creator email, and creation timestamp. Useful for auditing which Google Ads accounts are connected to a property.

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. '123456789' or 'properties/123456789'.

Propriétés et flux

google_analytics_get_account_summaries

Google Analytics: Get Account Summaries · lecture · rejouable

List summaries of all Google Analytics 4 accounts and their properties accessible to the authenticated user. Each summary includes the account name, display name, and a list of property summaries (property ID, display name, and property type). Useful for getting a quick overview of the entire account hierarchy without fetching full details.

ParamètreTypeRequisDescription
account_idstringnonGoogle Analytics property to use when the workspace has several, as returned by the property listing tool. Default: the first property linked to the workspace.

google_analytics_get_data_stream

Google Analytics: Get Data Stream · lecture · rejouable

Get details for a specific data stream under a Google Analytics 4 property. Returns the data stream type, display name, stream ID, measurement ID (for web streams), creation time, and update time. The propertyId can be a plain numeric ID (e.g. "123456") or the full resource name (e.g. "properties/123456").

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. '123456' or 'properties/123456'.
dataStreamIdstringouiData stream ID, e.g. '1000001'.

google_analytics_get_enhanced_measurement_settings

Google Analytics: Get Enhanced Measurement Settings · lecture · rejouable

Retrieves the enhanced measurement settings for a specific web data stream on a GA4 property. Enhanced measurement automatically tracks common user interactions such as page views, scrolls, outbound clicks, site search, video engagement, file downloads, page changes (history events), and form interactions - without requiring additional code. Returns the current enabled/disabled state of each enhanced measurement feature.

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. "123456789" or "properties/123456789").
dataStreamIdstringouiThe web data stream ID whose enhanced measurement settings to retrieve.

google_analytics_get_property

Google Analytics: Get Property · lecture · rejouable

Retrieve detailed information about a single GA4 property, including its display name, create time, update time, time zone, currency code, service level, and industry category.

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. The GA4 property ID (e.g. "123456789" or "properties/123456789").

google_analytics_list_data_streams

Google Analytics: List Data Streams · lecture · rejouable

List all data streams under a Google Analytics 4 property. Returns details for each data stream including its type (web, Android app, or iOS app), display name, stream ID, measurement ID (for web), and creation/update timestamps. Use this to discover which data streams are configured for a property.

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. '123456' or 'properties/123456'.

google_analytics_list_properties

Google Analytics: List Properties · lecture · rejouable

List all GA4 properties under a given account. Returns property IDs, display names, time zones, currency codes, and other metadata for every property the caller can access.

ParamètreTypeRequisDescription
accountIdstringouiThe GA4 account ID (e.g. "123456789" or "accounts/123456789").
account_idstringnonGoogle Analytics property to use when the workspace has several, as returned by the property listing tool. Default: the first property linked to the workspace.

google_analytics_list_property_annotations

Google Analytics: List Property Annotations · lecture · rejouable

Lists all reporting data annotations on a GA4 property. Annotations are date-stamped notes that provide context for data changes (e.g. marketing launches, site changes, external events). Useful for understanding why metrics shifted on specific dates. NOTE: This endpoint may require the Analytics Admin API alpha.

ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. "123456789" or "properties/123456789").

google_analytics_search_change_history_events

Google Analytics: Search Change History Events · lecture · rejouable

Search change history events for a Google Analytics 4 account. Returns a list of changes made to the account and its child resources (properties, data streams, etc.), including who made the change and when.

Description complète, telle que le serveur la sert
Search change history events for a Google Analytics 4 account. Returns a list of changes made to the account and its child resources (properties, data streams, etc.), including who made the change and when.

Parameters:
  - accountId (required): The account to search, e.g. "123456" or "accounts/123456".
  - propertyId (optional): Narrow results to a specific property, e.g. "properties/123456".
  - resourceType (optional): Filter by resource types. Values include:
      "ACCOUNT", "PROPERTY", "FIREBASE_LINK", "GOOGLE_ADS_LINK",
      "CONVERSION_EVENT", "CUSTOM_DIMENSION", "CUSTOM_METRIC",
      "DATA_RETENTION_SETTINGS", "DATA_STREAM", etc.
    Example: ["PROPERTY", "DATA_STREAM"]
  - action (optional): Filter by change actions. Values: "CREATED", "UPDATED", "DELETED".
    Example: ["CREATED", "UPDATED"]
  - earliestChangeTime (optional): ISO 8601 date string, e.g. "2024-01-01T00:00:00Z".
  - latestChangeTime (optional): ISO 8601 date string, e.g. "2024-12-31T23:59:59Z".
  - pageSize (optional): Maximum number of results to return.
ParamètreTypeRequisDescription
accountIdstringouiAccount ID, e.g. '123456' or 'accounts/123456'.
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. Optional property resource name to filter by, e.g. 'properties/123456'.
resourceTypestring[]nonOptional list of resource types to filter by, e.g. ["PROPERTY","DATA_STREAM"].
actionstring[]nonOptional list of change actions to filter by, e.g. ["CREATED","UPDATED","DELETED"].
earliestChangeTimestringnonOptional earliest change time as ISO 8601 string, e.g. "2024-01-01T00:00:00Z".
latestChangeTimestringnonOptional latest change time as ISO 8601 string, e.g. "2024-12-31T23:59:59Z".
pageSizenumbernonOptional maximum number of results to return.

Rapports

google_analytics_batch_run_pivot_reports

Google Analytics: Batch Run Pivot Reports · lecture · rejouable

Run up to 5 GA4 pivot reports in a single batch request.

Description complète, telle que le serveur la sert
Run up to 5 GA4 pivot reports in a single batch request.

Each request in the array follows the same schema as run_pivot_report
(dateRanges, dimensions, metrics, pivots, filters, etc.).

Useful for running multiple pivot analyses (e.g. different date ranges or dimension
combinations) with a single API call.

Full reference: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/batchRunPivotReports
ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID.
requestsobject[]ouiArray of pivot report requests (max 5).

google_analytics_batch_run_reports

Google Analytics: Batch Run Reports · lecture · rejouable

Run up to 5 GA4 reports in a single batch request. Each request object follows the same schema as run_report (dateRanges, dimensions, metrics, filters, orderBys, etc.).

Description complète, telle que le serveur la sert
Run up to 5 GA4 reports in a single batch request. Each request object follows the same
schema as run_report (dateRanges, dimensions, metrics, filters, orderBys, etc.).

Batching is useful when you need several related reports for the same property and want
to minimise API round-trips and quota usage.

Full reference: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/batchRunReports

Each request in the array should have:
  - dateRanges: [{startDate, endDate, name?}, ...]
  - dimensions: ["dim1", "dim2", ...]
  - metrics: ["metric1", "metric2", ...]
  - dimensionFilter (optional): FilterExpression object
  - metricFilter (optional): FilterExpression object
  - orderBys (optional): [{dimension:{dimensionName}, desc?}, ...]
  - limit (optional): max rows per sub-report
  - offset (optional): row offset
  - currencyCode (optional)
  - keepEmptyRows (optional)
  - returnPropertyQuota (optional)

See run_report tool description for detailed examples of filters and ordering.
ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID.
requestsobject[]ouiArray of report requests (max 5).

google_analytics_check_compatibility

Google Analytics: Check Compatibility · lecture · rejouable

Check whether specific dimensions and metrics can be used together in a GA4 report.

Description complète, telle que le serveur la sert
Check whether specific dimensions and metrics can be used together in a GA4 report.

Not all dimension/metric combinations are compatible. This tool lets you validate
a proposed report configuration before running it.

Returns:
  - dimensionCompatibilities: for each dimension, whether it is compatible.
  - metricCompatibilities: for each metric, whether it is compatible.

Example use case: You want to report on "sessionSource" + "itemName" + "sessions" +
"itemRevenue" - call check_compatibility first to verify the combination is valid.

Full reference: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/checkCompatibility
ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID.
dimensionsstring[]nonDimension names to check, e.g. ["date","country","sessionSource"].
metricsstring[]nonMetric names to check, e.g. ["sessions","totalUsers","bounceRate"].
dimensionFilterobjectnonGA4 FilterExpression object. See run_report tool for detailed examples.
metricFilteranynonGA4 FilterExpression object. See run_report tool for detailed examples.

google_analytics_get_metadata

Google Analytics: Get Metadata · lecture · rejouable

Retrieve all available dimensions and metrics for a GA4 property.

Description complète, telle que le serveur la sert
Retrieve all available dimensions and metrics for a GA4 property.

Returns the complete metadata catalogue including:
  - All standard dimensions and metrics available for the property.
  - Custom dimensions and metrics (marked with customDefinition: true).
  - API name, UI name, description, category, and data type for each.

This is the authoritative source for which dimensions/metrics are valid
when building reports for a specific property. Different properties may
have different available fields depending on configuration.

Use this before building a report to discover exact field names.

Full reference: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/getMetadata
ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. "123456789" or "properties/123456789".

google_analytics_run_funnel_report

Google Analytics: Run Funnel Report · lecture · rejouable

Run a funnel report to analyze user conversion paths through defined steps. This is an alpha API feature. Each funnel step defines a condition users must meet. The report shows how users progress through (or drop off from) each step.

Description complète, telle que le serveur la sert
Run a funnel report to analyze user conversion paths through defined steps. This is an alpha API feature. Each funnel step defines a condition users must meet. The report shows how users progress through (or drop off from) each step.

The funnel configuration requires a 'steps' array where each step has:
  - 'name': A label for the step (e.g. "First visit", "Add to cart", "Purchase").
  - 'filterExpression': An object describing the condition (andGroup, orGroup, notExpression, funnelFieldFilter, or funnelEventFilter).

Optional funnel-level fields:
  - 'isOpenFunnel' (boolean, default false): When true, users can enter the funnel at any step rather than only the first.

You can also provide:
  - funnelBreakdown: Adds a dimension to break down each step (e.g. by deviceCategory).
  - funnelNextAction: Shows what users did after each step.

Response includes 'funnelTable' (tabular data) and 'funnelVisualization' (summary counts per step).

NOTE: This is an alpha API. If you receive a NOT_FOUND or UNIMPLEMENTED error, the alpha API may not be enabled for this property.

Full reference: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/runFunnelReport
ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. '123456789'.
dateRangesobject[]ouiDate ranges for the funnel report, e.g. [{"startDate":"2024-01-01","endDate":"2024-01-31"}].
funnelobjectouiFunnel configuration object. Must include 'steps' array where each step has 'name' (string) and 'filterExpression' (object with andGroup/orGroup/notExpression/funnelFieldFilter/funnelEventFilter). Optional: 'isOpenFunnel' (boolean, default false).
funnelBreakdownobjectnonOptional breakdown dimension for the funnel. Object with 'breakdownDimension' containing 'name' (string, e.g. 'deviceCategory') and optional 'limit' (number).
funnelNextActionobjectnonOptional next action dimension. Object with 'nextActionDimension' containing 'name' (string) and optional 'limit' (number).
limitnumbernonMaximum number of rows to return.

google_analytics_run_pivot_report

Google Analytics: Run Pivot Report · lecture · rejouable

Run a GA4 pivot report. Pivot reports create cross-tabulations (like Excel pivot tables) by rotating dimension values into column headers.

Description complète, telle que le serveur la sert
Run a GA4 pivot report. Pivot reports create cross-tabulations (like Excel pivot tables)
by rotating dimension values into column headers.

This is ideal for creating tables where:
  - Rows represent one dimension (e.g. country)
  - Columns represent another dimension (e.g. device category)
  - Cells contain metric values (e.g. sessions)

PIVOTS - each pivot defines a set of dimensions to rotate into columns:
  Example: {fieldNames: ["deviceCategory"], limit: 3}
  This creates columns for the top 3 device categories.

  Multiple pivots can be used to create multi-level column headers:
    pivots: [
      {fieldNames: ["browser"], limit: 5},
      {fieldNames: ["deviceCategory"], limit: 3}
    ]

DIMENSIONS & METRICS - same as run_report. All dimensions referenced by pivots
  must be included in the top-level dimensions array.
  Reference: https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema

DATE RANGES - same as run_report.
  Example: [{startDate: "30daysAgo", endDate: "yesterday"}]

Full reference: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runPivotReport
ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. "123456789".
dateRangesobject[]ouiOne or more date ranges.
dimensionsstring[]ouiAll dimension names (must include those referenced in pivots).
metricsstring[]ouiMetric names, e.g. ["sessions","totalUsers"].
pivotsobject[]ouiPivot definitions (at least one required).
dimensionFilterobjectnonGA4 FilterExpression object. See run_report tool for detailed examples. Docs: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/FilterExpression.
metricFilteranynonGA4 FilterExpression object. See run_report tool for detailed examples. Docs: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/FilterExpression.
currencyCodestringnonCurrency code, e.g. "USD".
keepEmptyRowsbooleannonInclude rows where all metrics are zero.
returnPropertyQuotabooleannonReturn quota usage info.

google_analytics_run_realtime_report

Google Analytics: Run Realtime Report · lecture · rejouable

Run a GA4 realtime report. Returns data about activity on the property within the last 30 minutes (or up to 60 minutes for some dimensions/metrics).

Description complète, telle que le serveur la sert
Run a GA4 realtime report. Returns data about activity on the property within the last 30 minutes
(or up to 60 minutes for some dimensions/metrics).

REALTIME DIMENSIONS - a subset of standard dimensions plus realtime-specific ones.
  Reference: https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions
  Common examples:
    "city", "country", "deviceCategory", "platform", "unifiedScreenName",
    "unifiedScreenClass", "audienceName", "minutesAgo",
    "streamName", "eventName", "conversions".

REALTIME METRICS - realtime-specific metrics.
  Reference: https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics
  Common examples:
    "activeUsers", "screenPageViews", "eventCount", "conversions",
    "keyEvents".

NOTE: Realtime reports do NOT accept dateRanges - data always covers the
last 30 minutes of activity.

DIMENSION FILTER - same FilterExpression structure as regular reports:
  String filter: {"filter":{"fieldName":"country","stringFilter":{"matchType":"EXACT","value":"United States"}}}
  In-list:       {"filter":{"fieldName":"eventName","inListFilter":{"values":["page_view","scroll"]}}}

ORDER BYS:
  [{"metric":{"metricName":"activeUsers"},"desc":true}]

Full reference: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runRealtimeReport
ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. "123456789".
dimensionsstring[]nonRealtime dimension names. See https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions.
metricsstring[]nonRealtime metric names. See https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics.
dimensionFilterobjectnonGA4 FilterExpression object. Same structure as regular reports. See run_report tool for detailed filter examples.
metricFilteranynonGA4 FilterExpression object. Same structure as regular reports. See run_report tool for detailed filter examples.
orderBysobject[]nonOrdering specification.
limitnumbernonMax rows to return.
returnPropertyQuotabooleannonReturn quota usage info.

google_analytics_run_report

Google Analytics: Run Report · lecture · rejouable

Run a standard GA4 report. Returns rows of dimension/metric values for the given property.

Description complète, telle que le serveur la sert
Run a standard GA4 report. Returns rows of dimension/metric values for the given property.

DIMENSIONS - name strings from the GA4 schema.
  Reference: https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions
  Common examples: "date", "city", "country", "sessionSource", "sessionMedium",
  "sessionDefaultChannelGroup", "pagePath", "pageTitle", "eventName",
  "deviceCategory", "operatingSystem", "browser", "language",
  "firstUserSource", "firstUserMedium", "unifiedScreenName".

METRICS - name strings from the GA4 schema.
  Reference: https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics
  Common examples: "sessions", "totalUsers", "newUsers", "activeUsers",
  "screenPageViews", "engagedSessions", "engagementRate",
  "averageSessionDuration", "eventCount", "conversions",
  "totalRevenue", "bounceRate", "sessionsPerUser".

DATE RANGES - each with startDate and endDate.
  Examples:
    {startDate: "2025-01-01", endDate: "2025-01-31"}
    {startDate: "30daysAgo",  endDate: "yesterday"}
    {startDate: "7daysAgo",   endDate: "today"}

DIMENSION FILTER - a FilterExpression JSON object. Examples:
  String filter:   {"filter":{"fieldName":"country","stringFilter":{"matchType":"EXACT","value":"United States"}}}
  In-list filter:  {"filter":{"fieldName":"eventName","inListFilter":{"values":["page_view","scroll"]}}}
  Numeric filter:  {"filter":{"fieldName":"sessions","numericFilter":{"operation":"GREATER_THAN","value":{"int64Value":"100"}}}}
  AND group:       {"andGroup":{"expressions":[...]}}
  OR group:        {"orGroup":{"expressions":[...]}}

ORDER BYS - array of ordering objects. Examples:
  By dimension (ascending):  [{"dimension":{"dimensionName":"date"}}]
  By metric (descending):    [{"metric":{"metricName":"sessions"},"desc":true}]

Full API reference: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runReport
ParamètreTypeRequisDescription
propertyIdstringnonOptional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. "123456789" or "properties/123456789".
dateRangesobject[]ouiOne or more date ranges for the report.
dimensionsstring[]ouiDimension names to include, e.g. ["date","country"].
metricsstring[]ouiMetric names to include, e.g. ["sessions","totalUsers"].
dimensionFilterobjectnonA GA4 FilterExpression object (recursive). Examples: - String filter: {"filter":{"fieldName":"country","stringFilter":{"matchType":"EXACT","value":"United States"}}} - In-list filter: {"filter":{"fieldName":"eventName","inListFilter":{"values":["page_view","scroll"]}}} - Numeric filter: {"filter":{"fieldName":"sessions","numericFilter":{"operation":"GREATER_THAN","value":{"int64Value":"100"}}}} - AND group: {"andGroup":{"expressions":[<FilterExpression>,...]}} - OR group: {"orGroup":{"expressions":[<FilterExpression>,...]}} - NOT: {"notExpression":<FilterExpression>} See https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/FilterExpression.
metricFilteranynonA GA4 FilterExpression object (recursive). Examples: - String filter: {"filter":{"fieldName":"country","stringFilter":{"matchType":"EXACT","value":"United States"}}} - In-list filter: {"filter":{"fieldName":"eventName","inListFilter":{"values":["page_view","scroll"]}}} - Numeric filter: {"filter":{"fieldName":"sessions","numericFilter":{"operation":"GREATER_THAN","value":{"int64Value":"100"}}}} - AND group: {"andGroup":{"expressions":[<FilterExpression>,...]}} - OR group: {"orGroup":{"expressions":[<FilterExpression>,...]}} - NOT: {"notExpression":<FilterExpression>} See https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/FilterExpression.
orderBysobject[]nonOrdering specification for the result rows.
limitnumbernonMax rows to return (default API limit applies). Max 250 000.
offsetnumbernonRow offset for pagination.
currencyCodestringnonCurrency code for revenue metrics, e.g. "USD".
keepEmptyRowsbooleannonIf true, include rows where all metrics are zero.
returnPropertyQuotabooleannonIf true, include quota usage info in the response.

Sur cette page