Building TrackMailBox: How We Made a Free Email Tracker for Gmail
The story behind TrackMailBox: why we built it, the technical challenges we solved, and what we learned shipping a Chrome extension used by 1,500+ professionals.

The Problem We Were Trying to Solve
When we started using email tracking tools internally at Nomos Insights, we ran into the same frustrations most people do:
- Every free tool adds a signature. "Sent with [Tool Name]" at the bottom of every email, immediately signaling to the recipient that you're using a bargain tool to spy on them
- Limits on free tiers. Most tools cap free users at 20–50 tracked emails per month. If you send more than a handful of emails a day, you hit the wall fast
- Complicated setup. Some tools required configuring SMTP routing, adding email headers, or installing companion apps
We wanted something simple: track email opens and link clicks in Gmail, no signatures, no caps, and no friction. We didn't find it, so we built it.
Architecture Decisions
Chrome Extension + MV3
We built TrackMailBox as a Chrome Extension using Manifest v3, the current Chrome extension architecture. MV3 moves background processing to service workers (rather than persistent background pages), which means lower memory usage and better performance.
The extension has three main parts:
Content script (injected into Gmail): Monitors Gmail's DOM for compose window events. When a compose window opens, it injects our tracking UI (the tracking chip in the compose toolbar) and hooks into Gmail's send events to inject the pixel and wrap links before the email goes out.
Service worker (background): Handles the WebSocket connection to our backend for real-time event delivery. When an open or click event fires on the server, the service worker receives it and triggers a desktop notification.
Popup UI: The extension popup shows sign-in status, active account, and a link to the dashboard.
Node.js Backend + Socket.io
The backend is a Node.js / Express server that:
- Serves the 1×1 tracking pixel (handling the
GET /px?id=...requests from email clients) - Handles link redirects (
GET /r?id=...&url=...) - Processes open and click events and stores them in the database (Prisma ORM)
- Pushes events to signed-in users via Socket.io WebSockets
The critical path (pixel served → event logged → notification pushed) is designed to complete in under 500ms. Latency here directly affects the "real-time" feel of notifications.
Database Schema
We use Prisma with a PostgreSQL database. The core tables:
User: Google OAuth account dataTrackedEmail: metadata per sent email (subject, recipient, timestamp, unique pixel ID)OpenEvent: each open (linked to TrackedEmail, with timestamp, IP, user agent)ClickEvent: each link click (linked to TrackedEmail, link URL, timestamp)
This schema makes it straightforward to query "all opens for email X" or "all emails opened more than once this week."
The Hardest Technical Challenge: Gmail DOM Drift
Here's the thing about building a Chrome extension on top of Gmail: Gmail is not your codebase. It's a complex, frequently-updated single-page application whose internal DOM structure changes without notice.
Our extension hooks into Gmail's compose window by finding specific DOM elements to:
- Mount our tracking chip in the compose toolbar
- Listen for the send button click event
- Intercept the email content before it's submitted
Gmail's developers periodically refactor their front-end, renaming CSS classes, restructuring elements, and moving buttons around. Every time this happens, our selectors break. The extension looks installed and running but silently fails to inject the tracking pixel.
We learned this the hard way from bug reports from users. Our fix was to:
- Monitor Gmail UI changes proactively (using automated headless browser tests that check our inject points)
- Build a fallback mechanism that retries with alternative selectors when the primary one fails
- Ship extension updates within days of major Gmail UI changes
- Add a visual indicator when injection fails (the tracking chip goes grey) so users know before they send
Chrome extension updates pushed to the Web Store typically go live within 1–3 days. For Gmail UI changes that break injection, this is an acceptable window, but it means users may have a brief period where tracking is broken after a Gmail update.
Edge Cases That Required Dedicated Fixes
Tab+Enter Keyboard Shortcut
Most Gmail users click the Send button. But a subset of keyboard-first users send emails with Tab+Enter (Tab moves focus to the Send button, Enter activates it). Or they use Ctrl+Enter / Cmd+Enter.
Our initial implementation only hooked into the Send button's click event. Keyboard-triggered sends bypassed the hook, meaning those emails shipped without the tracking pixel. We discovered this from user reports and fixed it by listening for all send event types: click, keyboard activation, and the form submission event.
Open Count Race Conditions
We had a bug where rapid open events (e.g., a security scanner hitting the pixel multiple times in quick succession) caused the open count to be incremented incorrectly due to a race condition in our event processing. We fixed this by adding idempotency checking in the event pipeline, so duplicate events within a short time window from the same IP are deduplicated before counting.
Account Switching
Chrome users often sign into multiple Google accounts. TrackMailBox needs to track emails sent from the currently active Gmail account, not a different one. When a user switches Gmail accounts, the extension needs to follow.
We added an account mismatch check: the extension periodically verifies that the signed-in TrackMailBox account matches the active Gmail account. If they diverge (e.g., the user switched Gmail accounts without re-signing into TrackMailBox), we surface a mismatch prompt asking them to re-authenticate.
Scheduled Email Tracking
Gmail's "Schedule Send" feature queues an email for future delivery. Our initial implementation injected the tracking pixel at send time, but with scheduled sends, the "send" event fires when the user schedules, not when Gmail actually delivers the email.
The fix was to inject the pixel at compose time rather than delivery time. The pixel is embedded in the email HTML when the compose window is in TrackMailBox-active mode, regardless of whether the email is sent immediately or scheduled.
Shipping to Production
Chrome Web Store submission is more involved than it sounds. The review process for Manifest v3 extensions requires detailed justification for each permission requested. We had to document exactly why we needed host_permissions for Gmail and our tracking domain, write a clear privacy disclosure, and respond to a round of reviewer questions about our data handling.
The first submission took about two weeks to approve. Updates are faster, typically 1–3 days.
Version 1.0 shipped on February 5, 2026. The initial feature set: open tracking, link click tracking, real-time notifications, and the dashboard. No frills, no paywalls.
What We Learned
Build the feedback loop into the product. Adding the uninstall feedback survey gave us our first real signals about why users were churning. The most common reason: "thought tracking wasn't working." That led directly to the account mismatch warning and the grey chip indicator.
Gmail changes will break you. Plan for it. Build monitoring, build fallbacks, and have an update pipeline ready. An extension that silently fails is worse than one that clearly fails.
Free doesn't mean no business model. TrackMailBox generates value for Nomos Insights not through the tool itself, but by demonstrating our engineering capability to potential clients. Every person who uses TrackMailBox is a potential referral to our software development services.
The one-to-one tracking market is underserved. Most email tracking products are built for marketing teams tracking campaigns to thousands of recipients. Individual professionals (salespeople, recruiters, freelancers, job seekers) tracking one-to-one professional correspondence need a very different product. TrackMailBox fills that gap.
What's Next
We're actively working on:
- Team features: a shared dashboard for small teams where multiple users contribute tracking data
- Weekly summary reports: a digest email showing your outreach performance
- CSV export: for users who want to pull tracking data into spreadsheets or CRMs
- More accurate Apple Mail handling: better signal separation between Apple MPP phantom opens and genuine opens
Try TrackMailBox free: no credit card required, no signature added, unlimited tracking forever. Built by Nomos Insights.
Writing about AI training, LLMs, and software engineering. Building AI products at Nomos Insights.
Continue Reading