Skip to main content

What You Can Track

Email Opens

Know when recipients view your emails

Link Clicks

Track which links get the most engagement

Analytics

View engagement rates over time

How It Works

Open Tracking

When enabled, we insert an invisible 1x1 pixel image at the end of your HTML emails. When the recipient’s email client loads images, it requests this pixel from our servers, registering an “open” event.
Open tracking only works with HTML emails. Some email clients block images by default, so open rates may be underreported.

Click Tracking

When enabled, all links in your email are rewritten to go through our tracking servers. When clicked, we record the event and redirect the recipient to the original URL.
<!-- Original link -->
<a href="https://yoursite.com/page">Click here</a>

<!-- Becomes -->
<a href="https://unosend.co/api/v1/track/click/abc123?url=...">Click here</a>

Enable Tracking

Via API

Add the tracking object when sending emails:
Node.js
import { Unosend } from '@unosend/node';

const unosend = new Unosend('un_your_api_key');

await unosend.emails.send({
  from: '[email protected]',
  to: '[email protected]',
  subject: 'Check out our new feature',
  html: '<p>Click <a href="https://yoursite.com">here</a> to learn more!</p>',
  tracking: {
    open: true,   // Track email opens
    click: true,  // Track link clicks
  },
});

Via cURL

cURL
curl -X POST https://www.unosend.co/api/v1/emails \
  -H "Authorization: Bearer un_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "[email protected]",
    "to": "[email protected]",
    "subject": "Hello",
    "html": "<p>Hello world!</p>",
    "tracking": {
      "open": true,
      "click": true
    }
  }'

Viewing Analytics

Track engagement in multiple ways:

Dashboard

View real-time open and click stats in your Unosend dashboard under Analytics.

Metrics API

Query /v1/metrics to get open rates, click rates, and detailed engagement data.

Webhooks

Subscribe to email.opened and email.clicked webhook events for real-time notifications.

Webhook Events

Get notified instantly when tracking events occur:

email.opened

Webhook Payload
{
  "type": "email.opened",
  "data": {
    "email_id": "em_550e8400-e29b-41d4-a716",
    "opened_at": "2024-01-15T10:45:00.000Z",
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)...",
    "ip_address": "192.168.1.1"
  },
  "created_at": "2024-01-15T10:45:00.000Z"
}

email.clicked

Webhook Payload
{
  "type": "email.clicked",
  "data": {
    "email_id": "em_550e8400-e29b-41d4-a716",
    "url": "https://yoursite.com/pricing",
    "clicked_at": "2024-01-15T10:47:00.000Z",
    "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0)...",
    "ip_address": "192.168.1.1"
  },
  "created_at": "2024-01-15T10:47:00.000Z"
}

Best Practices

  • Use for transactional emails - Track order confirmations, password resets, and important notifications.
  • Analyze click patterns - Use click data to understand what content resonates with your audience.
  • Combine with webhooks - Trigger automations when emails are opened or links are clicked.

Limitations

Things to keep in mind:
  • Open tracking requires images to be loaded—many email clients block images by default
  • Apple Mail Privacy Protection may pre-fetch tracking pixels, inflating open rates
  • Plain text emails cannot be tracked for opens (only clicks with inline links)
  • Some corporate firewalls may block tracking redirects