Wednesday, February 29, 2012

Rails A/B testing with Split on Heroku

I recently decided to start doing some A/B testing on The last time I tried A/B testing I used Google website optimizer, it worked fairly well but I did not like how difficult it was to setup a test. This time I looked around for A/B testing tools for rails. I ended up finding split and so far I have been very happy with the results. The documentation is fairly good but it did take a little fiddling to get it working on Heroku.

First off add the Redis to Go add-on in Heroku, the Nano plan is free and has been sufficient for my needs so far. Install redis on the dev server. I use a mac so that was as simple as "brew install redis" and then I followed the brew instructions for getting redis to start on login.

To install the split gem add the following to the Gemfile

 gem 'split', '0.3.3', :require => 'split/dashboard'

To set the development environment up in a way that is compatible to how Redis to Go is configured on Heroku add the following to config/environments/development.rb

ENV['REDISTOGO_URL'] = 'redis://localhost:6379'
Then create an initializer for redis in config/initializers/redis.rb and put the following in that file.
uri = URI.parse(ENV['REDISTOGO_URL'])
REDIS = =>, :port => uri.port, :password => uri.password, :username => uri.user)
To configure split to use the applications redis configuration create config/initializers/split.rb and add the following.
Split.redis = REDIS

To setup the split dashboard add the following to config/routes.rb

mount Split::Dashboard, :at => 'split'
To add authentication to the dashboard add the following to config/initializers/split.rb
Split::Dashboard.use Rack::Auth::Basic do |username, password|
  username == 'username' && password == 'password'

Setting up an A/B test is super easy just follow the instructions in the split README.


Note: These instructions are for rails 3.x, the listed resources do have instructions for earlier versions of rails.


Joel Kemp said...

Thanks for this! Very clean and concise.

Unknown said...

Thanks, always nice to hear when someone thinks one of my posts was useful.

Unknown said...

Nathan, thanks for your helpful post. One quick question, I hope you know the answer to: I noticed the css styling of the Split dashboard page is gone on Heroku. Have you encountered the same problem and if so, have you solved it?

Thanks, Pascal

Pierre Olivier Martel said...

Pascal, I think it has to do with the way Heroku compiles the assets on the Cedar stack. I tried to find a fix but finally resolved to copying the Split assets to the Public folder. Far from ideal but it works...

Phil Whelan said...

Hi Nathan,

Great post! I'm working on building a similar service, so woud be great to get your feedback and pick your brains. More info here


Aadita kumar said...

Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..

Android Training in Chennai

Jeffy said...

Thank you for sharing such a nice and interesting blog with us. Hope it might be much useful for us. keep on updating...!!
seo company in india
digital marketing company in india
seo company in chennai
digital marketing company in chennai

Ven hudson said...

Thanks for sharing the article. I would like to recommend that users should also try A/B testing Tool by MockingFish. It' a good tool and really helpful for all those who are searching for a good tools for there website.

for ict 99 said...

I have read your blog its very attractive and impressive. I like it your blog.

Digital Marketing Company in Chennai Digital Marketing Agency

SEO Company in India SEO Services in India

Digital Marketing Company in Chennai

smarther3 said...

This blog explains the details about changing the ways of doing that business. That is understand well and doing some different process. Provides he best output of others. Thanks for this blog.

Mobile App Development Company in India

reginald surict said...

Hey, I encourage you to read the following post to know how to catch a cheater.

ASO Services said...

Thanks a lot for sharing this with all of us, I like it and we can communicate. Do you need buy app ratings and reviews. To boost app ranking and double app downloads now.

Lauren Gottlieb said...

Thank you for such a well written article. It’s full of insightful information and entertaining descriptions. Your point of view is the best among many. seo services kc

hotmail said... email login inbox. For detail instructions– How to Create New Hotmail Account. Go to the official website of

Tanika Co Valda said...

Great Article
Final Year Project Domains for CSE
Project Centers in Chennai

JavaScript Training in Chennai
JavaScript Training in Chennai

SEO KILLER said...

“I really loved reading your blog. It was very well authored and easy to understand” China SEO Company

NOOR said...

Hey what a brilliant post I have come across and believe me I have been searching out for this similar kind of post for past a week and hardly came across this. Thank you very much and will look for more postings from you. Webmetrix Group Search Engine Optimization

SEO KILLER said...

SEO Internet marketing can help any company through their site to sell products SirLinksalot Search engine optimization is not easy, but with the right SEO tools, your website promotion task just got a lot easier

fortnite said...

This higher conversion rate is simply one more of the advantages of SEO services that can't be matched by any other form of marketing. review You can use keywords in your description that can also be used as tags.

Navin Prakash said...

Such a nice article thanks for sharing this with us. Really so impressible and interesting post. You’re doing a great job Man, Keep it up.
Excel Training in Chennai
Excel Course in Chennai
Tableau Training in Chennai
Linux Training in Chennai
Oracle Training in Chennai
Advanced Excel Training in Chennai
Graphic Design Courses in Chennai
Oracle DBA Training in Chennai
Pega Training in Chennai
corporate training in chennai
Power BI Training in Chennai
Excel Training in Anna Nagar

akshaya said...

This jot down is more responsible and resourceful.I could see the great effort taken by you to make the write-up more sensible. Web Designing Course Training in Chennai | Web Designing Course Training in annanagar | Web Designing Course Training in omr | Web Designing Course Training in porur | Web Designing Course Training in tambaram | Web Designing Course Training in velachery

Pankaj Singh said...

Thanks for this amazing blog, visit Ogen Infosystem for creative web design and development services at an affordable price.
Best Website Designing Company in Delhi

Nora Pittman said...

Crypto-currency as a modern form of the digital asset has received a worldwide acclaim for easy and faster financial transactions and its awareness among people have allowed them to take more interest in the field thus opening up new and advanced ways of making payments. Referral Code with the growing demand of this global phenomenon more,new traders and business owners are now willing to invest in this currency platform despite its fluctuating prices however it is quite difficult to choose the best one when the market is full. In the list of crypto-currencies bit-coins is one of the oldest and more popular Referral Code for the last few years. It is basically used for trading goods and services and has become the part of the so-called computerized block-chain system allowing anyone to use it thus increasing the craze among the public, Referral Code.

Common people who are willing to purchase BTC can use an online wallet system for buying them safely in exchange of cash or credit cards and in a comfortable way from the thousands of BTC foundations around the world and keep them as assets for the future. Due to its popularity, many corporate investors are now accepting them as cross-border payments and the rise is unstoppable. With the advent of the internet and mobile devices,information gathering has become quite easy as a result the BTC financial transactions are accessible and its price is set in accordance with people’s choice and preferences thus leading to a profitable investment with Referral Code. Recent surveys have also proved that instability is good for BTC exchange as if there is instability and political unrest in the country due to which banks suffer then investing in BTC can surely be a better option. Again bit-coin transaction fees are pretty cheaper and a more convenient technology for making contracts thus attracting the crowd. The BTC can also be converted into different fiat currencies and is used for trading of securities, for land titles, document stamping, public rewards and vice versa.

Another advanced block-chain project is Ethereumor the ETH which has served much more than just a digital form of crypto-currency Referral Code and its popularity in the last few decades have allowed billions of people to hold wallets for them. With the ease of the online world,the ETH have allowed the retailers and business organizations to accept them for trading purposes, therefore, can serve as the future of the financial system.

Unknown said...

Water bodies are the main source of transportation for international freight forwarding. Due to this, sea freight company in Delhi,
Freight Forwarder in Vietnam
Shipping Company In India

Unknown said...

visit here
iso certification in delhi
iso certification in noida
iso certification in gurgaon
iso certification in faridabad

raju said...

Email is a personal way of making contact to your prospects. And since it is a private message, trust and connection are built already. purchase email lists The conversion rate is also higher compared to mainstream media due to low operational and overhead costs. On top of that, email is easier to monitor and evaluate than printed materials. Through email marketing, you can jumpstart your b2b lead generation regardless of what type of industry you are in. The first step to buy email list for marketing is choosing the right email list provider. You need to buy email list to get ahold of the valuable information of your would-be clients for your brand. In this way, it will be easier for you to search for businesses, find contact persons and decision makers and go about your product and services.

freya maya said...

Internet Download Manager Crack ed Download
If you cannot afford to purchase the Internet Download Manager sequential number in the (moment), then it is possible to readily download the online download manager crack version. Don't stress IDM Crack can also be full edition, you may down load the deciphered IDM from the URL given below or you need to utilize IDM serial number to register the online downloadmanager.
Once we know, there are many IDM busted models are available and also the Internet download manager limitation is also available. Still, if you are a person who can readily afford the applications, then you must purchase the applications as it ailing help the programmers to pay for their bills also to spend the money generated by sales of the Internet download manager or even IDM crack full variant in making the software easier and much more useful because new features also cost the company in execution and research. You can purchase the original IDM full variant through their official site.

Huongkv said...

Đại lý Aivivu chuyên cung cấp vé máy bay, tham khảo

vé máy bay tết Vietjet

vé máy bay đi Mỹ hạng thương gia

vé máy bay đi Pháp khứ hồi

vé máy bay từ đà nẵng đi hàn quốc

vé máy bay đi nhật bản khứ hồi

giá vé máy bay đi Anh quốc

vé máy bay giá rẻ khứ hồi

how to rank your website or youtube channel (basic) said...

AirBNB management services in Dubai is a DTCM licensed holiday home Operator managing vacation rental villas and apartments for short and mid term stay in Dubai.

raju said...

Friendly Finance is South Africa's number 1 choice for finance - providing customers with all the information they need to make better financial decisions. FriendlyFinance We provide hundreds of comparisons of common consumer finance products, such as personal loans, car loans, short-term loans and credit cards. Think of us as a helping hand in selecting consumer finance products.

raju said...

Testimonial Review of Taskade, Taskade Ratings the all-in-one collaboration platform for remote teams. Unleash your team productivity with task lists, mindmaps, and video chat.

raju said...

Testimonial Review of Taskade, Taskade Ratings the all-in-one collaboration platform for remote teams. Unleash your team productivity with task lists, mindmaps, and video chat.

