> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Data Streams

> Creates, renames or deletes Google Analytics 4 web, Android and iOS data streams, and creates or deletes a stream's Measurement Protocol API secrets

Creates, renames or deletes Google Analytics 4 web, Android and iOS data streams, and creates or deletes a stream's Measurement Protocol API secrets. Deleting a stream stops its data collection.

| | |
| - | - |
| **App** | GA4 |
| **Operation ID** | `ga4_manage_data_streams` |
| **Type** | Action |
| **Connection** | `ga4` (required) |
| **Credits per run** | 1 |
| **Agent / MCP tool** | Yes |
| **Requires approval** | Yes (write operation) |

## Inputs

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `account` | array (also accepts a comma-separated string) | No | - | The GA4 property to change. Only one property at a time. |
| `action` | string or SelectableOption | Yes | - | 'create' adds a web, Android or iOS data stream; 'update' renames a stream; 'delete' removes it and stops its data collection; 'create\_secret' and 'delete\_secret' manage the stream's Measurement Protocol API secrets. Options: 'create', 'update', 'delete', 'create\_secret', 'delete\_secret'. |
| `data_stream_id` | string | No | - | Numeric id of the stream for every action except create. Read ids from ga4\_get\_property\_settings with setting 'data\_streams'. |
| `stream_type` | string or SelectableOption | No | - | create only: 'WEB\_DATA\_STREAM', 'ANDROID\_APP\_DATA\_STREAM' or 'IOS\_APP\_DATA\_STREAM'. Fixed afterwards. |
| `display_name` | string | No | - | Stream name shown in GA4 (max 255 chars). Required on create and update. |
| `default_uri` | string | No | - | Web streams on create: the site URL, e.g. '`https://www.example.com`'. Fixed afterwards. |
| `package_name` | string | No | - | Android streams on create: the app package name, e.g. 'com.example.app'. Fixed afterwards. |
| `bundle_id` | string | No | - | iOS streams on create: the app bundle id, e.g. 'com.example.app'. Fixed afterwards. |
| `secret_display_name` | string | No | - | create\_secret: name of the new Measurement Protocol secret, e.g. 'CRM sync'. |
| `secret_id` | string | No | - | delete\_secret: numeric id of the secret to delete. |

### SelectableOption

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `value` | string | Yes | - | |
| `label` | string | Yes | - | |

## Output

**Type**: `Dict`

Returns the saved stream (id, type, name, measurement id or app ids) or the secret (id, name, secret value).

**Fields**: dynamic (depend on the inputs)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.