Calculating conversion rate
In this exercise, you will practice calculating conversion rate, which is often the first metric you'll want to calculate when evaluating how a marketing campaign performed.
On marketing teams, conversion rate is typically the most important metric. It is one of the best ways to determine how effective a marketing team was at gaining new customers.
As a reminder, conversion rate is the percentage of the users who saw our marketing assets and subsequently became subscribers.
The formula for conversion rate is:
$$ \frac{\text{Number of people who convert}}{\text{Total number of people who we market to}} $$
Este exercício faz parte do curso
Analyzing Marketing Campaigns with pandas
Instruções do exercício
- Calculate the number of unique
user_id
s inmarketing
DataFrame. - Calculate the number of people who subscribed using the
converted
column. - Calculate the conversion rate.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Calculate the number of people we marketed to
total = ____
# Calculate the number of people who subscribed
subscribers = marketing[____]['user_id'].____
# Calculate the conversion rate
conversion_rate = ____
print(round(conversion_rate*100, 2), "%")