Open & Click Tracking
Track email engagement with open and click tracking.
Overview
Tracking lets you measure how recipients engage with your emails:
- Open tracking - Know when emails are opened
- Click tracking - See which links are clicked
How Tracking Works
Open Tracking
A tiny invisible image (tracking pixel) is inserted into your email:
<img src="https://track.usetransactional.com/o/abc123" width="1" height="1" />When the recipient's email client loads images, we record an open event.
Limitations:
- Requires images to be enabled
- Some email clients block images by default
- Privacy features may prevent tracking
Click Tracking
Links in your email are rewritten to pass through our tracking server:
Original:
<a href="https://yoursite.com/pricing">View Pricing</a>Tracked:
<a href="https://track.usetransactional.com/c/abc123">View Pricing</a>When clicked, we record the event and redirect to the original URL.
Enabling Tracking
Per Stream
Configure default tracking for all emails in a stream:
- Go to Email > Servers > [Server] > Streams
- Select your stream
- Toggle Track Opens and Track Links
Per Email
Override stream settings for individual emails:
await client.emails.send({
from: 'hello@yourapp.com',
to: 'user@example.com',
subject: 'Your weekly summary',
html: emailContent,
tracking: {
opens: true,
clicks: true,
},
});Disable for Specific Links
Exclude specific links from click tracking:
<a href="https://yoursite.com/sensitive" data-track="false">
Untracked Link
</a>Custom Tracking Domain
Use your own domain for tracking URLs to improve deliverability and maintain brand consistency.
Why Use a Custom Domain?
- Better deliverability - Emails aren't flagged for third-party tracking domains
- Brand consistency - Links show your domain, not ours
- Trust - Recipients see familiar domain on hover
Setup
- Go to Email > Servers > [Server] > Settings > Tracking
- Enter your tracking subdomain (e.g.,
track.yourdomain.com) - Add the DNS records:
Type: CNAME
Host: track
Value: track.usetransactional.com
- Click Verify once DNS propagates
Using Custom Domain
Once verified, all tracking URLs use your domain:
<a href="https://track.yourdomain.com/c/abc123">Click Here</a>Viewing Tracking Data
Activity Log
See individual email opens and clicks in the activity log:
- Go to Email > Servers > [Server] > Activity
- Click on any email to see:
- Open timestamps
- Click timestamps and links
- IP addresses and user agents
Analytics Dashboard
View aggregate metrics:
- Open rate over time
- Click rate over time
- Most clicked links
- Device and email client breakdown
Via API
// Get email events
const events = await client.emails.getEvents(messageId);
// Filter by event type
const opens = events.filter(e => e.type === 'opened');
const clicks = events.filter(e => e.type === 'clicked');Webhooks
Receive real-time tracking events via webhooks:
// Webhook payload for open event
{
"event": "opened",
"messageId": "msg_abc123",
"timestamp": "2024-01-15T10:30:00Z",
"recipient": "user@example.com",
"ipAddress": "192.168.1.1",
"userAgent": "Mozilla/5.0..."
}
// Webhook payload for click event
{
"event": "clicked",
"messageId": "msg_abc123",
"timestamp": "2024-01-15T10:35:00Z",
"recipient": "user@example.com",
"link": "https://yoursite.com/pricing",
"ipAddress": "192.168.1.1",
"userAgent": "Mozilla/5.0..."
}See Webhooks for setup instructions.
Best Practices
When to Track
| Email Type | Track Opens | Track Clicks |
|---|---|---|
| Welcome | Yes | Yes |
| Password Reset | No | No |
| Order Confirmation | Optional | Yes |
| Marketing | Yes | Yes |
| Security Alerts | No | No |
Privacy Considerations
- Disclose tracking in your privacy policy
- Consider disabling for sensitive emails
- Respect user privacy preferences
- Comply with GDPR and other regulations
Improve Open Rate Accuracy
Open tracking has known limitations:
- Some clients block tracking pixels
- Opens may be under-reported
- Bot opens may inflate numbers
Focus on click tracking for more accurate engagement data.
Troubleshooting
Opens Not Recording
- Verify tracking is enabled for the stream
- Check if recipient's client blocks images
- Ensure tracking pixel wasn't removed from HTML
Clicks Not Recording
- Verify click tracking is enabled
- Check links aren't excluded with
data-track="false" - Ensure links are properly formatted
<a href="...">
Next Steps
- Webhooks - Receive real-time events
- Analytics - View engagement metrics
- Best Practices - Improve deliverability
On This Page
- Overview
- How Tracking Works
- Open Tracking
- Click Tracking
- Enabling Tracking
- Per Stream
- Per Email
- Disable for Specific Links
- Custom Tracking Domain
- Why Use a Custom Domain?
- Setup
- Using Custom Domain
- Viewing Tracking Data
- Activity Log
- Analytics Dashboard
- Via API
- Webhooks
- Best Practices
- When to Track
- Privacy Considerations
- Improve Open Rate Accuracy
- Troubleshooting
- Opens Not Recording
- Clicks Not Recording
- Next Steps