Skip to content
Last updated

Subscription Events Table

One-Click Unsubscribe automatically records all unsubscribe events in a dedicated table within your email domain's database. This table allows you to track unsubscribe activity, analyze trends, and build workflows to exclude unsubscribed users from future campaigns.

Database and Table Location

Your subscription event data is stored in your Treasure account in the following location:

  • Database: delivery_email_{your-domain} (e.g., delivery_email_example_com)
  • Table: subscription_events

The subscription_events table is automatically created in the same database as your email delivery events when you enable TD Managed Unsubscribe.

Event Schema

The subscription_events table contains the following fields:

FieldTypeDescription
profile_identifier_valuestringThe recipient's email address
profile_identifier_namestringAlways "email_address" (for future multi-channel support)
campaign_idstringUnique ID of the campaign
campaign_namestringName of the campaign
group_idstringID of the subscription group (currently always NULL for global unsubscribe)
group_namestringName of the subscription group (currently always "Global")
actionstringCurrently always "opt-out" (opt-in functionality will be available in a future release)
action_sourcestringHow the unsubscribe was triggered: "post" (HTTPS) or "mailto" (email)
channelstringCurrently always "email" (SMS and push channel support will be available in future releases)
task_idstringUnique identifier for the email sent
user_agentstringBrowser/device information (HTTPS only)
ip_addressstringIP address of the user (HTTPS only)
senderstringEmail address of the sender
received_timetimestampWhen TD received the unsubscribe request
timetimestampAutomatically added by Plazma

Integration with Audience Studio

To use unsubscribe data in your campaigns, you need to integrate it as Attribute properties in your Parent Segment:

  1. Create a table of unsubscribed users from the subscription_events table
  2. Create an Attribute table with the opt-out flag
  3. Register this table as an Attribute table in your Parent Segment
  4. Use the Attribute in Audience Studio to filter out unsubscribed users when creating campaign audiences
-- Create a table of unsubscribed users
CREATE TABLE unsubscribed_users AS
SELECT
email, latest_action, last_updated, cast(1 as bigint) is_opt_out
FROM (
  SELECT
    profile_identifier_value AS email,
    MAX_BY(action, received_time) AS latest_action,
    MAX(received_time) AS last_updated
  FROM subscription_events
  WHERE group_name = 'Global'
  GROUP BY profile_identifier_value
  HAVING MAX_BY(action, received_time) = 'opt-out'
) t1

Custom Non-PII Identifier Columns with the td_log_ Prefix

For strict security environments that prohibit storing raw email addresses in unsubscribe logs, the subscription_events table supports custom, non-PII identifier columns via the td_log_ prefix. When an activation defines output mappings whose destination column names start with td_log_ (for example, td_log_member_id), those columns are automatically added to the subscription_events table and populated for each unsubscribe event generated by that activation.

This enables unsubscribe management and analysis using non-PII identifiers — such as internal member IDs, CRM IDs, or hashed identifiers — instead of (or alongside) raw email addresses. The same td_log_* column values also appear in the events and error_events tables, so you can correlate unsubscribes with deliveries, bounces, and errors without joining on email addresses.

For setup instructions, limits (maximum of 5 td_log_* fields per activation, ASCII-only column names, 256-character column-name limit), and guidance on not mapping PII into td_log_* fields, see Email Delivery Events Table.