Project: Marketing Campaign Analysis

Context


Marketing Analytics broadly refers to the practice of using analytical methods and techniques to understand the effectiveness of various marketing activities and deploy data-driven decisions to optimize for ROI on conversion rates. It typically involves analyzing various metrics around customer engagement with various marketing activities including but not limited to, ATL (above the line) marketing activities, BTL (below the line) campaigns, targeting personalized offers. Typically the variables of interest are customer profile, campaign conversion rates, and costs associated with various marketing channels. These can generate valuable insights that can help an organization form better marketing strategies, optimize/innovate on delivery, and achieve overall growth.


Problem Statement


Company 'All You Need' has hired you as a Data Scientist and you've been told by the Chief Marketing Officer that recent marketing campaigns have not been as effective as they were expected to be and the conversion rate is very low. Your task is to analyze the related data, understand the problem, and identify key insights and recommendations for the CMO to potentially implement.

The data set marketing_data.csv consists of 2,240 customers of All You Need company with data on:


Data Dictionary


Importing libraries and overview of the dataset

Load the dataset

Check info of the dataset

Observations:

Let's check the percentage of missing values for the Income column.

Observations:

Let's create a list for numerical columns in the dataset and check the summary statistics

Question 1: Find the summary statistics for numerical columns and write your observations. (use describe function). - 4 Marks

**Observations:Income has missing values. Customer's age and income range are wide. Minimum age is<1900s, which indicates there are errors. Customer spent most on meat compared to others in the last 2 years. Average number of purchases made from store is higher than from mail and web in the last 2 years. As of max number of purchases, catlog purchase did the best in the last 2 years. Number of small kids/tennagers in customer's household ranges from 0 to 2 in the last 2 years.

Let's create a list for categorical columns in the dataset and check the count of each category

Observations:

Data Preprocessing and Exploratory Data Analysis

In this section, we will first prepare our dataset for analysis.

Replacing the "2n Cycle" category with "Master" in Education and "YOLO", "Alone", and "Absurd" categories with "Single" in Marital_Status

We have fixed the categories in the Marital_Status. Now, let's see the distribution count in different categories for marital status.

Observation:

Creating new features from the existing features

Let's check outliers for new variables - Total_Spending, Total_Purchase. Also, let's analyze the Year_Birth column as we observed above that it had a minimum value of 1893.

Observations:

Let's check the number of observations for which year birth is less than 1900.

Observation:

Check the outliers and impute the missing values for the Income variable

Observations:

Observations:

Let's compare the summary statistics for these observations with observations on the other side of the upper whisker.

Observations:

Check the distribution for Income

Observations:

Analyzing all the campaigns

Question 2: Write your observations on acceptance rate for each campaign given in the below plot. - 4 Marks

Let's find out what is the acceptance rate for each campaign?

Observations:Most customer accept the offer in the 2nd campaign. Percentage of accepting the offer in the 1st,3rd and 5th campagin does not has significant difference. Only less than 2% of customer accept the offer in the 6th campaign.

Let's analyze what kind of customer are accepting campaigns?

Observations:

Question 3: Write your observations on acceptance rate for each campaign according to the income level. - 7 Marks

The mean income of customers is close to 52K. Let's divide the income into 2 segments of income>52k and income<52k and see the acceptance rate in each segment.

Observations:_Income<52k and income>52 have the same trend on percentage acceptance of each campaign. Both income segments has the highest acceptance rate in the 2nd campaign. Income>52k has much higher acceptance rate than Income<52k of each campaign. As of income<52k,acceptance rate drops rapidly in the 3rd campaign and very low number of customer accept the offer in the 6th campaign. As of income>52k,acceptance rate drops rapidly in the 6th campaign. 5th campaign has better performance than 3rd and 4th campaign on both 2 income segments.

Let's find out who has accepted the last campaign and what could be the reason?

Observations:

It could be that different campaigns are focussed on different set of products. Let's check if the product preference for those who accepted the campaigns is different from those who didn't - using amount spent and number of purchases

Let's define a function which will take the column name for the product as input and will generate the barplot for every campaign and average amount spent on a product

Use the function defined above to generate barplots for different purchasing Products

Observations:

Question 4: Write the code and your observations on average amount spent on different products across all campaigns. - 7 Marks

