Skip to main content
Tracking tells you what happens after an email is delivered. Open tracking records when a recipient views your message, and click tracking records when they interact with links inside it. Together, these signals help you measure engagement, identify content that resonates, and trigger follow-up workflows based on recipient behavior. Lettr enables both by default, but you can disable either on a per-email basis for privacy-sensitive messages.

Default Tracking

By default, Lettr tracks opens and clicks for all emails. No additional configuration is needed — tracking is active as long as you send HTML content:
await lettr.emails.send({
  from: 'you@example.com',
  to: ['recipient@example.com'],
  subject: 'Newsletter',
  html: '<p>Check out our <a href="https://example.com">website</a>!</p>'
  // Open and click tracking enabled by default
});

Customize Tracking Options

You can override the default tracking behavior on a per-email basis using the options object. This is useful for privacy-sensitive emails like password resets or data exports where tracking would be inappropriate:
await lettr.emails.send({
  from: 'you@example.com',
  to: ['recipient@example.com'],
  subject: 'Private Message',
  html: '<p>This is a private message.</p>',
  options: {
    open_tracking: false,
    click_tracking: false
  }
});

How Open Tracking Works

Lettr inserts a tiny invisible image (tracking pixel) into your HTML emails. When the recipient’s email client loads images, the open is recorded.
Open tracking requires HTML content. Plain text emails cannot be tracked for opens. Some email clients block images by default, which may result in under-reported open rates.

How Click Tracking Works

Lettr rewrites links in your email to route through our tracking servers. When a recipient clicks a link:
  1. The click is recorded with timestamp and link URL
  2. The recipient is immediately redirected to the original destination
<!-- Original link in your email -->
<a href="https://example.com/product">View Product</a>

<!-- Becomes (with click tracking enabled) -->
<a href="https://track.lettr.com/c/abc123">View Product</a>

Custom Tracking Domain

By default, tracking links use Lettr’s domain (e.g., track.lettr.com). Configuring a custom tracking domain (e.g., track.yourdomain.com) improves deliverability because links match your sending domain, and it builds trust with recipients who see a familiar domain in link previews:
await lettr.emails.send({
  from: 'you@example.com',
  to: ['recipient@example.com'],
  subject: 'Newsletter',
  html: '<p>Click <a href="https://example.com">here</a>!</p>',
  options: {
    click_tracking: true
  }
});
Links will use your configured tracking domain (e.g., track.yourdomain.com) if set up in your domain settings.

Set Up Tracking Domain

Learn how to configure a custom tracking domain

Transactional Flag

The transactional option signals to Lettr how to handle the email for deliverability purposes. Transactional emails (triggered by a user action) are typically sent with higher priority and are less likely to be filtered by receiving mail servers:
await lettr.emails.send({
  from: 'you@example.com',
  to: ['recipient@example.com'],
  subject: 'Password Reset',
  html: '<p>Click here to reset your password...</p>',
  options: {
    transactional: true  // Default is true
  }
});
Transactional emails (password resets, order confirmations) typically have higher deliverability than marketing emails.

Tracking Options Reference

OptionTypeDefaultDescription
open_trackingbooleantrueTrack when emails are opened
click_trackingbooleantrueTrack when links are clicked
transactionalbooleantrueMark as transactional email

Privacy Considerations

Some emails should not be tracked. Data exports, security notifications, and emails sent in jurisdictions with strict privacy laws (such as GDPR) may require tracking to be disabled. Disable both open and click tracking for these messages:
// For privacy-sensitive emails
await lettr.emails.send({
  from: 'you@example.com',
  to: ['privacy-conscious@example.com'],
  subject: 'Your Data Export',
  html: '<p>Here is your requested data export.</p>',
  options: {
    open_tracking: false,
    click_tracking: false
  }
});

Viewing Tracking Data

Tracking data is delivered in real time through webhooks. Set up webhook handlers for engagament.open and engagament.click events to capture engagement data as it happens:
app.post('/webhooks/lettr', (req, res) => {
  const event = req.body;

  if (event.type === 'engagament.open') {
    console.log('Email opened:', event.data.request_id);
  }

  if (event.type === 'engagament.click') {
    console.log('Link clicked:', event.data.target_link_url);
  }

  res.sendStatus(200);
});
You can also view aggregate tracking data in the Analytics dashboard.

Analytics

Learn more about viewing and analyzing tracking data