Skip to content
ChangelogBook a demoSign up

Bring email engagement data into your warehouse

AudienceData engineers, marketing operations
PrerequisitesA Customer Studio parent model for your people

Export email sends, opens, and clicks from your email service provider (ESP) to your warehouse. Use this data in Customer Studio to find engaged customers, exclude inactive subscribers, and follow up based on email activity.


Why export email engagement data to your warehouse

Export email engagement data to your warehouse to use it alongside purchases, product usage, and other customer data.

With this data in your Customer Studio schema, you can:

  • Build engagement-based audiences. Find customers who clicked an email link in the last 30 days.
  • Exclude inactive subscribers. Identify customers who haven't clicked an email recently.
  • Follow up based on engagement. Use a Hold until tile in a journey to send a follow-up when someone doesn't click within three days.
  • Use engagement data in AI Decisioning. Make email engagement events available to AI Decisioning as campaign events.

Plan your export

Before choosing an export method, consider these requirements and best practices:

  • Check your ESP plan. Some export methods are paid add-ons, in beta, or turned on by your ESP account team. The Access column for each ESP below shows which. Confirm access before you set up your pipeline.
  • Plan for historical and new events. Some export methods only collect new events. If you need historical data, load older events before setting up ongoing exports.
  • Monitor for missing data. Monitor for missing files or events, not just failed jobs. If an export stops working and your ESP no longer retains the missing events, you may not be able to recover them.
  • Use clicks as a stronger engagement signal than opens. Email privacy features, such as Apple Mail Privacy Protection, can record opens even when someone hasn't read a message. A click requires someone to select a link.
  • Match events to your customers. ESPs use their own identifiers, which may not match your warehouse records. When multiple profiles share an email address, matching by email alone can associate events with the wrong customer. Use your own customer IDs or Hightouch Identity Resolution to connect events to the correct customers.

Standardize engagement events

Map events from each ESP to a consistent set of columns in your warehouse or data pipeline before creating event models in Customer Studio. This lets you use the same audience filters and engagement calculations across providers. Some columns, such as event_type and customer_id, may need to be derived or populated during this process.

ColumnDescription
event_idA unique identifier for each event. Use the ESP event ID when available, such as Marketo's marketoGUID or Klaviyo's uuid.
event_typeThe event type, such as sent, delivered, opened, clicked, or bounced.
event_timestampWhen the event occurred, converted to UTC. Store the time the event was loaded separately, such as in ingested_at.
source_user_idThe recipient's identifier in the ESP.
customer_idThe customer identifier used in your warehouse. Don't expect the ESP to provide it.
emailThe recipient's email address. Don't rely on email alone to identify customers.
campaign_idThe campaign identifier provided by the ESP.
message_idThe message identifier provided by the ESP. Depending on the ESP, it can identify a message definition, a send, or a dispatch.
message_nameThe campaign, journey, or message name.
urlThe clicked URL, when available. Use it to build audiences based on clicked links.
is_uniqueWhether the ESP identifies the event as unique, when available. Some ESPs deduplicate events before you export them.
raw_eventOptional. The original event data, which you can use to troubleshoot or remap fields.

If your ESP doesn't provide an event ID, generate one from fields that uniquely identify the event. Make sure the ID stays the same across repeated exports so you can identify duplicates. If you combine data from multiple ESPs, include the provider in the identifier.

Choose an export method

Choose your ESP below to compare export methods, historical data availability, and field mappings.

Availability and limits vary by ESP and plan. Check the linked ESP documentation before you set up your export.

Salesforce Marketing Cloud

Both export methods use scheduled automations in Automation Studio.

Add a File Transfer activity to move exported files to your SFTP server or cloud storage. Without this step, the files stay in Marketing Cloud, even when the automation completes successfully.

MethodAccessHistoryOutput
Data views with SQLRequires Automation StudioThe last six monthsOne CSV, shaped by your query
Tracking extractRequires Automation StudioUp to six monthsA .zip with one CSV per event type you select

