chrome.runtime.sendMessage.
tracker:getComposeTrackingData
Generates tracking data for a new email being composed. This message is sent when a user is about to send an email in Gmail.Request
string
required
Must be
"tracker:getComposeTrackingData"string
Email address(es) of the recipient(s). Defaults to
"unknown" if not provided.string
Email address of the sender. Optional and defaults to empty string if not provided.
Response
boolean
Indicates if the request was successful
string
Unique identifier for the user
string
Generated UUID for this email
string
ISO 8601 timestamp of when the tracking data was generated
string
Recipient email address (trimmed)
string | null
Sender email address (trimmed and lowercased) or null
string
Encoded tracking token containing the tracking payload
string
Complete URL to the tracking pixel image
string
Base URL of the tracker server
Example
tracker:logTrackedEmail
Logs a tracked email to local storage for display in the popup and inbox badges.Request
string
required
Must be
"tracker:logTrackedEmail"object
required
Email tracking data to log
string
required
UUID of the tracked email
string
Recipient email address. Defaults to
"unknown"string
Sender email address. Defaults to empty string
string
Email subject line. Defaults to empty string
string
required
ISO 8601 timestamp of when the email was sent
string
required
URL to the tracking pixel
Response
boolean
Indicates if the request was successful
Example
tracker:getInboxBadgeData
Retrieves enriched tracking data for recent emails to display badges in the Gmail inbox.Request
string
required
Must be
"tracker:getInboxBadgeData"Response
boolean
Indicates if the request was successful
string
Base URL of the tracker server
array
Array of enriched email tracking data
string
UUID of the tracked email
string
Recipient email address
string
Sender email address
string
Email subject line
string
ISO 8601 timestamp of when the email was sent
string
URL to the tracking pixel
number
Total number of open events for this email
number
Number of unique opens (deduplicated)
string | null
ISO 8601 timestamp of the last open event, or null if never opened
Example
tracker:getPopupData
Retrieves comprehensive data for the extension popup UI, including recent emails, enriched tracking data, and debug information.Request
string
required
Must be
"tracker:getPopupData"Response
boolean
Indicates if the request was successful
string
Unique identifier for the user
string
Base URL of the tracker server
string
Dashboard authentication token
array
Array of recent tracked emails from local storage
array
Recent emails enriched with server-side tracking data
array
Debug information for troubleshooting
string
ISO 8601 timestamp when the debug data was generated
Example
tracker:updateTrackerBaseUrl
Updates the tracker server base URL in extension storage.Request
string
required
Must be
"tracker:updateTrackerBaseUrl"string
required
New tracker base URL (e.g.,
"http://localhost:8090" or "https://tracker.example.com")Response
boolean
Indicates if the request was successful
string
The normalized base URL that was saved
Example
tracker:updateDashboardToken
Updates the dashboard authentication token in extension storage.Request
string
required
Must be
"tracker:updateDashboardToken"string
required
Dashboard authentication token
Response
boolean
Indicates if the request was successful
string
The token that was saved
Example
tracker:markSuppressNext
Marks an email to suppress the next open event. This is used when the sender views their own sent email to avoid tracking themselves.Request
string
required
Must be
"tracker:markSuppressNext"string
required
UUID of the email to mark for suppression
Response
boolean
Indicates if the request was successful
boolean
Whether the suppression request was successfully sent to the server
string
Status message:
"ok" on success, error description on failureExample
Implementation details
All message handlers are implemented inserviceWorker.js:19-116. The service worker uses an async IIFE pattern with sendResponse and returns true to indicate asynchronous response handling: