• Email DIY

Using Data to Build Better Triggered Email Campaigns

Nolan Iriarte
5 min read
featured

Most people prefer to section off transactional and marketing emails from each other, and it’s easy to understand why. When it comes to things like your domain and IP reputation, it’s important to keep your transactional messages separate from your marketing messages. 

However, in the growing world of email automation, the lines are starting to blur and data from transactional emails gets lost in translation to marketing. Transactional data should coalesce seamlessly into targeting your marketing audience.

Data has brought us a long way

Data collection has become an abundance with the multiplex of media channels potential prospects or customers connect with to interface with a business. Our personal favorite channel (no surprise) is email. Maybe more surprisingly, email tracking for transactional and marketing emails is one of the blind spots that companies still haven’t incorporated. It’s one of the many solutions customers come to Mailgun to solve.

It’s all email, am I right?

But let’s take a step back. Way back in the day (read: a couple of years ago) bulk marketing emails were still cutting it as far as conversions for most businesses. 

Times change

Today, you can’t send email like you did back in the early 2000s with email bursts left and right. Bulk marketing emails with zero personalization have fewer open rates, clicks, and higher complaints. They’re boring, and nobody is going to click on a boring, blanket marketing push. If you can’t change with the times, you’ll get left behind in the spam folder.

Email automation has come a long way. Nowadays, you can use companies like Customer.io to pull different data metrics to create highly personalized triggered email campaigns. 

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 more engagements, and triggered marketing campaigns are a great way to do that. 

How do you do that? 

To start, it requires a defined plan that is set in motion by behavior and contextual data collected from your customer channels. Email marketing automation services such as Customer.io and Iterable are powerful platforms and enabling designing decision-based or sequenced emails through a CRM. 

The easiest way to explain a triggered email campaign, to us at least, is with an example. Let’s take an e-commerce platform (travel booking agency) and the amount of customer email touchpoints and opportunities to have insight into a particular recipient:

  • Welcome Email

  • Password Reset Email

  • Receipt Email

  • Invoice Email

  • Shipping Notification Email

With these recipient triggered emails, Mailgun tracks the email each step of the process and provides detailed meta-data for events that occur. Insights from analytics and meta-data ensue a method for customers to structure client base segmentation. 

Bringing it together with Handlebars and Email Templates  

One of the benefits of being a more developer-focused platform is that our email templates feature gives you a lot of room to store and play. One way of doing this, especially in the case of making personalized triggered emails, is by supporting Handlebars v 3.0 and Go-lang as our template engines. With these template engines, we can create a more robust email marketing messages without too much legwork. 

Continuing with our travel booking agency example, let's imagine a scenario in which a potential prospect signed-up with an account but has not made a purchase. We recognized from behavioral data they interacted with two particular cities while browsing our websites. With this data, we can create an email that suggests these two cities as popular travel destinations.

Our initial step is to prepare a template to be sent to re-engage with the customer. The example API request will demonstrate storing a simple HTML example including Handlebars expressions with Mailgun’s Templating feature.

1import requests
2
3def send_template_message():
4 r = requests.post(
5 "https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages",
6 auth=("api", api_key),
7 data={"from": "Excited User <mailgun@YOUR_DOMAIN_NAME>",
8 "to": "yourrecipient@domain.com",
9 "subject": "Hello",
10 "template": "vacation_template",
11 "o:tracking": "yes",
12 "h:X-Mailgun-Variables": '{"place": [{ "city": "Tokyo", "url": "https://www.mailgun.com"}, { "city": "San Francisco", "url": "https://www.mailgun.com"}]}'})
13 print r.json()
14 return
15
16send_template_message()
17

From there, the recipient will receive an email that has those two cities as places they could travel. Pretty cool, right? This is just a simple example, but you can build sophisticated newsletters, re-engagement campaigns, and even welcome emails that are tailored to your recipient.

Data + Handlebars + email templates = great emails

Personalization at first glance 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 Handlebars, your email templates will stand out against blanket email bursts. Better emails make for better engagement, and that keeps you out of the spam folder.

Should you ever run into trouble with our templates and handlebars, feel free to reach out.

DELIVERABILITY SERVICES

Learn about our Deliverability Services

Looking to send a high volume of emails? Our email experts can supercharge your email performance. See how we've helped companies like Lyft, Shopify, Github increase their email delivery rates to an average of 97%.

Learn More

Last updated on August 28, 2020

  • Related posts
  • Recent posts
  • Top posts
View all

Always be in the know and grab free email resources!

No spam, ever. Only musings and writings from the Mailgun team.

By sending this form, I agree that Mailgun may contact me and process my data in accordance with its Privacy Policy.

sign up
It's easy to get started. And it's free.
See what you can accomplish with the world's best email delivery platform.
Sign up for Free