Skip to main content
The Email Tracker extension uses Chrome’s local storage API (chrome.storage.local) to persist configuration and tracking data. All storage keys are defined in serviceWorker.js:1-6.

Storage key constants

tracker_user_id

Stores a unique identifier for the extension user.
type
string
UUID v4 format
generated
when
Auto-generated on first use via crypto.randomUUID()
persistence
string
Permanent - set once and persists across sessions

Usage

The user ID is automatically generated and stored when the extension is installed or when ensureUserId() is first called:
This user ID is included in every tracking token to identify which user’s extension generated the tracking pixel.

tracker_base_url

Stores the base URL of the tracking server.
type
string
HTTP/HTTPS URL
default
string
"https://email-tracker.duckdns.org"
validation
string
Must start with http:// or https://, trailing slashes are automatically removed

Usage

Set automatically on extension installation:
The URL is normalized before storage:

Updating

Users can update the tracker base URL via the tracker:updateTrackerBaseUrl message type:

recent_tracked_emails

Stores an array of recently tracked emails for display in the popup and inbox badges.
type
array
Array of email tracking objects
limit
number
Maximum 100 emails (defined by RECENT_LIMIT)
order
string
Most recent first (newest emails prepended to array)

Structure

Each item in the array has the following structure:
emailId
string
required
UUID of the tracked email
recipient
string
Recipient email address. Defaults to "unknown"
senderEmail
string
Sender email address. Defaults to empty string
subject
string
Email subject line. Defaults to empty string
sentAt
string
required
ISO 8601 timestamp of when the email was sent
pixelUrl
string
required
URL to the tracking pixel

Usage

Emails are appended to this array when tracked:
The array is automatically trimmed to 100 items, removing the oldest entries when the limit is exceeded.

Enrichment

When retrieved via tracker:getInboxBadgeData, the stored emails are enriched with live tracking data from the server:

dashboard_token

Stores the authentication token for the tracker dashboard API.
type
string
Arbitrary string token
default
string
Empty string (no token)
usage
string
Sent as X-Tracker-Token header when fetching email tracking data

Usage

The dashboard token is required to fetch tracking statistics from the server. Without it, all tracking data will show zero opens:

Updating

Users can update the dashboard token via the tracker:updateDashboardToken message type:

Reading storage values

To read storage values from a content script or popup:

Writing storage values

To write storage values: