5 tips for building data-driven email campaigns

Data drives personalization, and the options are nearly endless. Check out our top tips for analyzing data and using it to build smart, targeted emails that land your message in front of the right people.



Spray and pray – that used to be the name of the email marketing game. But these days, bulk email just doesn't cut it anymore. If only there were a way to make personalized, timely, relevant marketing emails that lead to higher engagements and more user conversions.

Lucky for you, there is a way: data-driven email programs. Most businesses collect user data through transactional emails, website engagements, and email engagements. In this article, we’ll go over five tips for using the data you already have on hand to build effective data-driven email campaigns.

Why is data important?

Data is everywhere, and your business is constantly collecting it from users. For instance, your business probably collects user data from transactional emails, emails triggered by actions like requesting a password reset or signing up for a newsletter. These metrics provide valuable insight into your user’s demographics, behavioral patterns, and geographical distribution. However, because transactional emails are often automated, they’re usually thought of as separate from planned email campaigns with specific goals and contact lists.

In the growing world of email automation, this separation can be a problem. The lines are starting to blur, and data from transactional emails can be lost or overlooked by marketing. Transactional data should coalesce seamlessly into targeting your marketing audience. In other words, email tracking for transactional emails is a bit of a blind spot when it comes to analyzing metrics.

Let’s look at how we can use all of the user data your business collects to improve your email program. Then, we’ll zone in on two ways to make your user data work for you with Mailgun.

What data privacy protocols should I be aware of?

Before we dive into our five tips for using data in your emails, let’s talk about data privacy. We’ve gone over data privacy in depth elsewhere, as well as groundbreaking legislation like the General Data Protection Regulation (GDPR), but let’s refresh our memories.

In general, data privacy protocols revolve around three key ideas:

  • The data user’s right to not be contacted

  • The data user’s right to have control over their personal data

  • The data user’s right to revoke access to their personal data

Data user refers to the user from whom your business has collected data. As you can see, data privacy protocols focus on protecting consumers’ rights to privacy. Besides GDPR, there are other compliance standards like the California Consumer Privacy Act (CCPA) and the Health Insurance Portability and Accountability Act (HIPAA) each stipulate specific data privacy standards to protect individuals.

Depending on your business and where it operates, you’ll have to work with your Legal Team to determine the best way to meet data privacy standards and to stay on top of changing consumer protections like Apple’s Mail Protection Program (MPP).

At Mailgun, we always work to meet the highest possible privacy standards to protect our users from data privacy problems.

What are five tips for using data in your email program?

So what does this all mean for email? Stay on top of your email game and use data to:

  1. Get better metrics for your email campaign.

  2. Target your audience with segmentation.

  3. Personalize your emails.

  4. Determine important benchmarks for your email marketing campaign’s performance.

  5. Optimize send time.

We’ll go over each of these in more detail below.

1. Five data-driven metrics to use for your email campaigns

Ever wanted to get more out of your data? Does your marketing team have questions on the performance of your emails? At Mailgun, we pride ourselves on our email analytics tools. Let’s look at how you can leverage data-driven metrics to improve your email campaigns with these actionable metrics:

  • Conversion rate: How many people convert into leads? The volume of your click rates can speak to conversions, and shed light on how effective your user segmentation and targeting is.

  • Average Order Value (AOV): What’s the average revenue per subscriber? Per campaign sent? The success of this metric depends largely on deliverability. Are you an ISP trusted sender? How high are your open rates?

  • Adds to Cart: Whether or not your user buys the item, do they even click through and add it to their cart? What does your link performance look like? Use timeline data to find out when users are accessing your links and use it to optimize your send time.

  • Return on Investment (ROI): This metric looks at the resources (time, energy, finances) that you’ve invested in your email marketing strategy and maps it with revenue from the campaign. Use campaign analytics to dissect each aspect of the user lifestyle and validate your investment.

2. Three data-proven attributes to segment your email list

Segmenting your mailing list is a great way to improve your email deliverability and dodge the spam filter. But what criteria should you use for segmentation?

This is where user data comes into play.

Where sensitive data is concerned, be sure you’re following industry data privacy and compliance standards. Here’s our downloadable guide to securing your email program.

A good practice is never to purchase user data. Instead, you can encourage subscribers to share their data with you by cross-pollinating with social media. For instance, you can have an Instagram campaign that encourages users to sign up for your mailing lists. You can also implement confirmation tools like double opt-in to ensure your users want to hear from you. This also increases your open rate.  

Need help getting started with segmentation? Here are three key metrics to watch:

  • Geography: Where are your users located? While geographic data can be harder to collect accurately if your subscriber uses a VPN to mask their location, geography encompasses more than just location. By learning the language your user prefers to communicate in, you can get a better idea of where your target audience is and what sort of products their community is  interested in. The simplest way to segment audiences is by country, region, population density, city size, and climate zone.

  • Demography: Who is your audience? Segment your email list based on demographic factors. For instance, what are the ages, income levels, genders, occupations, religions, or marital status of your users? Here, we’re diving knee-deep into personal information, so ensure you’re staying compliant with data privacy standards and only asking for information that is relevant

  • Behavior: Behavioral data is a  powerful way to segment your audience and is based on how your users interact with you. Group together subscribers who behave similarly, whether this means an equally low level of engagement, high engagement and high follow-through, or a middle level of engagement, and use this data to develop your engagement strategy

3. Five data-points to personalize your emails

“Dear User” just really doesn’t cut it in the subject lines these days. If your subscribers have signed up for your email service, chances are they’ve shared their first names. “Dear Taylor” is more likely to get a response than “Dear User.”

Here are five ways you can personalize emails:

  • Use your user’s first name in the greeting line. This is a simple enough task if you build an HTML template and insert variables based on subscriber data. This little addition can go a long way to making your user feel like you’re attempting to connect to them on a personal level.

  • Use your user’s location to help your team determine the type of items they recommend in their marketing emails. For instance, if a customer is in Bali, do you want to recommend the latest winter coats?

  • Use your user’s gender to add a touch of personalization. Let’s suppose your company sells surfwear for both men and women. You want to send women’s items to women and men’s items to men.

  • Use a personalized subject line. An inbox is a crowded place, and your subject line is your first chance to impress. Address your customer by name to add that personal touch and stand out from the masses.

  • Use a personalized Call to Action (CTA). Use targeted CTAs that are personal to your customers to entice them to click through to your website or mobile app. One strategy is to track buyer intent on your site and use triggers to help segment your mailing lists. If a user has only ever purchased electric guitars from your company, would you send them promotions for accordions?

4. Two benchmarks to measure your email marketing campaign’s performance

Email marketing benchmarks are pieces of marketing data that help you determine the success and health of your email marketing efforts. Two pieces of data you should be aware of include:

  1. Your brand’s benchmarks: These include the usual metrics such as Click-through Rate (CTR), Click-to-Open Rate (CTOR), conversion rate, opens, and unsubscribes, alongside any other metrics your brand tracks.

  2. Your industry’s email marketing benchmarks: These are the average benchmarks for your industry for the same metrics mentioned above. 

5. Two data points by which to optimize your send time

We’ve talked about the best time to send emails, so we’ll just give you the highlights on why send time optimization is so important.

  • You want to catch your audience at the right time, when they are most receptive to emails. If you send out an email when their workday comes to a close on Friday, chances are they’re rushing out the door to enjoy their weekend and will dismiss your message. 

  • It’s good to know if your customers browse your emails from laptops or mobile devices. Customer data points can help you know your audience and their email opening habits.

  • You also want to keep in mind your objective. If your product is work-related, send out your emails during the workweek. If your product is related to leisure time, outside of work hours might be better.

Check out Mailgun’s Send Time Optimization tool and take the guesswork out of send-time optimization.

How does Mailgun help me track my triggered email campaign?

Let’s put some of these tips into practice with Mailgun and learn how to personalize emails with user data to improve your email metrics. One thing to keep in mind; bulk email marketing campaigns with zero personalization have lower open rates, clicks, and higher complaints.

