Analyzing House ads conversion rate
Now that you have confirmed that house ads conversion has been down since January 11, you will try to identify potential causes for the decrease.
As a data scientist supporting a marketing team, you will run into fluctuating metrics all the time. It's vital to identify if the fluctuations are due to expected shifts in user behavior (i.e., differences across the day of the week) versus a larger problem in technical implementation or marketing strategy.
In this exercise, we will begin by checking whether users are more likely to convert on weekends compared with weekdays and determine if that could be the cause for the changing house ads conversion rate.
This exercise is part of the course
Analyzing Marketing Campaigns with pandas
Exercise instructions
- Add a day of week column to the
marketing
DataFrame usingdt.dayofweek
based on the'date_served'
column. - Use
conversion_rate
to calculate conversion by the day of week and marketing channel and store the results inDoW_conversion
. - Create a line plot of the results, set the y-axis to begin at
0
and display the plot.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Add day of week column to marketing
marketing['DoW_served'] = ____
# Calculate conversion rate by day of week
DoW_conversion = conversion_rate(____, ['____', '____'])
# Unstack channels
DoW_df = pd.DataFrame(DoW_conversion.unstack(level=1))
# Plot conversion rate by day of week
DoW_df____
plt.title('Conversion rate by day of week\n')
____
____