Skip to main content

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 the X-Tracker-Token header.

Setting dashboard token

Configure the token via environment variable:

Token validation

All dashboard API requests return 401 Unauthorized if:
  • DASHBOARD_TOKEN is not set
  • X-Tracker-Token header is missing
  • Token does not match

Dashboard APIs

Get tracked emails

Returns all tracked emails with aggregated open statistics. Endpoint: GET /dashboard/api/emails Headers:
Response:
Field descriptions:

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: From tracked_emails.open_count (incremented by openRecorder)

Get open events

Returns open event history, optionally filtered by email_id. Endpoint: GET /dashboard/api/open-events?email_id=<email_id> Headers:
Query parameters: 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 the geoip-lite library.

GeoIP service

IP normalization

IPv6-mapped IPv4 addresses are unwrapped:

GeoIP in open recorder

Geo data is resolved during open event recording:
GeoIP resolution is approximate and may be inaccurate for:
  • VPN/proxy users
  • Mobile networks
  • Corporate networks with centralized egress
  • Gmail Image Proxy (shows Google’s proxy server location, not recipient’s)

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:
The HTML file is located at:
  • 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

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
Factors that reduce accuracy:
  • 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)
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.
Yes. The dashboard HTML is served from:
  • server/src/public/dashboard.html (edit this file)
  • Rebuild with npm --workspace=server run build
  • Restart server
You can add custom JavaScript, CSS, or integrate with other analytics tools.
Use the dashboard APIs:
Convert to CSV using jq:
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).

Email tracking

Learn how pixel tracking works end-to-end

Sender suppression

Understand identity-based suppression

Deduplication

Learn how duplicate opens are detected