CDPGuidesSupport

Tag Manager Tags

Manage the tags that fire inside a tag manager. Tags reference one or more triggers. When a trigger matches, the tag's parameters are evaluated and the tag fires unless one of its block triggers (exceptions) matches the same event.

Tags are the actions a tag manager performs: fire a Google Analytics event, drop a Meta pixel call, run a custom snippet, etc. Every tag belongs to exactly one tag manager and references trigger ids that decide when it fires. A tag fires when one of its fire triggers matches; block triggers work like Google Tag Manager exceptions and stop the tag only on an event they match.

Browser interaction tracking uses a CustomEvent trigger and a Track tag whose fireTriggerIds includes the returned trigger ID. See Programmatic on-page tracking for the request sequence.

Folder assignment goes through POST /rest/v1/tag-manager-asset-folders, so folderId is read-only on this endpoint. A tag stays in the tag manager it was created in, so PATCH omits tagManagerId.

Discovering supported tag types

GET /rest/v1/tag-manager-tags/types lists the supported type values and the per-type parameters schema. Each field entry tells you whether the value is required, what validators apply, and (for fields with a fixed set of choices) the allowed availableValues.

GET/rest/v1/tag-manager-tags

GET
/rest/v1/tag-manager-tags
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

limit?|

Maximum number of tags to return. Defaults to 25; values below 1 are clamped to 1 and values above 1000 are clamped to 1000. The web-app passes 1000 to render the full workspace in one request.

cursor?string

Opaque pagination cursor from pagination.nextCursor in the previous response. Do not decode or modify it. Malformed cursors return 400 Bad Request.

tagManagerId*string

Parent tag manager whose tags should be returned.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/tag-manager-tags?tagManagerId=string"
{  "entities": [    {      "id": "string",      "tagManagerId": "string",      "accountId": "string",      "name": "string",      "type": "string",      "parameters": {},      "fireTriggerIds": [        "string"      ],      "blockTriggerIds": [        "string"      ],      "priority": 0,      "enabled": true,      "folderId": "string",      "createdAt": "string",      "updatedAt": "string"    }  ],  "pagination": {    "nextCursor": "string",    "hasMore": true  }}

POST/rest/v1/tag-manager-tags

POST
/rest/v1/tag-manager-tags
*object
object
array<string>
AuthorizationBearer <token>

Ours Privacy API key

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/rest/v1/tag-manager-tags" \  -H "Content-Type: application/json" \  -d '{    "tagManagerId": "string",    "name": "string",    "type": "string",    "parameters": {},    "fireTriggerIds": [      "string"    ]  }'
{  "id": "string",  "tagManagerId": "string",  "accountId": "string",  "name": "string",  "type": "string",  "parameters": {},  "fireTriggerIds": [    "string"  ],  "blockTriggerIds": [    "string"  ],  "priority": 0,  "enabled": true,  "folderId": "string",  "createdAt": "string",  "updatedAt": "string"}

GET/rest/v1/tag-manager-tags/{id}

GET
/rest/v1/tag-manager-tags/{id}
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/tag-manager-tags/string"
{  "id": "string",  "tagManagerId": "string",  "accountId": "string",  "name": "string",  "type": "string",  "parameters": {},  "fireTriggerIds": [    "string"  ],  "blockTriggerIds": [    "string"  ],  "priority": 0,  "enabled": true,  "folderId": "string",  "createdAt": "string",  "updatedAt": "string"}

PATCH/rest/v1/tag-manager-tags/{id}

PATCH
/rest/v1/tag-manager-tags/{id}
*object
object
array<string>
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/rest/v1/tag-manager-tags/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "tagManagerId": "string",  "accountId": "string",  "name": "string",  "type": "string",  "parameters": {},  "fireTriggerIds": [    "string"  ],  "blockTriggerIds": [    "string"  ],  "priority": 0,  "enabled": true,  "folderId": "string",  "createdAt": "string",  "updatedAt": "string"}

DELETE/rest/v1/tag-manager-tags/{id}

DELETE
/rest/v1/tag-manager-tags/{id}
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/rest/v1/tag-manager-tags/string"
{  "id": "string",  "deleted": true}

GET/rest/v1/tag-manager-tags/types

GET
/rest/v1/tag-manager-tags/types
AuthorizationBearer <token>

Ours Privacy API key

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/tag-manager-tags/types"
{  "entities": [    {      "id": "string",      "name": "string",      "category": "string",      "description": "string",      "fields": [        {          "id": "string",          "type": "STRING",          "title": "string",          "description": "string",          "required": true,          "default": "string",          "availableValues": [            {              "value": "string",              "label": "string"            }          ],          "allowedKeys": [            "string"          ],          "validators": [            {              "type": "NotEmpty",              "min": 0,              "max": 0            }          ]        }      ]    }  ]}

How is this guide?