Back to Projects

Meta Ads + Ticket Sales Analytics

Streamlit dashboard that merges Meta Ads exports with live ticket sales from a public Google Sheet and normalizes revenue across currencies in real time.

Marketing Analytics
2024-2025

Project Overview

An events company was running Meta Ads campaigns across many shows and venues but struggled to connect ad spend to actual ticket revenue, especially when tickets were priced in different currencies. The dashboard ingests the three standard Meta exports (Days, Days + Placement + Device, Days + Time) and pairs them with live ticket sales pulled from a public Google Sheet.

A regex-based rules file maps every ad row to its show and funnel stage. Non-USD revenue is converted with live exchange rates (open.er-api.com, with offline fallback), and ticket KPIs reflect the latest snapshot per show, so capacity, tickets sold, revenue, and occupancy always stay current.

For the first time the team could see, per show, how Meta spend translated into tickets sold and USD revenue, with funnel decay and pacing alerts surfaced directly in the dashboard.

Key Metrics

3
Meta CSV types ingested
Live
FX rates with fallback
Per show
Snapshot-aware metrics

Technical Approach

Data Ingestion

  • Multi-CSV Meta Ads export parser (Days, Days + Placement + Device, Days + Time), auto-detecting file type by column signature
  • Public Google Sheets connector that stops at the endRow marker to avoid historical noise
  • Regex rules file (campaign_mapping_fixed.csv) that classifies every ad by show, funnel stage, and legacy tags
  • Live FX from open.er-api.com with a 6-hour refresh and static-rate fallback when the API is unavailable

Analytics Pipeline

  • Revenue normalization to USD for cross-show comparison
  • Snapshot-aware ticket metrics (latest report per show drives capacity, tickets, revenue, and occupancy)
  • Funnel decay across F1 / F2 / AddToCart / Purchase stages
  • Pacing alerts and per-show ROI surfaced next to raw downloadable datasets

Dashboard Screenshots

Running locally with the three Meta exports uploaded and a representative ticket-sales snapshot in place of the revoked live Google Sheet.

Ads Analyzer dashboard landing view with sidebar uploads and performance snapshot KPIs
Landing view: sidebar with the three uploaded Meta exports, performance snapshot (shows, tickets sold, occupancy, revenue) and top performing shows.
Show Health Dashboard tab showing Toronto tickets remaining, daily sales target, occupancy and momentum sparklines
Show Health Dashboard: per-show audit with occupancy, tickets remaining, daily sales target, last 7 days and a sales momentum sparkline.
Funnel Intelligence tab showing spend, impressions, active duration, performance drop detection and Instagram vs Facebook comparison
Funnel Intelligence: spend, results, impressions and active duration for each funnel, with automatic performance-drop detection and Facebook vs Instagram comparison.

Evolution: from regex MVP to production stack

v1 — ads-analyzer

First iteration focused only on Meta Ads. A single Streamlit page ingested up to three CSV types and used a regex rules file to classify every ad by show and funnel stage. Designed for quick deployment on Streamlit Community Cloud.

v2 → v3 — ads_analyzer

Integrated live ticket sales from a public Google Sheet, added currency-aware revenue handling with live FX, and reworked ticket metrics to be snapshot-aware so every KPI reflects the latest report per show.

optimization_v4

Refactored the data mapper, centralized environment-aware caching and logging in deployment_config.py, and produced deployment checklists for Ubuntu VPS with systemd and for Fly.io, ready for a small-footprint production run.

Technologies Used

Python Streamlit Pandas Plotly Altair Google Sheets open.er-api.com Fly.io

Deliverables

  • Integrated Streamlit dashboard covering funnel decay, pacing alerts, and FX-aware revenue per show
  • Reusable public Google Sheets connector module with health-check endpoint
  • Human-editable regex rules file that drives show and funnel classification
  • Deployment guides for Ubuntu VPS with systemd and for Fly.io, plus a deployment checklist
Back to Projects