web analytics
Contact me 
Orange D inside a circle

Customer.io service and how to use it from Ruby

2014-11-13 01:05

Customer.io is a SaaS which enables you to easily manage all the emails you send to your users.

What is Customer.io?

customer.io is a SaaS which enables you to easily manage all the emails you send to your users: from your newsletters to transactionnal and behavioral emails.

The concept is simple: you send to customer.io data about your users, it creates a custom userbase, on your customer.io dashboard, which you can segment in order to send the good emails to the good users at the good time.

You can, for examples, decide to automatically send a welcome email to all new users, to send a reminder email for users who registered but didn't come back after 2 weeks or simply send a newsletter to specific users. We often hear that emails are dead (with mobile notification, social networks inbox etc...) but we can doubt it, emails are here to stay. Emailing is one of the most important communication channel to reach people. The startup fulfills the need of email management with a more “personalized/CRM" approach than classical emailing tools.

How to use it from Rails?

The first way is using the Javascript Snippet. This is the easiest way to start sending data to Customer.io. You copy and paste your Customer.io tracking code in to the footer of your website. Then you identify logged in users and any important information about them. You'll then be able to email everyone who logs in to the website.

The other way is using a client library or a gem in Ruby case. At VAIRIX we use Customerio gem as a client for the Customer.io event API. To install it just add gem 'customerio' and execute bundle. Then you can identify your customers when they sign up for your app and any time their key information changes. This keeps Customer.io up to date with your customer information.

customerio.identify(
 :id => 5,
 :email => "bob@example.com",
 :created_at => customer.created_at.to_i,
 :first_name => "Bob",
 :plan => "basic"
)

Also, you can track custom events from your users allowing to more specifically target your users with automated emails.

customerio.track(5, "purchase", :type => "socks", :price => "13.99")

That said customer.io is a great SaaS with a well conceived product and which offer a lot of value when you start a website/app. You should definitively try it.

Acknowledgments

This post was written for Vairix Software Development, so I want say thanks to them for let me share this with you in my homepage.


Significant Revisions

Nov 13, 2014: Original Publication on dariomac.com

Dic 10, 2014: Original Publication on dariomac.com