Featured
13, Mar 2026

How to Use Data Views to Improve Your Email Marketing (+ Video)

Are your marketing campaigns delivering the results you expect? What if you could unlock a goldmine of insights hidden within your Marketing Cloud data?

How to use data views marketing cloud salesforce partner solution junkies

In today's data-driven world, accurate KPIs are crucial, and Salesforce Marketing Cloud Engagement Data Views are your key to achieving them. This guide will show you how to leverage Data Views to gain actionable insights, improve campaign performance, and save valuable time through automation.

What are Data Views?
 

Data Views in Salesforce Marketing Cloud Engagement are pre-built tables that provide a comprehensive look at your campaign performance. They track essential metrics, giving you a clear picture of how your emails are performing:

  • _Sent: Tracks successful email deliveries, helping you monitor deliverability rates.
  • _Open: Measures recipient engagement by recording email opens.
  • _Click: Shows which links within your emails are driving action.
  • _Bounce: Identifies delivery failures, alerting you to potential list hygiene issues.

Understanding these metrics allows you to pinpoint areas for improvement and optimise your campaigns for better results.
 

Why Use SQL and Data Views When I Have Standard Reports?

While standard reports provide a high-level overview, Data Views and SQL offer unparalleled flexibility and depth:

  • Granularity and Customisation: Go beyond predefined reports to pinpoint specific data points, create highly customised views, and combine data from multiple Data Views.
  • Automation and Efficiency: Automate data extraction, integrate data with other systems, and analyse trends over time.
  • Deeper Insights and Analysis: Build attribution models and troubleshoot issues by drilling down into the underlying data.

How to Access Data Views

To unlock the potential of Data Views, you'll use SQL queries within Automation Studio. Data Views are system-generated tables holding subscriber and journey data for up to the last 6 months, offering insights not found in standard reports. As mentioned in the video, some key views include _Sent, _Open, _Click, _Bounce, and _Unsubscribe.

Data views, unlike other types of data extension, are not directly visible in the Marketing Cloud UI. To understand what data they contain and the names of the fields that your SQL will target, you can look them up on the Salesforce Help website: https://help.salesforce.com/s/articleView?id=mktg.mc_as_data_views.htm&type=5

Now that we know what they are and where the documentation is, we need to get this data into your Marketing Cloud instance. This allows you to visualise it and, as the video suggests, combine views to create custom reports, analyse trends, and optimise your strategy. Let’s get started:

  1. Navigate to Automation Studio: Log in to your Marketing Cloud account and go to "Automation Studio." This is where you create automated processes, including SQL queries, to extract and manipulate data.
  2. Create a New SQL Query Activity: Click "New Activity" and select "SQL Query." This initiates the process of writing a query to access Data Views.
  3. Write Your Query: The video demonstrates combining the _Sent and _Click Data Views for deeper insights. Here's a specific example of an SQL query that achieves this, retrieving the time taken between an email send and the first click – a metric not available in standard reports:
sql

This query calculates the time difference in minutes between when an email was sent and when a subscriber first clicked a link. This helps you understand how quickly subscribers engage with your emails, which can inform your content and timing strategies.

Explanation:

  • SELECT s.SubscriberKey,FirstClicks.FirstClickTime AS ClickTime,s.EventDate AS SendTime, DATEDIFF(minute, s.EventDate, FirstClicks.FirstClickTime) AS TimeToClickMinutes: Specifies the columns to retrieve and calculates the time difference.
  • WHERE s.EventDate >= DATEADD(day, -30, GETDATE()) AND DATEDIFF(minute, s.EventDate, FirstClicks.FirstClickTime) > 0
  • AND j.EmailName = 'Your Specific Email Name Here':  Filters the results to show clicks from the past 30 days and ensures the click happened after the send. This is where you filter by the specific email name also
  • FROM_Sent s JOIN (SELECT SubscriberKey,JobID, MIN(EventDate) AS FirstClickTime FROM _Click WHERE EventDate >= DATEADD(day, -30, GETDATE()) GROUP BY SubscriberKey,JobID) AS FirstClicks ON s.JobID = FirstClicks.JobID AND s.SubscriberKey = FirstClicks.SubscriberKey JOIN   _Job j ON s.JobID = j.JobID  : Tells the query which data views to get the data from and also the sub query which gets the first click for that subscriber
     

Caveats:

  • Performance can be affected by the volume of data in the _Click and _Sent Data Views. For very large datasets, consider adding indexes or filtering further.
  • The DATEDIFF function returns an integer, so the time difference is rounded to the nearest minute
  • Replace 'Your Specific Email Name Here’ with the name of the sent email you wish to filter by
  • Remember the 6-month data retention limit for Data Views mentioned in the video; queries looking further back than this will not return complete data.
  • Save and Test: Save your query and click "Test" to ensure it's pulling the correct data. Testing ensures the query is accurate and avoids errors in your data analysis. You must specify a target Data Extension for the results. You can run the query once via the Automation Studio UI. Furthermore, as highlighted in the video, you can place this SQL Query activity within an automation and schedule it to run recurrently (e.g., daily) to keep your custom report data fresh.

Remember that users need appropriate permissions in Marketing Cloud, including those for Automation Studio and creating/running SQL query activities.
 

Create Custom Views for Deeper Insights

While individual Data Views are valuable, combining them offers richer insights. For example, to calculate the percentage of subscribers who clicked a specific link within an email, you can use the following query:

sql

This query calculates the percentage of subscribers who clicked a specific link, allowing you to gauge the effectiveness of individual links. This insight goes beyond overall click-through rates and allows you to analyse the performance of specific calls to action within your emails.

Caveats:

  • Replace Placeholder: The 'yourSpecificLink' placeholder must be replaced with the actual URL of the link you want to analyse.
  • The performance can also be affected by large data sets.
  • The date range is also limited to the last 30 days.
     

Schedule Automations and Notifications

To automate data extraction, create a new automation in Automation Studio and drag your SQL query activity into it. Configure the schedule to run daily, weekly, or monthly, depending on your needs. You also have the option to receive an email notification when the automation has successfully completed or when it fails, to do this, Go to the Activity tab and add your email/multiple email addresses of who you would like to receive a notification.

Quick Tips

  • Start with pre-built Data Views like _Sent and _Click before attempting advanced customisations.
  • Always test your queries thoroughly to ensure they pull the right data and avoid errors
  • Schedule time to review and adjust your queries as your marketing strategy evolves.
  • Use online resources and Marketing Cloud documentation to troubleshoot SQL errors.
  • Optimise query performance by using indexes and limiting the number of columns and rows in your queries.
  • Ensure data accuracy and consistency by following best practices for data management.
     

Unlock the power of your Marketing Cloud data with Data Views. By using SQL queries and automation, you can gain valuable insights, improve campaign performance, and make data-driven decisions. Start exploring Data Views today and take your marketing to the next level.

Need help? Speak to one of our Salesforce consultants.