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
Must be
"tracker:getComposeTrackingData"Email address(es) of the recipient(s). Defaults to
"unknown" if not provided.Email address of the sender. Optional and defaults to empty string if not provided.
Response
Indicates if the request was successful
Unique identifier for the user
Generated UUID for this email
ISO 8601 timestamp of when the tracking data was generated
Recipient email address (trimmed)
Sender email address (trimmed and lowercased) or null
Encoded tracking token containing the tracking payload
Complete URL to the tracking pixel image
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
Must be
"tracker:logTrackedEmail"Email tracking data to log
UUID of the tracked email
Recipient email address. Defaults to
"unknown"Sender email address. Defaults to empty string
Email subject line. Defaults to empty string
ISO 8601 timestamp of when the email was sent
URL to the tracking pixel
Response
Indicates if the request was successful
Example
tracker:getInboxBadgeData
Retrieves enriched tracking data for recent emails to display badges in the Gmail inbox.Request
Must be
"tracker:getInboxBadgeData"Response
Indicates if the request was successful
Base URL of the tracker server
Array of enriched email tracking data
UUID of the tracked email
Recipient email address
Sender email address
Email subject line
ISO 8601 timestamp of when the email was sent
URL to the tracking pixel
Total number of open events for this email
Number of unique opens (deduplicated)
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
Must be
"tracker:getPopupData"Response
Indicates if the request was successful
Unique identifier for the user
Base URL of the tracker server
Dashboard authentication token
Array of recent tracked emails from local storage
Recent emails enriched with server-side tracking data
Debug information for troubleshooting
ISO 8601 timestamp when the debug data was generated
Example
tracker:updateTrackerBaseUrl
Updates the tracker server base URL in extension storage.Request
Must be
"tracker:updateTrackerBaseUrl"New tracker base URL (e.g.,
"http://localhost:8090" or "https://tracker.example.com")Response
Indicates if the request was successful
The normalized base URL that was saved
Example
tracker:updateDashboardToken
Updates the dashboard authentication token in extension storage.Request
Must be
"tracker:updateDashboardToken"Dashboard authentication token
Response
Indicates if the request was successful
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
Must be
"tracker:markSuppressNext"UUID of the email to mark for suppression
Response
Indicates if the request was successful
Whether the suppression request was successfully sent to the server
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: