# Google Analytics 4

Source : https://pilot.braike.com/docs/regies/google-analytics

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.

<Callout title="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.
</Callout>

## Familles d'outils [#familles]

| Famille | Outils |
| --- | ---: |
| [Audiences](#audiences) | 6 |
| [Événements clés, dimensions et métriques](#evenements) | 9 |
| [Liens et accès](#liens-acces) | 4 |
| [Propriétés et flux](#proprietes) | 8 |
| [Rapports](#rapports) | 8 |

## Audiences [#audiences]

### `google_analytics_get_audience` [#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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID. |
| `audienceId` | `string` | oui | Audience ID (numeric string), e.g. "1234". |

### `google_analytics_get_audience_export` [#google_analytics_get_audience_export]

**Google Analytics: Get Audience Export** · lecture · rejouable

Get the status and metadata of an audience export.

<details>
<summary>Description complète, telle que le serveur la sert</summary>

```text
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
```

</details>

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID. |
| `audienceExportId` | `string` | oui | The 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]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` ou `number` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. 123456789 or "properties/123456789"). |
| `expandedDataSetId` | `string` | oui | The ID of the expanded data set to retrieve. |

### `google_analytics_list_audience_exports` [#google_analytics_list_audience_exports]

**Google Analytics: List Audience Exports** · lecture · rejouable

List all audience exports for a GA4 property.

<details>
<summary>Description complète, telle que le serveur la sert</summary>

```text
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
```

</details>

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: 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]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: 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]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` ou `number` | non | Optional: 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 [#evenements]

### `google_analytics_get_channel_group` [#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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. "123456789" or "properties/123456789"). |
| `channelGroupId` | `string` | oui | The channel group ID to retrieve. |

### `google_analytics_get_custom_dimension` [#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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` ou `number` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. 123456789 or "properties/123456789"). |
| `customDimensionId` | `string` | oui | The ID of the custom dimension to retrieve. |

### `google_analytics_get_custom_dimensions_and_metrics` [#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.

<details>
<summary>Description complète, telle que le serveur la sert</summary>

```text
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
```

</details>

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: 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]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` ou `number` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. 123456789 or "properties/123456789"). |
| `customMetricId` | `string` | oui | The ID of the custom metric to retrieve. |

### `google_analytics_get_key_event` [#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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID. |
| `keyEventId` | `string` | oui | Key event ID (numeric string), e.g. "5678". |

### `google_analytics_list_channel_groups` [#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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: 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]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` ou `number` | non | Optional: 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]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` ou `number` | non | Optional: 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]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. "123456789" or "properties/123456789". |

## Liens et accès [#liens-acces]

### `google_analytics_get_firebase_link` [#google_analytics_get_firebase_link]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. '123456789' or 'properties/123456789'. |
| `firebaseLinkId` | `string` | oui | The Firebase link ID to retrieve. |

### `google_analytics_get_google_ads_link` [#google_analytics_get_google_ads_link]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. '123456789' or 'properties/123456789'. |
| `googleAdsLinkId` | `string` | oui | The Google Ads link ID to retrieve. |

### `google_analytics_list_firebase_links` [#google_analytics_list_firebase_links]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: 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` [#google_analytics_list_google_ads_links]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. '123456789' or 'properties/123456789'. |

## Propriétés et flux [#proprietes]

### `google_analytics_get_account_summaries` [#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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `account_id` | `string` | non | Google 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]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. '123456' or 'properties/123456'. |
| `dataStreamId` | `string` | oui | Data stream ID, e.g. '1000001'. |

### `google_analytics_get_enhanced_measurement_settings` [#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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID (e.g. "123456789" or "properties/123456789"). |
| `dataStreamId` | `string` | oui | The web data stream ID whose enhanced measurement settings to retrieve. |

### `google_analytics_get_property` [#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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: 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]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: 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]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `accountId` | `string` | oui | The GA4 account ID (e.g. "123456789" or "accounts/123456789"). |
| `account_id` | `string` | non | Google 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]

**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ètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: 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]

**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.

<details>
<summary>Description complète, telle que le serveur la sert</summary>

```text
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.
```

</details>

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `accountId` | `string` | oui | Account ID, e.g. '123456' or 'accounts/123456'. |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. Optional property resource name to filter by, e.g. 'properties/123456'. |
| `resourceType` | `string[]` | non | Optional list of resource types to filter by, e.g. \["PROPERTY","DATA\_STREAM"\]. |
| `action` | `string[]` | non | Optional list of change actions to filter by, e.g. \["CREATED","UPDATED","DELETED"\]. |
| `earliestChangeTime` | `string` | non | Optional earliest change time as ISO 8601 string, e.g. "2024-01-01T00:00:00Z". |
| `latestChangeTime` | `string` | non | Optional latest change time as ISO 8601 string, e.g. "2024-12-31T23:59:59Z". |
| `pageSize` | `number` | non | Optional maximum number of results to return. |

## Rapports [#rapports]

### `google_analytics_batch_run_pivot_reports` [#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.

<details>
<summary>Description complète, telle que le serveur la sert</summary>

```text
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
```

</details>

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID. |
| `requests` | `object[]` | oui | Array of pivot report requests (max 5). |

### `google_analytics_batch_run_reports` [#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.).

<details>
<summary>Description complète, telle que le serveur la sert</summary>

```text
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.
```

</details>

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID. |
| `requests` | `object[]` | oui | Array of report requests (max 5). |

### `google_analytics_check_compatibility` [#google_analytics_check_compatibility]

**Google Analytics: Check Compatibility** · lecture · rejouable

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

<details>
<summary>Description complète, telle que le serveur la sert</summary>

```text
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
```

</details>

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID. |
| `dimensions` | `string[]` | non | Dimension names to check, e.g. \["date","country","sessionSource"\]. |
| `metrics` | `string[]` | non | Metric names to check, e.g. \["sessions","totalUsers","bounceRate"\]. |
| `dimensionFilter` | `object` | non | GA4 FilterExpression object. See run\_report tool for detailed examples. |
| `metricFilter` | `any` | non | GA4 FilterExpression object. See run\_report tool for detailed examples. |

### `google_analytics_get_metadata` [#google_analytics_get_metadata]

**Google Analytics: Get Metadata** · lecture · rejouable

Retrieve all available dimensions and metrics for a GA4 property.

<details>
<summary>Description complète, telle que le serveur la sert</summary>

```text
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
```

</details>

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: 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]

**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.

<details>
<summary>Description complète, telle que le serveur la sert</summary>

```text
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
```

</details>

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. '123456789'. |
| `dateRanges` | `object[]` | oui | Date ranges for the funnel report, e.g. \[\{"startDate":"2024-01-01","endDate":"2024-01-31"\}\]. |
| `funnel` | `object` | oui | Funnel 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). |
| `funnelBreakdown` | `object` | non | Optional breakdown dimension for the funnel. Object with 'breakdownDimension' containing 'name' (string, e.g. 'deviceCategory') and optional 'limit' (number). |
| `funnelNextAction` | `object` | non | Optional next action dimension. Object with 'nextActionDimension' containing 'name' (string) and optional 'limit' (number). |
| `limit` | `number` | non | Maximum number of rows to return. |

