Skip to main content
Beta Feature: Click tracking is currently in beta and available on paid plans only. Features and behavior may change before general availability.

How It Works

When click tracking is enabled for a route, Lettermint automatically rewrites links in your HTML emails to route through our tracking domain. The original link:
<a href="https://example.com/product/123">View Product</a>
Becomes:
<a href="https://t.ltrmnt.com/c/{tracking_token}">View Product</a>

Redirect Flow

When a recipient clicks a tracked link:
  1. Click recorded - Request hits t.ltrmnt.com, we log the click with timestamp
  2. Token validated - We verify the tracking token is valid and not expired
  3. Instant redirect - Recipient is immediately redirected (302) to the original URL
  4. Webhook sent - A message.clicked event is sent to your configured webhooks
The redirect happens in milliseconds, providing a seamless experience for recipients.

Enabling Click Tracking

Via Dashboard

  1. Navigate to your project
  2. Go to Routes and select your transactional or broadcast route
  3. In Route Settings, enable Track Clicks
  4. Save your changes

Via API

curl -X PATCH https://api.lettermint.co/v1/routes/{route_id} \
  -H "Authorization: Bearer {team_api_token}" \
  -H "Content-Type: application/json" \
  -d '{"track_clicks": true}'
Click tracking is only available for transactional and broadcast routes. Inbound routes cannot have tracking enabled.
Lettermint rewrites standard HTTP/HTTPS links:
  • https://example.com/page
  • http://example.com/page
  • Links in <a href="..."> tags
  • Links in HTML email content
The following link types are not rewritten to preserve functionality:
Link TypeExampleReason
Email linksmailto:[email protected]Opens email client
Phone linkstel:+1234567890Opens phone dialer
SMS linkssms:+1234567890Opens messaging app
JavaScriptjavascript:void(0)Client-side only
Anchors#section-nameSame-page navigation
Data URIsdata:image/png;base64,...Embedded content
Unsubscribe linksLinks with unsubscribe in URLPreserve direct access

Bot Detection

Security scanners and link preview features can click links before humans do. Lettermint detects these automated clicks to ensure accurate analytics.

Webhook Payload

When a click is detected, Lettermint sends a message.clicked webhook event:
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f01234567892",
  "event": "message.clicked",
  "timestamp": "2025-08-08T20:18:30.000Z",
  "data": {
    "message_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "subject": "Your weekly recommendations",
    "metadata": {
      "X-Campaign-ID": "weekly-recs"
    },
    "tag": "recommendations",
    "recipient": "[email protected]",
    "clicked_at": "2025-08-08T20:18:30+00:00",
    "destination_url": "https://example.com/product/123",
    "link_index": 0,
    "anchor_text": "View Product",
    "first_click": true,
    "device_type": "mobile",
    "client_type": "browser",
    "client_name": "Safari",
    "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X)...",
    "bot": {
      "detected": false,
      "probability": 2
    }
  }
}
Click-specific fields:
  • destination_url - The original destination URL that was clicked
  • link_index - Zero-based index of the link in the email (order of appearance)
  • anchor_text - The visible text of the clicked link
  • clicked_at - Timestamp when the click occurred
Engagement fields:
  • first_click - true if this is the first time this recipient clicked any link in this email
  • device_type - Device category: desktop, mobile, or tablet
  • client_type - Client category: browser, email_client, etc.
  • client_name - Specific client name: Chrome, Safari, Outlook, etc.
Bot detection fields:
  • bot.detected - true if the click appears automated
  • bot.probability - Confidence score from 0-100 (higher = more likely a bot)

Limitations

Token Expiration

Tracking tokens expire 30 days after the email is sent. After expiration:
  • Clicks are not recorded
  • Recipients are still redirected to the original URL (graceful degradation)

Corporate Security Pre-clicking

Some corporate email security tools pre-click all links in emails to scan for malware. While Lettermint detects most of these, some may appear as legitimate clicks. Use the bot.probability score to filter suspicious activity.

Plain Text Emails

Click tracking only works for HTML emails. Links in plain-text email parts are not rewritten. The tracking URL is visible if recipients hover over links or inspect the email source. This is standard for email tracking and does not affect the user experience.

Best Practices

  1. Track specific campaigns - Use metadata and tags to attribute clicks to campaigns
  2. Monitor unique clicks - Use first_click to distinguish initial engagement from repeat clicks
  3. Test your links - Send test emails to verify tracked links redirect correctly
  4. Respect privacy - Disclose tracking in your privacy policy

Next Steps

  • Open Tracking - Combine with open tracking for complete engagement data
  • Webhook Events - Full payload reference for all tracking events
  • Tags - Organize and filter your tracked emails