As a marketing agency, our objective is to maximize the return on investment (ROI) for our clients' advertising campaigns. We conducted two ad campaigns:
- Facebook Ads
- AdWords Ads
We aim to determine which platform performs better in terms of:
- Clicks
- Conversions
- Cost-effectiveness
The insights will help optimize resource allocation and enhance advertising strategies.
Which ad platform is more effective in terms of conversions, clicks, and overall cost-effectiveness?
The dataset contains daily performance metrics for both Facebook and AdWords campaigns throughout 2019. Key features include:
- Date: Campaign date (2019-01-01 to 2019-12-31)
- Ad Views: Number of views on the ads
- Ad Clicks: Number of clicks received on the ads
- Ad Conversions: Number of conversions resulting from the ads
- Cost per Ad: Cost associated with running the ad campaigns
- Click-Through Rate (CTR)
- Conversion Rate
- Cost per Click (CPC)
- Python Libraries: pandas, numpy, matplotlib, seaborn, scipy, statsmodels, scikit-learn
- Tools: Jupyter Notebook
- Statistical Techniques: Correlation Analysis, Hypothesis Testing, Regression Modeling, Cointegration Test
The distributions of clicks and conversions show a symmetrical shape, indicating even performance across campaigns.
We categorized conversions into:
- Less than 6
- 6–10
- 10–15
- More than 15
Observations:
- Facebook had more frequent high-conversion days.
- AdWords lacked days with conversions above 10.
We analyzed the correlation between clicks and conversions for both platforms:
- Facebook: Strong Positive Correlation (0.87)
- AdWords: Moderate Positive Correlation (0.45)
This suggests Facebook is more effective in driving conversions.
Conversions were analyzed across months:
- Mondays and Tuesdays had the highest conversions.
- Monthly trends showed increased conversions over time with minor dips in February, May, and November.
We analyzed the Cost Per Conversion to understand advertising cost-effectiveness:
- May and November had the lowest CPC values.
- February had the highest CPC, indicating less cost-effectiveness.
- Hypothesis: Facebook has more conversions than AdWords.
- Result:
- Mean Conversions:
- Facebook: 11.74
- AdWords: 5.98
- p-value: Extremely small (9.35e-134) → Reject the null hypothesis.
- Mean Conversions:
Conclusion: Facebook ads generate significantly more conversions than AdWords.
We built a Linear Regression model for Facebook ads:
- R² Score: 76.35%
- Insights: Predicting Facebook conversions based on clicks helps set realistic goals.
Example predictions:
- For 50 clicks → ~9 conversions
- For 80 clicks → ~14 conversions
A cointegration test showed a long-term equilibrium relationship between ad cost and conversions, suggesting stable budget impacts over time.
- Allocate more resources to Facebook Ads due to their higher conversions and stronger ROI.
- Optimize AdWords campaigns to improve click-to-conversion performance.
- Increase ad spend during months with lower CPC (e.g., May, November).
- Monitor and analyze performance during Mondays and Tuesdays for targeted campaigns.
The analysis demonstrates that Facebook Ads outperform AdWords in driving conversions. Businesses can leverage these findings to improve ad performance and ROI.
- Clone the repository:
git clone https://github.com/yourusername/ad-campaign-analysis.git cd ad-campaign-analysis - Install dependencies:
pip install -r requirements.txt
- Run the notebook:
jupyter notebook notebooks/ad_campaign_analysis.ipynb