With more data-driven email solutions than ever before, you can take your data and create a triggered marketing campaign sequence. These sequences create highly personalized content for the recipient, making it more meaningful for them. Better content leads to higher engagement and triggered marketing campaigns are a great way to do that.

This practice requires a defined plan set in motion by behavior and contextual data collected from your customer channels.

The easiest way to explain a triggered email campaign is with an example. Let’s take an e-commerce platform, like a travel booking agency, and look at the amount of customer email touchpoints and opportunities that provide useful information to users:

  • Welcome email

  • Password reset email

  • Receipt email

  • Invoice email

  • Shipping notification email

These touchpoints are examples of information that is required for a large percentage of users on a recurring basis, and it makes sense to automate them with Transaction Emails

Transactional Emails integrate with your application and are sent based on triggers, or click actions the user performs. Once the triggers are in place, Mailgun tracks the email at each step of the process and provides detailed meta-data for events that occur, like metrics on email sends in real-time, and changes in your email lists while supporting A/B tests so you can ensure deliverability.

How can I use Mailgun’s email templates feature to make personalized triggered emails?

Mailgun provides a way for you to upload your HTML email templates to our platform with the Templates API. This feature gives you a lot of room to store and customize your HTML email templates, and supports templates using Handlebars v 3.0 as our template engine. These engines allow us to compile your templates into JavaScript functions for lightning fast execution.

Returning to our travel booking agency example, we can use the same behavioral data to create a Transaction Email for when a potential prospect signs up with an account but doesn’t make a purchase. You can recognize from elements they interacted with that they preferred two particular cities while browsing your website. With this data, you can create a targeted email that suggests these two cities as popular travel destinations.

To do this in Mailgun, first design or import a template to be sent to re-engage with the user. The example API request below will demonstrate some code that you can integrate into your application which will store a simple HTML template.

When this Transactional Email is triggered, the recipient will receive an email that features destination and travel details for their preferred two cities.. Pretty cool, right? This is just a simple example, but you can build sophisticated newsletters, re-engagement campaigns, and even welcome emails tailored to your user base. Get started with the Templates API here.

Wrapping up

With all its metrics and nuances, personalization is a daunting task to many senders, but it doesn’t have to be that way. If you take your data and plug and play with Mailgun’s transaction tools instead of spray and pray with your entire contact list, your email programs will stand out to the right people. Better emails mean better engagement, which keeps you out of the spam folder.

Did you want more tips like our Templates API example or data-driven campaign insights? Subscribe to our Newsletter so you never miss an update!

Keep me posted! Get our news and tips every week.

Send me the newsletter. I expressly agree to receive the newsletter and know that I can easily unsubscribe at any time.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Related readings

5 reasons transactional emails are unsung heroes of the customer experience

Some heroes have songs written about them. Folk heroes of the railroad like Casey Jones and John Henry get ballads. Princess Diana and Marilyn Monroe share an Elton John...

Read more

Email deliverability and the customer experience: What are the connections?

Whether it’s business or personal, relationships are built on trust. Good communication fosters that trust. For strong communication between your company and your customers...

Read more

8 types of transactional emails your platform needs

Transactional emails sometimes get a reputation for being boring when compared to carefully crafted marketing emails. And while that may be true to an extent, transactional...

Read more

Popular posts

Email inbox.

Build Laravel 10 email authentication with Mailgun and Digital Ocean

When it was first released, Laravel version 5.7 added a new capability to verify user’s emails. If you’ve ever run php artisan make:auth within a Laravel app you’ll know the...

Read more

Mailgun statistics.

Sending email using the Mailgun PHP API

It’s been a while since the Mailgun PHP SDK came around, and we’ve seen lots of changes: new functionalities, new integrations built on top, new API endpoints…yet the core of PHP...

Read more

Statistics on deliverability.

Here’s everything you need to know about DNS blocklists

The word “blocklist” can almost seem like something out of a movie – a little dramatic, silly, and a little unreal. Unfortunately, in the real world, blocklists are definitely something you...

Read more

See what you can accomplish with the world's best email delivery platform. It's easy to get started.Let's get sending
CTA icon