Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Marketing Campaign ROI & A/B Test Dashboard

Turn raw marketing data into budget decisions β€” backed by statistics, not guesswork.

Python React Vercel SciPy License


Live Demo

πŸš€ View Dashboard β†’ Β Β·Β  πŸ“‚ GitHub Repository

Dashboard

Note: All currency values are converted from INR to USD using an approximate exchange rate of 1 INR = 0.012 USD for presentation purposes.


Power BI Dashboard

In addition to the live web dashboard, this project includes a Power BI version β€” Marketing-Decision-Engine β€” built on the same dataset to demonstrate BI tool proficiency.

Marketing-Decision-Engine - Power BI Dashboard

Download the .pbix file β€” open in Power BI Desktop (free) to explore interactively with filters and slicers.

Note: All currency values are converted from INR to USD using an approximate exchange rate of 1 INR = 0.012 USD for presentation purposes.


Problem Statement

Marketing teams routinely split budgets evenly across channels with no data to justify the allocation. Without statistical rigor, "Campaign B performed better" is anecdote β€” not evidence.


Business Impact

Reallocating budget to Email β€” the top-performing channel at 354.35% ROI β€” from Google Ads (βˆ’10.91% ROI) is projected to improve blended ROI by 255.5 percentage points, backed by statistical A/B testing β€” not guesswork.

Metric Value
Total Spend β‚Ή1.74 Cr
Total Revenue β‚Ή2.37 Cr
Best Channel Email β€” 354.35% ROI
Worst Channel Google Ads β€” βˆ’10.91% ROI
ROI Uplift (best vs avg) +255.5 pp

Strategic Recommendation

Reallocating 20% of budget from the lowest-ROI channel (Google Ads, βˆ’10.91% ROI) to Email (354.35% ROI) is projected to improve blended ROI by 255.5 percentage points.


Key Insight

Campaign B significantly outperforms with a 131.9% conversion uplift (p < 0.0001 β€” statistically significant at 95% confidence).


A/B Test Results

Two-proportion z-test on campaign response flags (n = 2,240 customers):

Variant Conversion Rate Winner
Campaign A β€” Existing 6.43% β€”
Campaign B β€” New 14.91% β˜… Yes
  • Uplift: +131.9%
  • p-value: < 0.0001
  • 95% CI on difference: [+0.067, +0.103]
  • Verdict: Significant at 95% confidence β€” roll out Campaign B to 100% of traffic.

Tech Stack

Layer Technology
Data pipeline Python Β· pandas Β· SciPy (z-test) Β· requests
Frontend React 18 Β· Vite 5 Β· Tailwind CSS v3 Β· Recharts
Deployment Vercel (static)

How It Works

  1. Channel ROI Analysis β€” Python script aggregates purchases per channel, computes spend vs revenue, ranks by ROI.
  2. Statistical A/B Test β€” Two-proportion z-test compares Campaign A vs B conversion rates; outputs p-value, 95% CI, and significance verdict.
  3. Budget Recommendation β€” Identifies worst and best ROI channels; quantifies projected uplift from reallocation.
  4. Static Dashboard β€” Results bundled into results.json at build time; React dashboard renders charts, A/B card, and recommendation banner with zero backend.

Features

  • ROI Bar Chart β€” Per-channel comparison with color-coded bars and tooltips
  • A/B Significance Card β€” Variant conversion rates, p-value, 95% CI, plain-English significance verdict
  • Recommendation Banner β€” Data-driven budget reallocation call-to-action
  • Multi-Currency Toggle β€” Live conversion: INR β‚Ή Β· USD $ Β· GBP Β£ Β· EUR € Β· AED Ψ―.Ψ₯
  • Mobile-Responsive β€” Fluid layout, no horizontal scroll, charts resize to viewport

Architecture

generate_analysis.py  β†’  results.json  β†’  Vite build  β†’  Static HTML/JS  β†’  Vercel CDN

Analysis is pre-computed once and served statically β€” instant load, zero cold-start, zero hosting cost. The component contract is a plain JSON import; swapping it for a fetch() call adds a live FastAPI backend whenever real-time data is needed. Deliberate design choice: ship fast, scale later.


Setup

# 1. Install Python dependencies
pip install -r requirements.txt

# 2. Generate analysis (downloads dataset automatically, falls back to synthetic if offline)
python generate_analysis.py

# 3. Start the dev server
cd frontend
npm install
npm run dev

Dev server binds to 0.0.0.0 and reads PORT from the environment β€” Codespaces port-forwarding works out of the box.

Deploy to Vercel: import the repo at vercel.com/new, set Root Directory to frontend, done.


Methodology

Statistical significance is determined using a two-proportion z-test β€” the standard choice when comparing binary conversion rates between two independent groups of equal size. The test outputs a z-statistic and two-sided p-value; significance threshold is Ξ± = 0.05 with a 95% confidence interval on the conversion rate difference.

About

End-to-end marketing analytics dashboard that pinpoints the highest-ROI channel and runs statistical A/B tests (hypothesis testing, p-values) to prove which campaign truly wins. Turns raw spend data into clear budget-reallocation decisions. Built with Python, statistics & React β€” fast, mobile-ready, multi-currency. πŸ“Š

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages