Tracking & UTM codes in Letterhead
Edit in CMSWhen 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
What each tracking code means
Section titled “What each tracking code means”- 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.
Why we don’t use UTM parameters
Section titled “Why we don’t use UTM parameters”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.
Add your own UTM parameters
Section titled “Add your own UTM parameters”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.
- 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.)
- In the sidebar, switch on UTM Tracking.
- Enter a Key and a Value — for example,
utm_sourceandnewsletter. - Select Add link parameter for each additional pair, such as
utm_mediumandutm_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.
Static values
Section titled “Static values”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.
Dynamic values
Section titled “Dynamic values”A value can also be a personalization tag, which is filled in for each reader as the email goes out. For example:
| Key | Value | What 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.