> ## 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 Tracking Tag

> Attaches a third-party impression tag or click tracker to an X Ads ad group

Attaches a third-party impression tag or click tracker to an X Ads ad group. X only accepts Campaign Manager (DCM) tag URLs here and rejects other URLs.

|                       |                             |
| --------------------- | --------------------------- |
| **App**               | X Ads                       |
| **Operation ID**      | `x_ads_create_tracking_tag` |
| **Type**              | Action                      |
| **Connection**        | `x_ads` (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 X Ads account that owns the ad group.                                                                                                          |
| `ad_group_id`       | string or SelectItem                     | Yes      | -       | Ad group (line item) to attach the third-party tracking tag to.                                                                                           |
| `tracking_tag_type` | enum (`IMPRESSION_TAG`, `CLICK_TRACKER`) | Yes      | -       | The kind of tag: IMPRESSION\_TAG (fires on impressions) or CLICK\_TRACKER (fires on clicks).                                                              |
| `tracking_tag_url`  | string                                   | Yes      | -       | The third-party tracking URL to fire. X only accepts Google Campaign Manager (DCM) tags, and the URL must carry the tag id in its dc\_trk\_cid parameter. |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

## Output

**Type**: `Dict`

Returns the created tracking tag.

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