Aan de slagGa gratis aan de slag

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}} $$

Deze oefening maakt deel uit van de cursus

Analyzing Marketing Campaigns with pandas

Cursus bekijken

Oefeninstructies

  • Calculate the number of unique user_ids in marketing DataFrame.
  • Calculate the number of people who subscribed using the converted column.
  • Calculate the conversion rate.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# 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), "%")
Code bewerken en uitvoeren