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

# Create Tag

> Creates a tag in a Google Tag Manager workspace from a raw Tag resource payload

Creates a tag in a Google Tag Manager workspace from a raw Tag resource payload. Use gtm\_list\_triggers to find firing trigger IDs, then gtm\_create\_version and gtm\_publish\_version to take it live.

|                       |                       |
| --------------------- | --------------------- |
| **App**               | Google Tag Manager    |
| **Operation ID**      | `gtm_create_tag`      |
| **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 where the tag should be created.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `tag_payload` | object or string | Yes      | -       | Full Tag resource (object or JSON string) matching the Google Tag Manager API v2 Tag spec. Must include name and type; other fields like parameter, firingTriggerId, blockingTriggerId, paused, and notes follow the spec. Use gtm\_list\_triggers to find firing trigger IDs, or copy a tag from gtm\_list\_tags and edit it (read-only fields are stripped automatically). Example GA4 event tag: \{"name": "GA4 - Purchase", "type": "gaawe", "parameter": \[\{"type": "template", "key": "eventName", "value": "purchase"}, \{"type": "template", "key": "measurementIdOverride", "value": "G-XXXXXXX"}], "firingTriggerId": \["12"]} |

## Output

**Type**: `Dict`

Returns the created tag as provided by the Tag Manager API, including its tagId.