### `google_analytics_run_pivot_report` [#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.

<details>
<summary>Description complète, telle que le serveur la sert</summary>

```text
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
```

</details>

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. "123456789". |
| `dateRanges` | `object[]` | oui | One or more date ranges. |
| `dimensions` | `string[]` | oui | All dimension names (must include those referenced in pivots). |
| `metrics` | `string[]` | oui | Metric names, e.g. \["sessions","totalUsers"\]. |
| `pivots` | `object[]` | oui | Pivot definitions (at least one required). |
| `dimensionFilter` | `object` | non | GA4 FilterExpression object. See run\_report tool for detailed examples. Docs: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/FilterExpression. |
| `metricFilter` | `any` | non | GA4 FilterExpression object. See run\_report tool for detailed examples. Docs: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/FilterExpression. |
| `currencyCode` | `string` | non | Currency code, e.g. "USD". |
| `keepEmptyRows` | `boolean` | non | Include rows where all metrics are zero. |
| `returnPropertyQuota` | `boolean` | non | Return quota usage info. |

### `google_analytics_run_realtime_report` [#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).

<details>
<summary>Description complète, telle que le serveur la sert</summary>

```text
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
```

</details>

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. "123456789". |
| `dimensions` | `string[]` | non | Realtime dimension names. See https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions. |
| `metrics` | `string[]` | non | Realtime metric names. See https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics. |
| `dimensionFilter` | `object` | non | GA4 FilterExpression object. Same structure as regular reports. See run\_report tool for detailed filter examples. |
| `metricFilter` | `any` | non | GA4 FilterExpression object. Same structure as regular reports. See run\_report tool for detailed filter examples. |
| `orderBys` | `object[]` | non | Ordering specification. |
| `limit` | `number` | non | Max rows to return. |
| `returnPropertyQuota` | `boolean` | non | Return quota usage info. |

### `google_analytics_run_report` [#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.

<details>
<summary>Description complète, telle que le serveur la sert</summary>

```text
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
```

</details>

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `propertyId` | `string` | non | Optional: defaults to the first property linked to this Pilot workspace. GA4 property ID, e.g. "123456789" or "properties/123456789". |
| `dateRanges` | `object[]` | oui | One or more date ranges for the report. |
| `dimensions` | `string[]` | oui | Dimension names to include, e.g. \["date","country"\]. |
| `metrics` | `string[]` | oui | Metric names to include, e.g. \["sessions","totalUsers"\]. |
| `dimensionFilter` | `object` | non | A 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. |
| `metricFilter` | `any` | non | A 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. |
| `orderBys` | `object[]` | non | Ordering specification for the result rows. |
| `limit` | `number` | non | Max rows to return (default API limit applies). Max 250 000. |
| `offset` | `number` | non | Row offset for pagination. |
| `currencyCode` | `string` | non | Currency code for revenue metrics, e.g. "USD". |
| `keepEmptyRows` | `boolean` | non | If true, include rows where all metrics are zero. |
| `returnPropertyQuota` | `boolean` | non | If true, include quota usage info in the response. |
