Skip to main content
The suppression system allows you to mark the next open event for a specific email as sender-suppressed. This is useful for handling Gmail’s image proxy behavior, where Gmail pre-fetches images before the user actually opens the email.

Mark suppress next

Mark the next open event for a specific email ID as sender-suppressed. The suppression signal is consumed on the next pixel hit for that email.

Request body

string
required
The email ID to mark for suppression. Must match the email_id in the tracking token.

Response

boolean
required
Indicates whether the request was successful
string
The email ID that was marked for suppression (only present on success)
number
Unix timestamp in milliseconds when the suppression signal was recorded (only present on success)
string
Error message (only present on failure)

Example request

Example response (success)

Example response (error)

How suppression works

  1. Send suppression signal: Call /mark-suppress-next with the email ID before Gmail’s proxy fetches the image
  2. Consume-once semantics: The suppression signal is consumed on the next pixel hit for that email
  3. TTL fallback: Unused signals expire after 10 seconds (configurable)
  4. Latency tracking: When a Gmail proxy hit consumes a signal, the latency is recorded

Example workflow

Suppression configuration

The suppression system has the following limits:
  • TTL: 10,000ms (10 seconds) - Suppression signals expire if not consumed
  • Map limit: 10,000 active email IDs - Oldest entries are evicted when limit is reached
  • Event limit: 5,000 debug events retained for monitoring

Metrics endpoints

The following endpoints provide monitoring and debugging information for the suppression system. These endpoints do not require authentication.

Gmail proxy latency

Retrieve latency statistics for Gmail proxy requests that consumed suppression signals.

Response

number
Number of latency samples collected
number | null
Minimum latency in milliseconds
number | null
Maximum latency in milliseconds
number | null
Average latency in milliseconds
number | null
50th percentile (median) latency
number | null
90th percentile latency
number | null
95th percentile latency
number | null
99th percentile latency

Example request

Example response

Suppress signals

Retrieve suppression signal statistics and recent events.

Response

number
Total number of suppression signals received (lifetime counter)
number
Number of email IDs currently in the suppression map
number
Time-to-live for suppression signals in milliseconds
array
Array of recent suppression debug events
string
Event type: mark_suppress_next, google_proxy_hit, suppression_consumed, or suppression_expired
string
Email ID associated with the event
number
Unix timestamp in milliseconds when the event occurred
string
IP address (normalized)
string
User agent string
number
Time between suppression signal and consumption (only for consumed/proxy events)
boolean
Whether a suppression signal was pending (only for proxy events)

Example request

Example response

Suppression debug

Retrieve detailed suppression event data grouped by email ID.

Response

number
Number of email IDs currently in the suppression map
number
Time-to-live for suppression signals in milliseconds
array
Array of all recent suppression debug events (same structure as suppress-signals endpoint)
object
Events grouped by email ID
object
number[]
Array of timestamps when suppression was marked
number[]
Array of timestamps for Google proxy hits
number[]
Array of timestamps when suppression was consumed
number[]
Array of timestamps when suppression expired

Example request

Example response

Gmail proxy detection

The server automatically detects Gmail proxy requests using:
  • User-Agent: Contains googleimageproxy
  • IP ranges: Matches known Google proxy prefixes:
    • 66.249.*
    • 64.233.*
    • 74.125.*
When both conditions are met, the request is flagged as a Gmail proxy hit and latency metrics are recorded if a suppression signal exists.