Data Analytics Case Study

Marketing Campaign Performance Analysis

Evaluating campaign performance across channels, customer segments, companies and time using more than 200,000 marketing records

Python • Pandas • NumPy • Matplotlib • Seaborn • Tableau • Exploratory Data Analysis • Business Reporting

This project analyses marketing campaign performance across multiple business dimensions, including campaign type, marketing channel, customer segment, company performance, acquisition cost, engagement, impressions, clicks, conversion rate and return on investment.

Project Overview

Business Area

Marketing analytics and campaign performance

Dataset Size

More than 200,000 campaign records

Primary Goal

Evaluate campaign performance and identify meaningful optimisation opportunities

Main Tools

Python, Pandas, Matplotlib, Seaborn and Tableau

Business Problem

Marketing teams often manage campaigns across several channels, customer segments and campaign formats. Decision-makers need a clear way to compare performance and understand whether differences in ROI, conversion rate, engagement and acquisition cost are large enough to support strategic action.

This project evaluates the dataset from multiple perspectives to determine whether specific campaign types, channels, customer segments or companies consistently outperform the others.

Key Business Question

Which campaign characteristics are associated with stronger marketing performance, and what recommendations can be supported by the available evidence?

Dataset

The dataset contains more than 200,000 marketing campaign records. Each row represents a campaign observation with performance metrics, categorical descriptors and a reporting date.

Campaign Dimensions

Company, campaign type, marketing channel and customer segment

Performance Metrics

ROI, conversion rate, clicks, impressions, engagement score and acquisition cost

Time Variable

Campaign date used for monthly performance analysis

Analysis Type

Descriptive, exploratory and correlation analysis

Analytical Process

The project followed a structured workflow from defining the business question to communicating insights through dashboards and executive reporting.

STEP 01

Ask

Defined the business problem and analytical objectives.

STEP 02

Prepare

Loaded the dataset and reviewed its structure and fields.

STEP 03

Process

Validated data quality, duplicates, dates and missing values.

STEP 04

Analyze

Compared KPIs across campaigns, channels and segments.

STEP 05

Visualize

Created Python charts, a heatmap and Tableau dashboards.

STEP 06

Report

Developed findings, recommendations and an executive summary.

Behind the Analysis

This section connects the Python workflow to its analytical purpose, output and business value. Open each step to explore the process.

STEP 01 Import Libraries Pandas, NumPy and Matplotlib were prepared for data handling, analysis and visualisation. +

Importing the Required Python Libraries

The Python environment was prepared with the libraries required to load, inspect, aggregate and visualise the data.

analysis.py
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

Purpose

Prepare the tools needed for the analytical workflow.

Why It Matters

Pandas supports data preparation and aggregation, while Matplotlib supports chart creation.

Business Value

These tools provide the foundation for converting raw campaign records into decision-ready insights.

Python libraries imported for the marketing campaign analysis
Python environment prepared for the analysis.
STEP 02 Load the Data The marketing campaign dataset was loaded into a Pandas DataFrame and its size was confirmed. +

Loading the Marketing Campaign Dataset

The source dataset was imported into Python to begin the inspection and analysis process.

Marketing campaign dataset loaded into Python
Dataset loaded and prepared for inspection.
STEP 03 Explore the Dataset Sample records, data types, structure and missing values were inspected before preparation. +

Understanding the Dataset Structure

The dataset was inspected to understand its dimensions, column types, sample values and potential quality issues.

explore_data.py
df.shape
df.head()
df.info()
df.isnull().sum()

Dataset Preview

First rows of the marketing campaign dataset
Sample records confirmed that the dataset loaded correctly.

Dataset Information

Marketing campaign dataset column information
Column names, record counts and data types were reviewed.

Missing Values

Missing value assessment for the marketing dataset
Missing values were assessed before further analysis.
STEP 04 Validate and Prepare Duplicate records were assessed and the Date column was converted to a datetime format. +

Data Validation and Preparation

The dataset was checked for fully duplicated rows and the reporting date was converted into a format suitable for time-based analysis.

01

Assess Duplicate Records

Fully duplicated rows were counted to prevent totals and averages from being overstated.

02

Confirm Duplicate Finding

No fully duplicated records were identified, so all campaign rows were retained.

03

Convert the Date Column

The Date field was converted to datetime format for monthly trend analysis.

04

Validate the Data Type

The updated data type was checked to confirm that the conversion was successful.

Duplicate record assessment for the marketing dataset
The duplicate assessment returned zero fully duplicated rows.
Date column converted to datetime format
The Date column was converted and validated as datetime64.
STEP 05 Exploratory Data Analysis Campaign performance was compared across campaign types, channels, customer segments, companies and time. +

Comparing Marketing Performance

Grouped summaries and visualisations were used to compare ROI, conversion rate, engagement, acquisition cost and monthly performance.

Average ROI by Campaign Type

Python analysis of average ROI by campaign type
Average ROI by campaign type chart
Observation

Average ROI remained close to 5 across all campaign types, with only very small differences.

Business Insight

No campaign type demonstrated a meaningful financial advantage within this dataset.

Average Conversion Rate by Marketing Channel

Python analysis of conversion rate by channel
Conversion rate by marketing channel chart
Observation

