fellow.

by Jarrod Drysdale

Design is a skill anyone can learn

More about this blog

Netflix-style one-click email survey using basic JavaScript and Mixpanel.

I’ve been searching for a way to (without more effort than warranted) construct a poll like Netflix does in their fantastic emails. If you aren’t familiar, the emails include an invitation to rate a movie or its picture quality. All you have to do is click one of the stars or links. Then your browser opens and says “Thanks for voting.” It’s so simple and painless that I respond every time I get one of these emails.

Email poll response rates vary considerably, but the average is incredibly low. Some get less than 1% response, while rare standouts boast ridiculous rates like 85%. Obviously, this metric will vary considerably with the quality of the email list, the email itself, and similar factors. So, getting your heart set upon a specific percentage is a pipe dream—for the first poll, you have no idea how your audience will respond.

In my case, this one-click poll technique earned an 18.4% response rate (184 of 999 recipients). While I don’t yet have any data for a sufficient comparison, I am very very happy with this. I was expecting under 5%.

Here’s what the email looked like:

Click to see full size.

Those who clicked landed on a simple html page with no styles that records the vote with JavaScript:

And on my end, I see the results in a Mixpanel pie chart in real time:

Click to see full size, uncropped screenshot.

Building the Poll

Rigging this was remarkably simple once I found the right tools. Most analytics platforms I tried don’t provide enough flexibility in creating custom reports for custom events. With Mixpanel, I just track a vote event in my code, and then sign into the app, find the event, and stick it into a chart (which I can then bookmark). Easy and painless.

(Disclaimer: I am in no way compensated for promoting or mentioning Mixpanel, and I only use their free account at the moment. I found their service to be exceptionally useful for this purpose but can’t speak to any others.)

The JavaScript is very simple. I’m using jQuery and a cookie plugin. There’s probably a more elegant way to do this, even without using a library, but here’s my code:


// Function to grab the vote value from a query string
// Source: http://stackoverflow.com/a/2480180
$.urlParam = function(name){
	var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
	if (!results) { return 0; }
	return results[1] || 0;
}
$(document).ready(function(){
	this.pollName = "20120726_test";

	//grab vote value from query string
	this.vote = $.urlParam('vote');

	if(this.vote != 0 && this.vote != undefined){

		//If there is a cookie, inform the user they’ve already voted.
		if( $.cookie((this.pollName + '_voted')) == 'true' ){
			$('#status').html("Thanks, but you already voted!")

		//If there’s no cookie saved, set a cookie and track the vote in Mixpanel.
		}else{
			mixpanel.track(
				"vote",
				{
					"pollDate": this.pollName,
					"value": this.vote
				}
			);
			$.cookie( (this.pollName + '_voted'), 'true');
		}
	}
});

You can view a live sample of this html page here.

If I do another poll, I’ll stick this html file in a new directory and use a new pollDate. That way the cookie and data points are separate.

(If you have a suggestion on how to improve this code, leave a comment and I’ll update the post and credit you.)

If you’re considering an email poll that only has one data point, this is a great technique to try. It’s not ideal if you need more in-depth data. But, for simple voting, the barrier to entry is incredibly low. You’re only asking for one click from the user.

The Results

The purpose of this poll was to get a basic idea of what my existing customers need now that they’ve read my design ebook. The obvious factor I left out of the poll is the possibility they need nothing. In hindsight, I wish I’d included that as an option.

The screencast and toolkit concepts were neck-and-neck for most of the voting, but the screencast has since pulled ahead. However, merely building the concept with the most votes would be a mistake. This data tells me much more than just which project idea is most popular. The voting pattern tells me about readers’ confidence in their own design ability.

The three most popular choices are all projects that would assist readers with building their confidence and not their skill or knowledge: screencast, toolkit, and workbook. This reinforces what I’ve learned from many personal emails from readers.

This result is fantastic. It means, in my readers’ minds, the ebook was successful in teaching the design fundamentals. It’s also proof they’re ready for the next step in their design learning.

I still have much more research to do, including asking for individual feedback on more detailed concepts, but this is a great start.

If you want to be involved with that process, or have suggestions or needs to share, send me an email.

Get more articles in your inbox

Sign up for the Bootstrapping Design email newsletter.
No spam. Ever! Unsubscribe anytime.

Check your email!

Thanks. Make sure to click the link you receive via email, or you won't receive any newsletters!

I also make products for people learning design, especially coders:

Become the designer your startup needs

Bootstrapping Design is an ebook about design fundamentals
self-published & over 1800 copies sold

Stop wrestling themes and get a real design

Cascade.io is a design framework for startups & coders

Comments

  1. Kulawat says:

    This is nice! Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>