This document analyzes Warby Parker's marketing funnels using SQL to calculate conversion rates. It summarizes the results of analyzing Warby Parker's style quiz and home try-on feature funnel. Key findings include that giving customers more home try-on options (5 pairs vs 3 pairs) increased purchase rates and focusing on getting more people through the full funnel could increase overall purchases.
2. 1. Project Overview
In this project, I analyzed different Warby Parker’s marketing funnels (a style quiz and home try-on feature) in order to
calculate conversion rates between each step leading to a purchase. The project was created through a collaboration
between Codecademy and Warby Parker’s Data Science team.
● The Style Quiz has five questions and nearly 2000 responses, all which are stored in a table called survey
● Below is the database schema used in this project
survey quiz home_try_on purchase
question - TEXT user_id -TEXT user_id - TEXT user_id - TEXT
user_id - TEXT style - TEXT number_of_pairs - TEXT product_id - INTEGER
response - TEXT fit - TEXT address - TEXT style - TEXT
shape - TEXT model_name - TEXT
color - TEXT color - TEXT
price - INTEGER
3. 2.1 Quiz Funnel
SELECT question,
COUNT(DISTINCT user_id) AS ‘count’
FROM survey
GROUP BY question;
To create the quiz funnel in SQL, I used GROUP BY to sort the data into
each of the five questions.
● Users will “give up” at different points in the survey, which I
highlighted with the COUNT function
● I also included the percent_completion column to convert these
numbers into percentage
question count percent_completion
1. What are you looking for? 500 100%
2. What's your fit? 475 95%
3. Which shapes do you like? 380 76%
4. Which colors do you like? 361 72.2%
5. When was your last eye exam? 270 54%
4. 2.2 Home Try-On Funnel
SELECT DISTINCT q.user_id,
h.user_id IS NOT NULL AS 'is_home_try_on’,
h.number_of_pairs,
p.user_id IS NOT NULL AS 'is_purchase'
FROM quiz q
LEFT JOIN home_try_on h
ON q.user_id = h.user_id
LEFT JOIN purchase p
ON q.user_id = p.user_id
LIMIT 5;
WITH funnel AS(
SELECT DISTINCT q.user_id,
h.user_id IS NOT NULL AS 'is_home_try_on’,
h.number_of_pairs,
p.user_id IS NOT NULL AS 'is_purchase’
FROM quiz q
LEFT JOIN home_try_on h
ON q.user_id = h.user_id
LEFT JOIN purchase p
ON q.user_id = p.user_id)
Warby Parker’s purchase funnel is:
Take the Style Quiz → Home Try-On → Purchase Pair of Glasses
● To research the methodology of WP’s user experience, I will
conduct an A/B test (two-sample hypothesis test) where 50% of
users will get 3 pairs to try on and 50% will get 5 pairs to try on
● I used a LEFT JOIN to combine the three tables, and then put it
into a with statement to perform calculations in the next steps
user_id is_home_try_on number_of_pairs is_purchase
4e8118dc… 1 3 pairs 0
291f1cca-e50… 1 3 pairs 1
75122300… 0 NULL 0
75bc6ebd… 1 5 pairs 0
ce965c4d… 1 3 pairs 1
5. 3. Analysis
Following the with statement that created funnel, I used the two
statements to return:
1) The conversion rates between quiz → home_try_on and
home_try_on → purchase
2) The difference in purchase rates between customers who had 3
pairs VS 5 pairs
quiz_to_try_on try_on_to_purchase
75.0 66.0
SELECT (100.0 *
SUM(is_home_try_on)
/ COUNT(user_id)) AS
'quiz_to_try_on',
(100.0 *
SUM(is_purchase) /
SUM(is_home_try_on))
AS
'try_on_to_purchase'
FROM funnel;
SELECT number_of_pairs,
SUM(is_home_try_on) AS
'num_try_on',
SUM(is_purchase) AS
'num_purchased',
ROUND((100.0 * SUM(is_purchase) /
COUNT(number_of_pairs)), 2) AS
'%_try_on_to_purchase'
FROM funnel
GROUP BY 1
HAVING number_of_pairs IS NOT NULL;
number_of
_pairs
num_try_on
num_purcha
sed
%_try_on_to
_purchase
3 pairs 379 201 53.03
5 pairs 371 294 79.25
6. 4. Actionable Insights
SELECT product_id, COUNT(*), model_name,
color, price
FROM purchase
GROUP BY product_id
ORDER BY COUNT(*) DESC
LIMIT 5;
To help WP better advertise their products based on purchasing trends:
● I incorporated this piece of code below to return the most popular (top-selling) pairs of glasses
● The analysis from the previous slide also shows that people are more likely to make a purchase if they were given more
variety (5 pairs rather than 3 pairs)
● WP should focus on increasing the number of people who try on glasses at home (whether by increasing efficiency and
ease from the quiz to try on, or by attracting more people to take the Style Quiz) and their purchase rate will follow
product_id COUNT(*)
model_nam
e
color price
3 63 Dawes Driftwood Fade 150
10 62
Eugene
Narrow
Rosewood
Tortoise
95
9 54
Eugene
Narrow
Rose Crystal 95
1 52 Brady
Layered
Tortoise Matte
95
6 50 Olive
Pearled
Tortoise
95