Ammati
Chrome Extension • 100% Private • Free

Gmail Read Tracker: just know it landed in their inbox

Every commercial email tracker for Gmail seems to want £15 a month, permission to read your entire inbox on their servers, or to slap an embarrassing “Tracked with MailSnooper” advert onto the bottom of your emails. I just wanted two quiet ticks in my Sent folder so I knew an email had safely arrived and been opened. So I built this: a tiny Chrome extension paired with a 60-second Google Apps Script that runs entirely inside your own Google account.

Gmail — Sent Mail (Interactive Demo)
Click any row below to toggle its open state ✓ = Sent · ✓✓ = Opened
✓✓
To: Sarah Jenkins — Script notes & Tuesday rehearsal — Opened 2 times (first opened 4m ago)
Opened 4m ago
✓
To: Festival Organisers — Tech rider & stage timings — Tracked · Waiting for recipient to open
Sent 12m ago
✓✓
To: A friend — New Ammati build is live — Opened 1 time (just now)
Opened just now
✓ Track On
Zero watermarks or signatures added
Why it works better

Your inbox stays yours. No third-party servers.

01

Inline ✓ and ✓✓ Ticks

Right inside Gmail’s Sent folder and open thread headers: a single grey ✓ means sent and tracked; a green double ✓✓ means it’s been opened in their inbox.

02

Smart Self-Open Protection

Opening your own email in your Sent folder won’t trigger a false positive. The extension recognises when you’re viewing your own thread and tells your tracker to ignore it.

03

Hosted on Your Own Google Account

Instead of paying a SaaS middleman, the 1×1 tracking endpoint runs as a tiny Google Apps Script in your own Google Drive. Free forever, under your control.

04

No Footers, No Guilt

Never appends “Sent with…” badges to your messages, and if you don’t want tracking on a specific email, one click on the ✓ Track On pill next to Send switches it off.

Manifest V3 Chrome Extension Works on Chrome, Brave, Edge & Opera Zero external database Hover for open count & exact timestamp
Get it running in 2 minutes

Two steps: paste the script, load the extension

Because this tool refuses to route your email metadata through someone else’s server, you take 60 seconds to deploy the tiny receiver script in your own Google account, then point the Chrome extension at it.

Step 1 · ~60 seconds

Deploy your personal Google Apps Script

  1. Open script.google.com and click + New project.
  2. Copy the Apps Script code below (or from apps-script/Code.gs inside the ZIP) and paste it in, replacing the default code.
  3. Click Save (Ctrl+S), then click Deploy → New deployment (top right).
  4. Click the gear icon ⚙️ next to Select type and choose Web app.
  5. Set Execute as: Me and Who has access: Anyone, then click Deploy.
  6. Copy the Web app URL (it ends in /exec).
Download Code.gs
Step 2 · ~30 seconds

Load the Chrome Extension

  1. Download and unzip gmail-read-tracker.zip on your computer.
  2. In Chrome (or Brave / Edge), open a tab to chrome://extensions/.
  3. Switch on Developer mode in the top-right corner.
  4. Click Load unpacked (top-left) and select the extension folder from the zip.
  5. Click the Gmail Read Tracker icon in your toolbar, paste your /exec Web app URL, and click Save.
  6. Refresh Gmail! You’ll see ✓ Track On right next to your Send button.

Google Apps Script Code (Code.gs)

Click “Copy Apps Script Code” and paste straight into script.google.com.

const SELF_OPEN_GRACE_MS = 15000; // 15s grace window after Send so sender pre-fetch is ignored
const MAX_STORED_ITEMS = 300;     // Auto-prunes oldest entries

function doGet(e) {
  const params = (e && e.parameter) ? e.parameter : {};
  const action = params.action || "pixel";

  if (action === "ping") {
    return jsonResponse({ ok: true, message: "Gmail Read Tracker is connected and ready!" });
  }
  if (action === "status") {
    return getAllStatuses();
  }
  if (action === "register") {
    return registerEmailRecord({
      id: params.id,
      subject: params.subj || "",
      recipient: params.to || "",
      createdAt: Number(params.ts || Date.now())
    });
  }
  if (action === "clear_self") {
    return recordSenderIgnoreWindow(params.id);
  }
  return handlePixelHit(params);
}

function doPost(e) {
  try {
    const rawBody = (e && e.postData && e.postData.contents) ? e.postData.contents : "{}";
    const body = JSON.parse(rawBody);
    const action = body.action || "";
    if (action === "register") return registerEmailRecord(body);
    if (action === "status") return getAllStatuses();
    if (action === "ignore_self") return recordSenderIgnoreWindow(body.id);
    if (action === "delete") return deleteEmailRecord(body.id);
    return jsonResponse({ ok: false, error: "Unknown action: " + action });
  } catch (err) {
    return jsonResponse({ ok: false, error: String(err) });
  }
}

