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

# Update Gtag Config

> Replaces a google tag config in a Google Tag Manager workspace with a full resource payload

Replaces a google tag config in a Google Tag Manager workspace with a full resource payload. Google tag configs hold gtag.js settings in a Google Tag Manager container. Version and publish to take changes live.

| | |
| - | - |
| **App** | Google Tag Manager |
| **Operation ID** | `gtm_update_gtag_config` |
| **Type** | Action |
| **Connection** | `gtm` (required) |
| **Credits per run** | 1 |
| **Agent / MCP tool** | Yes |
| **Requires approval** | Yes (write operation) |

## Inputs

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `account` | DynamicAccount | Yes | - | Select the Google Tag Manager account. |
| `container` | DynamicAccount | Yes | - | Select the container. |
| `workspace` | DynamicAccount | Yes | - | Select the workspace. |
| `gtag_config` | DynamicAccount | Yes | - | Select the google tag config to update, or provide its ID. |
| `gtag_config_payload` | object or string | Yes | - | Full replacement GtagConfig resource; the update replaces the google tag config entirely, so include every field it should keep. Workflow: gtm\_get\_gtag\_config -> edit the payload -> gtm\_update\_gtag\_config. Full GtagConfig resource (object or JSON string) matching the Google Tag Manager API v2 GtagConfig spec. Must include type; settings go in parameter. Example: \{"type": "gtag", "parameter": \[\{"type": "template", "key": "tagId", "value": "G-XXXXXXX"}]} |

## Output

**Type**: `Dict`

Returns the updated google tag config as provided by the Tag Manager API.


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