TrackingPayload interface defines the data structure used to create tracking tokens. This payload is encoded into the tracking pixel URL and decoded when the pixel is accessed.
Fields
Unique identifier for the user or account that owns this tracking pixel. Used for data isolation and filtering.
Unique identifier for the specific email being tracked. This should be a unique value for each email sent.
Email address of the recipient. Used to associate open events with specific recipients.
Email address of the sender. Optional field that can be used to identify which sender account was used.
ISO 8601 timestamp indicating when the email was sent. Format:
YYYY-MM-DDTHH:mm:ss.sssZUsage
This interface is used when:- Creating tracking tokens with
encodeTrackingToken()function - Generating tracking pixel URLs for emails
- Decoding tracking tokens in the tracking endpoint
Related APIs
- Tracking pixel endpoint - Decodes
TrackingPayloadfrom tracking tokens - Mark suppress next - Uses
email_idfrom the payload for suppression
Example
Database mapping
When a tracking pixel is accessed, theTrackingPayload data is stored in the tracked_emails table and used to create records in the open_events table.