function registerEmailRecord(data) {
  const id = String(data.id || "").trim();
  if (!id) return jsonResponse({ ok: false, error: "Missing tracking id" });
  const lock = LockService.getScriptLock();
  try {
    lock.waitLock(5000);
    const props = PropertiesService.getScriptProperties();
    const key = "TRACK_" + id;
    const existingRaw = props.getProperty(key);
    const now = Date.now();
    const record = existingRaw ? JSON.parse(existingRaw) : {
      id: id,
      subject: String(data.subject || "").slice(0, 180),
      recipient: String(data.recipient || "").slice(0, 180),
      createdAt: Number(data.createdAt || now),
      ignoreUntil: now + SELF_OPEN_GRACE_MS,
      openCount: 0,
      firstOpenedAt: null,
      lastOpenedAt: null
    };
    if (data.subject) record.subject = String(data.subject).slice(0, 180);
    if (data.recipient) record.recipient = String(data.recipient).slice(0, 180);
    record.ignoreUntil = Math.max(record.ignoreUntil || 0, now + SELF_OPEN_GRACE_MS);
    props.setProperty(key, JSON.stringify(record));
    pruneOldRecordsIfNeeded(props);
    return jsonResponse({ ok: true, record: record });
  } catch (err) {
    return jsonResponse({ ok: false, error: String(err) });
  } finally {
    try { lock.releaseLock(); } catch (_) {}
  }
}

function recordSenderIgnoreWindow(id) {
  if (!id) return jsonResponse({ ok: false, error: "Missing id" });
  const lock = LockService.getScriptLock();
  try {
    lock.waitLock(5000);
    const props = PropertiesService.getScriptProperties();
    const key = "TRACK_" + id;
    const raw = props.getProperty(key);
    if (raw) {
      const record = JSON.parse(raw);
      record.ignoreUntil = Date.now() + 10000;
      props.setProperty(key, JSON.stringify(record));
    }
    return jsonResponse({ ok: true });
  } catch (err) {
    return jsonResponse({ ok: false, error: String(err) });
  } finally {
    try { lock.releaseLock(); } catch (_) {}
  }
}

function handlePixelHit(params) {
  const id = String(params.id || "").trim();
  const sentTs = Number(params.ts || 0);
  if (id) {
    const lock = LockService.getScriptLock();
    try {
      lock.waitLock(4000);
      const props = PropertiesService.getScriptProperties();
      const key = "TRACK_" + id;
      const raw = props.getProperty(key);
      const now = Date.now();
      let record = raw ? JSON.parse(raw) : {
        id: id,
        subject: String(params.subj || "").slice(0, 180),
        recipient: String(params.to || "").slice(0, 180),
        createdAt: sentTs || now,
        ignoreUntil: (sentTs || now) + SELF_OPEN_GRACE_MS,
        openCount: 0,
        firstOpenedAt: null,
        lastOpenedAt: null
      };
      const baseCreated = record.createdAt || sentTs || now;
      const isWithinInitialGrace = (now - baseCreated) < SELF_OPEN_GRACE_MS;
      const isWithinSenderIgnore = record.ignoreUntil && (now < record.ignoreUntil);
      if (!isWithinInitialGrace && !isWithinSenderIgnore) {
        record.openCount = (record.openCount || 0) + 1;
        if (!record.firstOpenedAt) record.firstOpenedAt = now;
        record.lastOpenedAt = now;
      }
      props.setProperty(key, JSON.stringify(record));
    } catch (_) {} finally {
      try { lock.releaseLock(); } catch (_) {}
    }
  }
  return ContentService.createTextOutput("ok").setMimeType(ContentService.MimeType.TEXT);
}

function getAllStatuses() {
  try {
    const props = PropertiesService.getScriptProperties().getProperties();
    const items = {};
    for (const k in props) {
      if (k.indexOf("TRACK_") === 0) {
        try {
          const item = JSON.parse(props[k]);
          if (item && item.id) items[item.id] = item;
        } catch (_) {}
      }
    }
    return jsonResponse({ ok: true, items: items, serverTime: Date.now() });
  } catch (err) {
    return jsonResponse({ ok: false, error: String(err) });
  }
}

function deleteEmailRecord(id) {
  if (!id) return jsonResponse({ ok: false, error: "Missing id" });
  PropertiesService.getScriptProperties().deleteProperty("TRACK_" + id);
  return jsonResponse({ ok: true });
}

function pruneOldRecordsIfNeeded(props) {
  const all = props.getProperties();
  const keys = Object.keys(all).filter(function(k) { return k.indexOf("TRACK_") === 0; });
  if (keys.length <= MAX_STORED_ITEMS) return;
  const parsed = keys.map(function(k) {
    try { return { key: k, createdAt: JSON.parse(all[k]).createdAt || 0 }; }
    catch (_) { return { key: k, createdAt: 0 }; }
  });
  parsed.sort(function(a, b) { return a.createdAt - b.createdAt; });
  const toDelete = parsed.slice(0, parsed.length - MAX_STORED_ITEMS);
  for (var i = 0; i < toDelete.length; i++) props.deleteProperty(toDelete[i].key);
}

function jsonResponse(payload) {
  return ContentService.createTextOutput(JSON.stringify(payload)).setMimeType(ContentService.MimeType.JSON);
}