Each method is a sequence of Automation Studio activities. Put each activity in its own step so that each one starts only after the previous one finishes:

  • Data views: A SQL Query activity writes the events to a data extension, a Data Extract activity exports the data extension to a file, and a File Transfer activity moves the file.
  • Tracking extract: A Data Extract activity with the tracking extract type creates a .zip file, and a File Transfer activity moves it. End the output file name in .zip. Select at least the Sent, Opens, Clicks, and SendJobs outputs. The other outputs identify each send only by ID, and SendJobs adds details like the email name.

Use data views if someone on your team writes SQL and you want one file with the columns you choose. Use tracking extract to export without SQL, and plan to unzip the file and load each CSV into its own table.

Filter each run to a rolling date range that overlaps the previous run, such as the last seven days, instead of fixed dates, so no events fall between runs. Remove the duplicates from overlapping runs with event_id.

Map Marketing Cloud fields to the standard columns:

ColumnMarketing Cloud field
source_user_idSubscriberKey
event_timestampEventDate, converted to UTC
message_idJobID
message_nameEmailName, from _Job or SendJobs
urlURL, on clicks only
is_uniqueIsUnique

Before you combine Marketing Cloud events with other sources, convert EventDate to UTC. Marketing Cloud stores it in Central Standard Time and doesn't adjust it for daylight saving time.

Braze

MethodAccessHistoryOutput
CurrentsIncluded with some Braze packagesFrom the day you turn it onFiles in Amazon S3, Google Cloud Storage, or Azure Blob Storage
Snowflake Data SharingContact your Braze account managerThe most recent two yearsShared tables in your Snowflake account or a Braze-provided reader account

If your warehouse is Snowflake, use Snowflake Data Sharing. There's no pipeline to maintain, and it includes two years of history. Otherwise, turn on Currents as early as you can, since its history starts the day you connect it.

If your Currents connector's credentials expire, Braze stops sending events, and after five days it drops them permanently. Renew credentials before they expire, and monitor your storage bucket for missing files.

If you don't have a Snowflake account, Braze can create a reader account for you and share your data into it. If you use a reader account, copy the shared data into your own warehouse before you join it with other customer data. A reader account can only query the shared tables.

Map Braze fields to the standard columns:

ColumnBraze field
source_user_idexternal_user_id
event_timestamptime
campaign_idcampaign_id in Currents, CAMPAIGN_API_ID in Snowflake Data Sharing
message_iddispatch_id, for scheduled campaigns
message_namecampaign_name or canvas_name
urlurl, on clicks only
is_uniqueNot provided

A Braze campaign_id covers every send of a recurring campaign, such as a weekly newsletter. To report on each send separately, use dispatch_id for scheduled campaigns. Action-based campaigns, API-triggered campaigns, and Canvas steps get a different dispatch_id for each recipient, so you can't use it to group the recipients of one send.

Iterable

To include historical engagement, use the Export API to load older events before enabling Data Sync or Snowflake Secure Data Sharing for ongoing updates.

MethodAccessHistoryOutput
Export APIIncludedIncludes historyFiles or API responses you load yourself
Data SyncContact your Iterable account teamFrom the day you turn it onDatabricks, BigQuery, Redshift, Amazon S3, or SFTP
Snowflake Secure Data SharingContact your Iterable account teamFrom the day you turn it onShared tables in your Snowflake account

For near real-time events, Iterable system webhooks send sends, opens, clicks, bounces, and other events as they happen. If you use Hightouch Events, send them to a webhook event source, which can load them into your warehouse. Webhooks only send new events, so load older events with the Export API.

Before you set up an Iterable export, check these details:

  • Use your project's API host. US projects use api.iterable.com and EU projects use api.eu.iterable.com. Data Sync also requires you to allow an IP address for your project's region.
  • Check data type names. The unsubscribe data type is emailUnSubscribe, with a capital S.
  • Deduplicate after a full refresh. For Amazon S3, a Data Sync full refresh adds the full dataset again without deleting existing files. Remove duplicates with event_id to avoid double-counting events.

Map Iterable fields to the standard columns:

