Case Studies

How Ruby-based Vero uses Mailgun’s Campaign Analytics API to deliver and track personalized and scalable marketing campaigns

This post is written by Chris Hexton (@chexton), one of the co-founders of Vero. Vero is part of a small group of forward-thinking email remarketing companies that are killing the idea of sending one newsletter to one-thousand people in favor of sending one personalized newsletter to each individual customer. All this is done with massive amounts of data that they put right in the hands of their customers, making sending targeted, personalized email campaigns easy and highly effective.

I’m Chris, one of the co-founders of Vero. We’re an email remarketing company: we make it easy for online businesses to track exactly what their customers do and turn these behaviors into emails that drive real conversions. You might say that we relate analytics to emails. We tie it all together and help marketers test hypotheses quickly and effectively.

Our focus is on building a product that is easy for marketers to use giving them a lot of flexibility in what is a complex arena. That means the more time we can spend on our UI, UX and analytics the better our product will be. Working with Mailgun has really allowed us to manage a lot of the pain that comes with building a company built around email.

Benefits of using Mailgun for email automation

The two things that Mailgun helps us not worry about are email delivery and tracking.

These are difficult topics. Worrying about maintaining a mail server, tweaking configuration, monitoring and swapping IP addresses, tracking opens and clicks with a URL store, holding all of this information and splitting up the resulting reports are all extremely onerous tasks.

Mailgun does them with style ;). To demonstrate how we use Mailgun, look at what happens whenever an event hits the Vero API…

The Vero workflow

As soon as a call is made to our ‘track’ API the following events take place.

Note that this happens thousands of times per second.

Maintaining an API that can handle this sort of traffic and a system that can process the necessary filters, rules and personalizations is where we specialize and why we work with Mailgun to take away as much of the email infrastructure pain as possible.

Take a look at the diagram. After much internal processing on our end we arrive at steps six and seven. This is where Mailgun takes over for a short while.

Thanks to Mailgun’s fantastic API and feature set, both of these steps boil down to a mere few lines of code within our application.

In step six, after an email has been selected and rendered by our engine it is passed to Mailgun using a simple method:

def send_email_production company = Company.find(company_id) email_provider = company.email_provider_or_default_provider email_provider.send_email(email) end

EmailProvider is essentially our own wrapper around Mailgun’s API. Nothing fancy there – we just break out the various calls (create campaign, send email, etc.) into their own methods: Mailgun does the real legwork.

When it comes to tracking in step seven, we use Mailgun’s Campaign Analytics API to collect the open, click and unsubscribe statistics for each variation of a campaign.

When we first go to collect the results of an individual campaign it’s another simple call to a wrapper class:

def stats(variation) adapter.stats(company, variation) end

This method, via the Mailgun API, returns an array of the delivery, open, click and unsubscribe statistics that we can then store and display.

This saves us an immense amount of work inserting tracking pixels, replacing URLs, correlating links to variations and persisting all of this data.

The Mailgun team

Mailgun has been a great partner as they’ve allowed us to scale quickly and easily with our growing customer base.

Their intuitive admin interface and API lets us offer our own customers premium access to their own subdomains, IP addresses (if required) and full DKIM signing to guarantee high rates of deliverability.

They do all of this with a smile and at lightening speed. At Vero we believe that customer support *is* sales. It’s one of the best ways a company can create a feedback loop, deliver value, put a smile on customers’ faces and build buzz. It’s clear Mailgun believes the same.

Last time I submitted a query on their support page I got a response from Taylor (one of the founders) in literally two minutes.

Two minutes.

That’s an incredible response time. As Ev (the other founder) once said to me: We’re the kings of email…do you expect us to respond slowly?

Going forward

We’re excited to continue to build on top of Mailgun and it’s great to know we’re working with a partner who shares our passion for the space as well as our dedication to getting things right.

Without Mailgun we’d spend a lot of sleepless nights!

Thanks to Ev, Taylor and the new team at Rackspace – we’re super keen to see what innovations Mailgun roll out next.

“We’re able to ensure a better service for our marketers by using Mailgun. They count on us, and we count on Mailgun: and this relationship helps us maintain credibility with our customers.”

Paulius Milisauskas

Paulius Milisauskas

VP of Customer Operations

Related resources

Header Image - Email validation What is it

Email validation: What is it?

Email validation... what is it? One of our Technical Account Managers goes into detail about...

Read more

QRM Case Study Article Image

Sending millions of job alerts 24/7 with the Mailgun Email API

Transactional marketing emails are an important part of everyday business, and when done correctly they can even bring people closer to...

Read more

Email's Not Dead banner

S5 Ep. 01: The current state of email deliverability in 2023 with Alison Gootee of Braze

Email’s Not Dead is back and the first person we wanted to talk to is Alison Gootee because she’s one of the funniest people we’ve ever met. We chatted about the previously released state of email deliverability report, why we want our senders to use best...

Read more

Email icon

Get our news and tips every week

Keep me posted! 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.

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