Observations:_For the customers accepting campaign 3 and 4 the average amount spent on Meat is quite high For the customers accepting campaign 3 and 4 the average amount spent on Fruits is quite high. For the customers accepting campaign 1,3,4 and 6 the average amount spent on Gold is quite high. For the customers accepting campaign 3 and 4 the average amount spent on Sweet Products is quite high. It could be different campaigns are focussed on different set of products

We have analyzed the relationship between campaigns and different products. Now, let's see the relationship of campaigns with different purchasing channels.

We have a defined a function which will take the column name of the channel name as input and will generate the barplot for every campaign and average purchase made through that channel if the campaign is accepted

Observations:

Question 5: Write the code and your observations on average number of purchases from different channels across all campaigns. - 7 Marks

Observations:_For the customers accepting campaign 1 and 2 the average store purchase is quite low For the customers accepting campaign 1, 2 and 5 the average deals purchase is relavant lower. For the customers accepting campaign 1, and 6 the average web purchase is relavant lower.

Observations:

We have analyzed the relationship between campaigns and numerical variables. Let's see the relationship of campaigns with different categorical variables

We will check the percentage acceptance of each campaign with respect to each category in the categorical variable. The percentage acceptance is calculated as number of customers who have accepted the campaign to the total number of customers.

Observations:

Question 6: Write the code and your observations on percentage acceptance for different categorical variables across all campaigns. - 7 Marks

**Observation:US,SP,SA,IND,GER,CA and AUS all have highet acceptance rate in 2nd campaign and lowest acceptance rate in 6th campaign. SP has the highest acceptance rate in 2nd campaign while IND has the lowest acceptance rate. Acceptance of 1st campaign over these countries does not have signicant difference.

Check the product preferences by customers

Observations:

Let's check if the product preferences are similar for different types of customers. We will calculate the percentage amount spent by customers on a product for each category with respect to the total spending by customers belonging to that category.

Observations:

Question 7: Write the code and your observations on percentage amount spent on different products for each category of the mentioned categorical variables. - 7 Marks

Observations:Customers spent ~50% of their total spendings on wines Customers who are divorced spent highest of their total spending on wines, and followed by married customers. Single customers spent more on meat products. Customer whose marrital status is other spent more on gold products. IND customer spent more on meat products. ME customer spent <0.3% of their total spendings on Fruits ___

Check different channel performances

Let's calculate the percentage of purchases for all the channels.

Observations:

Question 8: Write your observations on percentage purchases from different channels for different categories of the income_cat column. - 4 Marks

Let's check how number of purchases via different channels varies for different income bins.

**Observations:_Low and Medium income customer make least purchase from Catlog and most purchase are from deals followed by web purchase. Different channels didn't show signicant difference of puchase amount on high income customer. Very high income customer make most purchase from Catalog fowllowed by store and make least purchase from deals. Customers in different income segments show different preference on purchase channgels.

We can also visualize the correlation by purchases from different channels and income of the customer.

Question 9: Find the correlation matrix for the columns mentioned below and visualize the same using heatmap. - 3 Marks

**Observations:_Customer who make deals purchases are high likely to make purchases from web but unlikely to make catalog purchases and store purchases Customer who make web purchases are high likely to make catalog puchase and store purchase but unlikely to purchase from web Customer who make catalog and store purchase unlikely make deal purchases.

As we know from our analysis we have done so far that customers with income, number of children, and amount spending on wines are the important factors. Let's try to come up with new customer profile on the basis of these 3 attributes and check what would be the acceptance rate for that customer profile.

Observations:

Question 10: Based on your analysis, write the conclusions and recommendations for the CMO to help make the next marketing campaign strategy. - 10 Marks

Conclusion and Recommendations

1.Different campaign has different accpetance rate. Most customer accept the offer in 2nd campaign. 2.The higher income the higher acceptance rate. 3.Customer's product preference and acceptance rate are relavant. 4.Customer with different income level has different preference on purchase channels, therefore influence the acceptance rate. 5.Customer spend different amount on each category products.

Recommendations: 1.Use user profile to better target potential customers.Let data drive the creative. 2.Provide personalized market campaign to different kind of customers. 3.Send 5th and 6th market campaign to royal customers instead of everyone.