ColumnIterable field
source_user_iduserId or email, depending on your project. Snowflake Secure Data Sharing event tables include EMAIL.
event_timestampcreatedAt
campaign_idcampaignId
message_idmessageId
message_nameCAMPAIGN_NAME in Snowflake Secure Data Sharing, or campaign data from Data Sync
urlurl, on clicks only
is_uniqueNot documented

Klaviyo

Data warehouse sync is part of Advanced KDP, which isn't included in Klaviyo's standard marketing plan. Without it, use the Events API for ongoing exports. The Bulk Export API is invite-only during beta, so request access from Klaviyo before you plan a backfill around it.

MethodAccessHistoryOutput
Events APIIncludedIncludes history, slow at volumeAPI responses you load yourself
Bulk Export APIInvite-only betaIncludes historyA downloaded file per export job
Data warehouse syncRequires an Advanced KDP subscriptionUp to all history, chosen when you connectHourly syncs to Snowflake, BigQuery, Redshift, Databricks, Azure Synapse, or Amazon S3

When you map event_type, use Klaviyo's metric names: Received Email maps to delivered, Opened Email to opened, and Clicked Email to clicked. Klaviyo records Received Email when a recipient receives an email and doesn't record a separate send event, so Klaviyo counts won't match send counts from other ESPs. Campaign Name can repeat across campaigns, so use $message to identify a specific message.

Map Klaviyo fields to the standard columns:

ColumnKlaviyo field
source_user_idprofile_id
event_timestampdatetime
campaign_idNo direct equivalent. Use $message for campaigns and $flow for flows.
message_id$message
message_nameCampaign Name
urlURL, on clicks only
is_uniqueNot documented

Marketo

Both Marketo Engage export methods are APIs, so you build and maintain the integration.

MethodAccessHistoryOutput
Bulk Activity Extract APIRequires an API user with activity accessIncludes history, in chunks of up to 31 daysA downloaded CSV per export job
REST APIRequires an API user with activity accessIncludes history, slow at volumeAPI responses you load yourself

Use the Bulk Activity Extract API for daily exports and backfills. It has a daily export quota of 500 MB, shared across leads, activities, program members, and custom objects. Exports that other teams run against the same Marketo instance count toward the same quota. Export files expire after seven days. If you reach the quota, use the REST API until the quota resets at midnight US Central Time.

Map Marketo fields to the standard columns:

ColumnMarketo field
event_idmarketoGUID
source_user_idleadId
event_timestampactivityDate
campaign_idcampaignId, the smart campaign that triggered the email
message_idprimaryAttributeValueId, the email ID
message_nameprimaryAttributeValue, the email name
urlIn the attributes JSON, on clicks only
is_uniqueNot applicable. Marketo logs one open per lead per email.

Marketo keeps send and delivery events for less time than open and click events, so a long backfill can include opens and clicks without their matching sends. If export jobs overlap, deduplicate on marketoGUID.

Add engagement events to Customer Studio

After loading engagement events into your warehouse, add them to your Customer Studio schema to use them in audiences and journeys.

  1. Connect events to customers. Join each event to your parent model using customer_id.
  2. Create event models. Create an event model for each event type you want to use, such as Email Sent, Email Opened, and Email Clicked. If you store all events in one table, filter each model by event_type.
  3. Set the timestamp. Select event_timestamp as the timestamp column.
  4. Set the primary key. Select event_id as the primary key. Event-based journeys require a primary key.
  5. Verify your data. Filter on events to create a test audience of customers who clicked an email in the last 30 days. Compare the number of customers in the audience with the number of unique clickers your ESP reports for the same period.

Results may differ from your ESP reports because providers count events differently or exclude events associated with deleted profiles.


Next steps

Ready to get started?

Jump right in or a book a demo. Your first destination is always free.

Book a demoSign upBook a demo

Need help?

Our team is relentlessly focused on your success. Don't hesitate to reach out!

Feature requests?

We'd love to hear your suggestions for integrations and other features.

Privacy PolicyTerms of Service