# Tracking parameters

> How assistants set URL tracking (such as UTM values) on a draft: once for the whole email, per link, within the rules your admin set on the library.

Source: https://stensul.com/developers/concepts/tracking-parameters/ · Last reviewed 2026-10-07

Libraries can add **tracking parameters**, such as `utm_campaign` or `utm_content`, to the links in an email. Your admin decides in Stensul whether a library uses URL tracking, which parameters it has, and which values each one accepts. An assistant fills them in through the MCP; it can't add parameters the library doesn't define.

## Two levels

| Level | What it covers | How it's sent |
| --- | --- | --- |
| Campaign | Values chosen once for the whole email, for example `{ "utm_campaign": "spring-launch" }` | `url_tracking` on `stensul-build-email` or `stensul-update-email-content` |
| Per link | Values for one button or image link, or switching tracking off for that link | `url_tracking_parameters` or `url_tracking_disabled` on the element in `stensul-update-email-content` |

Text links carry their tracking on the link itself, inside the element's content, rather than in `url_tracking_parameters`.

## How the assistant knows what's allowed

When it reads a draft with `stensul-read-email`, the assistant sees whether URL tracking is enabled and the library's tracking definitions. It sends tracking values only when tracking is enabled, and only values that fit those definitions.

- **Omit a key** to leave its current value alone.
- **Send an empty string** to clear an optional value.
- **A value outside the rules is declined**, like any other [guardrail](https://stensul.com/developers/concepts/guardrails/). The rest of the change still lands, and the assistant should report what didn't.

A tracking-only fix doesn't need to touch content: `stensul-update-email-content` accepts `url_tracking` on its own.

## Try it

```text
In the Stensul draft "<email name>", set the campaign tracking to
spring-launch and tag the main button with utm_content=main-button. Tell me
if the library doesn't allow either value.
```

## Related

- [`stensul-update-email-content`](https://stensul.com/developers/reference/stensul-update-email-content/) and [`stensul-build-email`](https://stensul.com/developers/reference/stensul-build-email/) in the tool reference
- [Guardrails and locked content](https://stensul.com/developers/concepts/guardrails/)
