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

 

image

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…

Vero app workflow

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.

 

comments powered by Disqus

Mailgun Get posts by email

Like what you're reading? Get these posts delivered to your inbox.

No spam, ever.