Skip to content
Letterhead Letterhead Letterhead Help Center
Admin Tools

Tracking & UTM codes in Letterhead

Edit in CMS

When you add a URL to your newsletter, regardless of the block used, we “wrap” it with additional information for tracking purposes. This is how Letterhead reports clicks and engagement metrics. Here’s an example of how a link is transformed:

Original link:

https://www.nytimes.com/2023/09/08/nyregion/donald-trump-civil-trial-date.html

becomes a wrapped tracking link:

https://a.post.lhd.link/muysif0rhq/?lh_aid=3584680&lh_cid=h10t1yw8qa

When a subscriber follows the wrapped link, it takes them to the original destination with tracking parameters appended:

https://www.nytimes.com/2023/09/08/nyregion/donald-trump-civil-trial-date.html?lh_aid=3584680&lh_cid=h10t1yw8qa&di=019e0b2d1b84ebc5ce0b6d2e8278d55e

  • lh_aid — the user hash. It’s unique per subscriber.
  • lh_cid — a campaign id.
  • di — a unique hash based on IP address and time of day.
  • lh_em — (not in the example above) the subscriber’s email address, included when the link points back to your own website.

We don’t use utm parameters because we treat those as reserved for you. For example, if we used utm_source instead of lh_cid, you wouldn’t be able to set your own utm_source. You can add your own — see below.

You can add UTM parameters (or any other link parameters) to every link in an edition, so your web analytics can tell which visits came from which newsletter.

  1. Open the edition and go to the Schedule step. (You’ll find the same setting when you configure a template, so every edition made from it starts with your parameters.)
  2. In the sidebar, switch on UTM Tracking.
  3. Enter a Key and a Value — for example, utm_source and newsletter.
  4. Select Add link parameter for each additional pair, such as utm_medium and utm_campaign.

When the edition sends, each pair is added to the end of every link in it. Each key can only be used once, and neither keys nor values can contain spaces.

A static value is the same for every reader and every link — utm_source=newsletter, utm_medium=email, utm_campaign=weekly-roundup. Stick to letters, numbers, hyphens, and underscores.

A value can also be a personalization tag, which is filled in for each reader as the email goes out. For example:

KeyValueWhat the link gets
utm_campaign{{ campaignId }}An ID unique to this send
utm_content{{ channelSlug }}The channel the edition was sent from
utm_term{{ customID1 }}Whatever you store in that reader’s Custom ID 1 field

Use a tag on its own as the value, typed exactly as it appears in the list of personalization tags. If you send through Letterhead, the tag is checked as you type and flagged if it isn’t one Letterhead recognizes. If you send through another email provider, such as Iterable, use that provider’s own tag syntax instead — Letterhead passes it through untouched for your provider to fill in.

A few things to keep in mind:

  • Links that already contain a personalization tag are left as they are, so a link you’ve personalized yourself won’t get the UTM parameters added on top.
  • Avoid putting a reader’s email address in a link. Links get shared and forwarded, and the parameters show up in other people’s analytics tools. Use an identifier you control, such as a Custom ID, instead.
  • A parameter with an empty key or value, or one with a space in it, stops the edition from scheduling until you fix it — see Why is the Preview & Schedule button greyed out?.

Curious why some antivirus tools flag wrapped links? See Why does my antivirus give me a warning?

Still can’t find what you need? Contact support.