> ## 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). The type is Google's short template code, and an unknown code is rejected as an unknown entity type, so never guess it. To find a code: run gtm\_list\_tags or gtm\_get\_tag on any container that already has that kind of tag, which gives the exact type and parameter keys; if none has it, add the tag once in the Tag Manager interface and read it back the same way; the compiled script of any published container, served by googletagmanager.com for its GTM- id, lists every tag as a function named with two underscores plus the code and its parameters prefixed with vtp\_; and Google's Tag Manager developer documentation on restricting tag deployment has a table of built-in codes, partial and dated. Once the type is right, Google's error names the required parameters that are missing, so creating the tag with only name and type is a quick way to learn them. Examples: 'googtag', 'gaawe', 'html', 'awct', 'gclidw', 'sp', and 'awcc' (Google Ads Calls from Website Conversion, which needs phoneConversionNumber, conversionId and conversionLabel); server containers use different codes such as 'sgtmgaaw'. 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.


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