Developers
Get access

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.

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

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