Analytics
Track email performance with opens, clicks, and engagement metrics.
Overview
SENTD automatically tracks email events including delivery, opens, clicks, bounces, and complaints. View analytics in your dashboard or query via API.
Tracked events
| Event | Description |
|---|---|
| Sent | Email was sent to the mail provider |
| Delivered | Email was accepted by recipient server |
| Opened | Recipient opened the email (pixel tracking) |
| Clicked | Recipient clicked a tracked link |
| Bounced | Email could not be delivered |
| Complained | Recipient marked as spam |
Get statistics
Retrieve aggregate statistics for your account:
// GET /api/stats
{
"success": true,
"data": {
"emails": {
"total": 15420,
"sent": 15200,
"delivered": 14800,
"opened": 8500,
"clicked": 2100,
"bounced": 120,
"complained": 15
},
"rates": {
"delivery": 97.4,
"open": 57.4,
"click": 14.2,
"bounce": 0.8
}
}
}Individual email analytics
Get detailed analytics for a specific email:
// GET /api/emails/:id/analytics
{
"success": true,
"data": {
"email_id": "em_abc123",
"status": "delivered",
"events": [
{
"type": "sent",
"timestamp": "2024-01-15T10:00:00Z"
},
{
"type": "delivered",
"timestamp": "2024-01-15T10:00:02Z"
},
{
"type": "opened",
"timestamp": "2024-01-15T10:15:30Z",
"metadata": {
"user_agent": "Mozilla/5.0...",
"ip": "192.168.1.1"
}
},
{
"type": "clicked",
"timestamp": "2024-01-15T10:16:45Z",
"metadata": {
"url": "https://example.com/signup",
"user_agent": "Mozilla/5.0..."
}
}
],
"opens_count": 3,
"clicks_count": 1,
"unique_opens": 1,
"unique_clicks": 1
}
}Enabling tracking
Open and click tracking is enabled by default. You can disable it per-email:
{
"from": "you@yourdomain.com",
"to": "user@example.com",
"subject": "Hello!",
"html": "<p>Click <a href='https://example.com'>here</a></p>",
"tracking": {
"opens": true,
"clicks": false
}
}