top of page

A Deep Dive into Our Latest Marketing Channel Campaign with Python

Writer's picture: Asmita PradhanAsmita Pradhan

Embarking on the analysis of a marketing campaign for a multilingual channel this analytical endeavor seeks to elucidate the underlying dynamics of audience behavior across different linguistic and age demographics, employing rigorous methodologies for systematic exploration of conversion rates, retention rates, and other key performance indicators using Python libraries such as Pandas, Matplotlib and NumPy.

Utilizing Pandas' data manipulation capabilities, we partition the dataset based on language displayed and age group, enabling a granular examination of user interactions. Through quantitative analysis, we aim to discern significant trends and correlations, shedding light on the efficacy of the campaign across various audience segments.

Our approach entails a methodical assessment of conversion and retention rates, employing inferential statistical techniques to validate findings and draw meaningful insights. By dissecting the data with precision and rigor, we endeavor to uncover actionable intelligence that informs strategic decision-making and drives optimization efforts.

The questions we have tried to answer are how did the marketing campaign perform? how different marketing channels are performing? When a email is sent how many new users subscribe? Is there a preference for a certain language for users to subscribe? Given current conversion rates should business continue investing in this channel? and many more. We start with importing libraries like pandas, matplotlib, NumPy as they make data analysis and transformation in Python much easier. The first step is to import the dataset using the read_csv() method

Followed by exploring the data by calling the first few rows to examine the contents using the .head() method along with .describe(), missing values can be found by using .info() and .shape() gives the number of rows and columns present in the dataset and .dtypes() shows the data types of the columns.


Changing data type using .astype() is a column is a common practice performed to make sure the columns have the right data types. If that is not the case then are in the data types need to be changed

New columns can be created from the existing dataset using the NumPy library's .where() function to create columns that can help create deeper insights

Another important transformation lies in the date column where to be able to plot time series plots the date has to be converted into the datetime format.

After the initial transformation and assessment we begin exploratory analysis to answer our questions like How many users saw the marketing campaign on a given day? using groupby() method to aggregate the unique users based on date served as below.

Getting the aggregate numbers works but visualization helps interpret results instantly and easily. By plotting the date it is easy to notice fluctuations in the metrics as compared to the numbers. We see that most of the month the average users are around 300 but the month saw a huge spike around the middle of the the month which may be due a big marketing email push which resulted in highest daily users that saw the ads. This can be considered for the next promotion to get maximum new users.

A big question is Was the marketing campaign successful? depending on the business success it means the business gained new subscribers and also retained existing users. This can be analyzed by calculating total number of new customers who converted to users to get the conversion rate and retention rate can be calculated finding precent of users who remain subscribed after a certain period of time.

With 13.89% conversion rate and 66.8% retention rate it warrants further analysis to identify what influenced both the metrices.

One of the method used to further analyze the conversion and retention rates is by segmenting the customers by subscribing channel by sub-setting subscribing channel and calculation retention rate as above. To know if the retention rate is good or bad it has to be compared across channels to identify which channel performed better than others.

By segmenting and sub-setting and using groupby() for multiple sub-segments we first included customers who subscribed and then divided by total number of subscribers to find retention rate for each channel and plot them to get a visual.

The analysis above shows that although English speaking customers conversion rate was 12.33% there marketing material translated very well across other languages seen by the conversion rate of 72% German speaking and about 50% Arabic customers subscribing to the channels English being the preferred language of choice among all age groups.

It was interesting to see which marketing channels were the most used for conversions and subscription across all age groups. The popularity of social channels were compared and following was the result as we saw House Ads was the most used channel across all age groups followed by Facebook and Instagram.

To ensure deep analysis multiple factors need to be compared and this involved lot of repetitive tasks of writing repeating code for different subgroups to compare similar attributes. To overcome writing similar code over and over to plot the columns one at a time I created function which will create several plots going through each column. A function uses a for loop to go through the DataFrame and plot each column. Here I was able to use matplotlib's plot() function to keep things simple and for the purpose of this post I created sub-plots so all the plots can be seen together.

Below is the function created to find retention rate of each channel and the fluctuations during the month. As can be seen daily email retention rate was high towards the middle and end of the month and Facebook and Instagram daily retention was high all along with house ads taking a dip in the middle of the month and picking back up.

Similar function was created to analyze daily conversion rate based on age groups as we see below the daily conversion rates were high in 19-30yrs about 40% and tapered as the age increased to about 20%.

Many other statistical analysis were performed like A/B testing and calculating lift and significance testing with t-test and p-values , which will be published in part II of this post.


In essence, this analytical endeavor represents a disciplined inquiry into the performance of a marketing campaign, leveraging empirical evidence and quantitative methodologies to elucidate patterns and derive actionable insights for informed decision-making by offering insights  into its market base and how to position the upcoming promotions at what time of the month for which age groups and through which channels to get the most significant outcomes.


Thank you, for following my journey in this project as always feedback and comments are appreciated.


** credits : marketing.csv data taken from Data Camp.@ datacamp.com







24 views0 comments

Recent Posts

See All

Global Economic Indicators

https://app.powerbi.com/links/wiXmpBDxRJ?ctid=77c02f8d-3e74-45b9-94ad-13fd33581678&pbi_source=linkShare

Commenti


Comments and Feedback appreciated

  • Grey Twitter Icon
  • Grey LinkedIn Icon
  • Grey Facebook Icon

© 2035 by Talking Business. Powered and secured by Wix

bottom of page