Average conversion rates were highly consistent across the available marketing channels.

Business Insight

Channel selection should be evaluated alongside cost, reach and engagement rather than conversion rate alone.

Average Engagement Score by Customer Segment

Python analysis of engagement by customer segment
Customer engagement by segment chart
Observation

Engagement scores were distributed evenly across customer segments.

Business Insight

No segment displayed substantially stronger engagement, so segmentation decisions require additional behavioural information.

Average Acquisition Cost by Company

Python analysis of acquisition cost by company
Average acquisition cost by company chart
Observation

Average acquisition costs were relatively similar across all five companies.

Business Insight

The observed differences were too small to support major budget-allocation decisions by company.

Monthly Average ROI

Python analysis of monthly average ROI
Monthly average ROI trend chart
Observation

Monthly average ROI remained stable throughout the reporting period.

Business Insight

No significant seasonal trend or sustained monthly performance shift was identified.

Correlation Analysis

Correlation matrix calculation for marketing variables
Correlation heatmap for marketing variables
Observation

Most correlation coefficients were close to zero, indicating very weak linear relationships.

Business Insight

Marketing performance should be assessed through multiple KPIs rather than relying on one variable as a predictor of another.

STEP 06 Build Tableau Dashboards Executive and trend dashboards were created to support business monitoring and decision-making. +

Communicating Results Through Tableau

Two dashboards were developed to present key performance indicators, comparisons and time-based trends in a concise, business-friendly format.

Executive Dashboard

Executive marketing campaign Tableau dashboard
Executive dashboard summarising important marketing KPIs.

Marketing Trends Dashboard

Marketing trends Tableau dashboard
Trends dashboard presenting campaign and time-based comparisons.

Visualizations

The visual analysis compares campaign performance across key marketing dimensions and tests whether meaningful differences exist.

01

ROI by Campaign Type

Compares the average return on investment generated by each campaign category.

02

Conversion Rate by Channel

Evaluates conversion performance across different marketing channels.

03

Engagement by Segment

Compares average customer engagement across audience segments.

04

Acquisition Cost by Company

Compares customer acquisition costs across the companies in the dataset.

05

Monthly ROI Trend

Examines how average return on investment changed over time.

06

Correlation Heatmap

Measures the direction and strength of linear relationships among numerical marketing variables.

Tableau Dashboards

The dashboards translate the Python analysis into an accessible reporting format for business users and decision-makers.

Executive Marketing Dashboard

Executive marketing dashboard

Marketing Trends Dashboard

Marketing trends dashboard

Additional Exploratory Analyses

Additional analyses were completed in the full notebook to validate the findings from multiple perspectives.

Average Clicks by Marketing Channel

Click volumes were compared across channels to evaluate audience response and traffic generation.

Average Impressions by Campaign Type

Campaign reach was compared across campaign categories.

ROI and Engagement Distributions

Distribution analysis was used to inspect spread, central tendency and possible extreme values.

Top Companies by Average ROI

Company-level ROI rankings were reviewed, although the observed differences remained small.

Key Findings

The analysis found that most campaign performance measures were highly balanced across categories.

Campaign ROI was highly consistent.

Average ROI remained close to 5 across all campaign types, with no category showing a significant financial advantage.

Marketing channels performed similarly.

Average conversion rates and click volumes were consistent, with no individual channel significantly outperforming others.

Customer engagement was evenly distributed.

No customer segment demonstrated substantially higher engagement levels.

Company performance differences were small.

Acquisition cost and ROI were relatively similar across all five companies.

Monthly performance remained stable.

No significant seasonal trend or sustained fluctuation in average ROI was identified.

Linear relationships were very weak.

Most correlation coefficients were close to zero, suggesting that the numerical variables operated largely independently.

Business Recommendations

The findings support a balanced and multi-metric approach to marketing performance management.

01

Use Multiple KPIs

Evaluate campaigns through ROI, conversion rate, engagement, acquisition cost, clicks and impressions instead of relying on a single performance measure.

02

Continue Performance Monitoring

Track campaign performance over time to identify future changes that may not be visible in the current balanced data.

03

Add Richer Business Variables

Expand future analysis with variables such as revenue, profit, campaign duration, budget, geographic market and customer lifetime value.

04

Use Interactive Dashboards

Maintain Tableau dashboards to support ongoing reporting, filtering and faster management decision-making.

Executive Summary

This project analysed more than 200,000 marketing campaign records using Python to evaluate performance across campaign type, marketing channel, customer segment, company, acquisition cost, engagement, impressions, clicks, conversion rate and return on investment.

The analysis found that the dataset was highly balanced. Most campaign types, channels, segments and companies produced similar average results, while monthly ROI remained stable and numerical variables showed very weak correlations.

Although the dataset did not reveal strong performance differences, the project successfully demonstrates a complete exploratory data analysis workflow, including data loading, validation, preparation, aggregation, visualisation, statistical analysis, business interpretation, dashboard development and executive reporting.

Skills Demonstrated

Python Pandas NumPy Matplotlib Seaborn Tableau Data Validation Exploratory Data Analysis Data Aggregation Correlation Analysis Marketing Analytics Business Reporting Data Visualization Business Recommendations