raju said...

Testimonial Review of Taskade, Taskade Ratings the all-in-one collaboration platform for remote teams. Unleash your team productivity with task lists, mindmaps, and video chat.

Nora Pittman said...

Recently, the keto diet has become extremely popular for its health benefits such as weight loss and preventing disease. A custom Keto plan for life! Visit here: custom meal plan

Nora Pittman said...

Indianapolis Roadside and Tow company that provides quality service to our customers. Visit: Fuel Delivery

Huongkv said...

Aivvu chuyên vé máy bay, tham khảo

Ve may bay di My

vé máy bay tết giá rẻ

giá vé máy bay đi toronto Canada

kinh nghiệm mua vé máy bay giá rẻ đi Pháp

vé máy bay đi Anh giá rẻ

cách săn vé máy bay giá rẻ

combo du lịch đà nẵng

combo hà nội nha trang

Unknown said...

Find the perfect handmade gift, sana sana rana vintage & on-trend clothes, unique jewelry, and more… lots more.

freya maya said...

Health Experts have proven that regular exercise coupled with a good diet allow you to live longer and healthier. In this busy day and age, not everyone has the time to go to the gym - resulting to a lot of overweight people that desperately need to exercise. A healthy alternative is for you to Buy Home Gym Equipments that you can store in your own home or even at your office. Here are some tips when buying home gym equipment.

First, know your fitness goals and keep these goals in mind when you are buying home gym equipment. One of the biggest mistakes that people make is buying the biggest or trendiest fitness machine simply because they like how it looks. More often than not, these end up gathering dust in your storage rooms or garage because you never end up using them. It is important to take note of what particular type of physical activity you want or enjoy doing before you buy your exercise machine. If you are looking to loose a few pounds and you enjoy walking or hiking, a treadmill is the best option for you. If you are looking to tone your lower body while burning calories a stationary bike is your obvious choice. Similarly, Special Equipments for Core Strength Exercises, Strength Training Weight Vests, Core Strength & Abdominal Trainers, Home Cardio Training, Strength Training Power Cages, Strength Training Racks & More.

Second, set aside a budget before Buying Home Gym Equipments. Quality exercise machines do not come cheap. They are constantly exposed to wear and tear when they are used properly. So, pick machines that are built to last and have passed quality certifications to get the most out of your money. If you are operating on a tight budget, think about investing in several weights, We can Provide you High Quality Home Gym Equipments at Very Low Prices for your Complete Uses: Core Strength Exercises, Strength Training Weight Vests, Core Strength & Abdominal Trainers, Home Cardio Training, Strength Training Power Cages, Strength Training Racks & More.

Its the Right Time to Buy Home Gym Equipments for you at Very Low Prices.

freya maya said... Artificial Grass Lab contains guides that enable you to choose, install and maintain synthetic turf products both in indoor and outdoor environment.

Unknown said...

- Como organizar sua Semana com o Taskade - Segunda Feira, primeiro dia.
- Como organizar sua semana com o Taskade - Terça - Vlog de Produtividade
Como organizar sua semana com o Taskade - Quarta
- Como organizar sua semana com o Taskade - Quinta - Vlog Produtividade.
- Taskade - Sexta, Sábado e Domingo. Como foi e uma grande novidade

Unknown said...

Crystal online pharmacy is a trusted online drug store with a wide range of products to suit the needs of our clients. Crystal Pharmacy do strive to offer the best service and ship products world wide. All the products listed on our website are Ava in stock. Buy Levitra or Vardenafil online Expect your order to be processed Immediately when you send us your request. We deal with varieties of drugs for our customers satisfaction. We cross barriers with our products and struggle hard to meet human satisfaction. When shopping with us, Be safe and secured and you will realize how swift we are with our services.

Unknown said...

Archie 420 Dispensary is a trusted Cannabis dispensary base in Los Angeles California USA. It is one of the top dispensary in this part of the country. Original Glue weed online They do deliver Marijuana in the USA and to over 25 countries in the world. You can always visit their dispensary in Los Angeles using the address on their website. Place your order and get served by the best dispensary in the planet. Have fun.

jhansi said...

Tally Solutions Pvt. Ltd., is an Indian multinational company that provides enterprise resource planning software. It is headquartered in Bengaluru, Karnataka India.
tally training in chennai

hadoop training in chennai

sap training in chennai

oracle training in chennai

angular js training in chennai

fuel digital vignesh said...

This is very good post I have read and I must appreciate you to have written this for us.Its really informative.
Best Digital Marketing Agency in Chennai
website design in chennai

fuel digital vignesh said...

This is very good post I have read and I must appreciate you to have written this for us.Its really informative.
Best Digital Marketing Agency in Chennai
website design in chennai

Unknown said...

ac repair and services in nizampet Extend the Lifespan of Your System with Proper Maintenance Like all machines, air conditioners benefit from regular maintenance; we know that for a fact.

Unknown said...

ac repair and services in bachupally Extend the Lifespan of Your System with Proper Maintenance Like all machines, air conditioners benefit from regular maintenance; we know that for a fact.