Dashboard overview
The Email Tracker dashboard provides a web interface and REST APIs for viewing tracked emails and open events. Key features:- View all tracked emails with open counts
- Filter open events by email
- GeoIP enrichment (country, region, city, coordinates)
- Token-based authentication
- Inbox badge system in Gmail
Authentication
Dashboard APIs require a token passed via theX-Tracker-Token header.
Setting dashboard token
Configure the token via environment variable:Token validation
Dashboard APIs
Get tracked emails
Returns all tracked emails with aggregated open statistics. Endpoint:GET /dashboard/api/emails
Headers:
SQL query
The emails endpoint uses a complex JOIN to aggregate open statistics:The query distinguishes between:
raw_open_events: All pixel hits (including duplicates/suppression)total_open_events: Only counted opens (is_duplicate = 0 AND is_sender_suppressed = 0)unique_open_count: Fromtracked_emails.open_count(incremented byopenRecorder)
Get open events
Returns open event history, optionally filtered byemail_id.
Endpoint: GET /dashboard/api/open-events?email_id=<email_id>
Headers:
Response:
SQL query
The open events endpoint filters out duplicates and suppressed events:To view all events (including duplicates/suppression), query the database directly or modify the SQL filter.
GeoIP enrichment
The tracker enriches open events with geographic location data using thegeoip-lite library.
GeoIP service
IP normalization
IPv6-mapped IPv4 addresses are unwrapped:GeoIP in open recorder
Geo data is resolved during open event recording:Inbox badge system
The Chrome extension displays open count badges in your Gmail inbox.Badge rendering
Badges are injected into Gmail’s inbox row UI:Badge refresh interval
Badges refresh every 10 seconds:Badge data fetching
The extension fetches badge data from the dashboard API:Badge enrichment in background worker
Badge rendering is throttled to 120 rows (
MAX_ROWS_TO_RENDER) to avoid performance issues with large inboxes.Dashboard HTML
The dashboard serves a static HTML file:server/src/public/dashboard.html(source)server/dist/public/dashboard.html(build output)
Database schema
tracked_emails table
open_events table
Indexes
API usage examples
Fetch all tracked emails
Fetch opens for specific email
Fetch recent emails in extension
Frequently asked questions
How accurate is GeoIP data?
How accurate is GeoIP data?
GeoIP is approximate and based on IP address databases. Accuracy varies:
- Country: ~95% accurate
- Region/State: ~80% accurate
- City: ~60% accurate
- Coordinates: Within 25-50 miles
- VPNs, proxies, Tor
- Gmail Image Proxy (shows Google’s location, not recipient’s)
- Mobile networks (may show carrier’s data center)
- Corporate networks (may show headquarters, not actual location)
Why is unique_open_count different from total_open_events?
Why is unique_open_count different from total_open_events?
These should be identical in most cases. Differences may indicate:
- Race conditions during concurrent opens
- Database transaction issues
- Manual database edits
unique_open_count is authoritative (from tracked_emails.open_count). total_open_events is calculated from open_events table.Can I customize the dashboard HTML?
Can I customize the dashboard HTML?
Yes. The dashboard HTML is served from:
server/src/public/dashboard.html(edit this file)- Rebuild with
npm --workspace=server run build - Restart server
How do I export analytics to CSV/JSON?
How do I export analytics to CSV/JSON?
Use the dashboard APIs:Convert to CSV using
jq:Why are raw_open_events higher than total_open_events?
Why are raw_open_events higher than total_open_events?
raw_open_events includes all pixel hits, including:- Duplicates (caught by deduplication)
- Sender self-opens (caught by suppression)
- Multiple prefetch/preview requests
total_open_events only counts legitimate opens (non-duplicate, non-suppressed).Related features
Email tracking
Learn how pixel tracking works end-to-end
Sender suppression
Understand identity-based suppression
Deduplication
Learn how duplicate opens are detected