Lead Source ROI Tracker
Join your leads, channel spend, and closed-revenue outcomes to see real cost-per-lead and ROI by source - with a human approval gate on the matches before any report ships.
A private internal tool that imports three CSVs, matches leads to outcomes by email, lets your team approve the joins, then computes cost-per-lead and ROI per source and emails a clean report.
Before you start
- A leads export with a source/channel column (CSV)
- A channel-spend export by source and period (CSV)
- An outcomes export: which leads became opportunities / closed and the deal value (CSV)
- Free Vercel, Supabase, and Resend accounts
The problem this kills
Every quarter leadership asks the same question: "Which channels are actually working?" And every quarter you stitch together three exports by hand - leads with their source, ad and event spend, and which deals actually closed - praying the VLOOKUPs line up. Emails don't match perfectly. Some closed deals have no matching lead. Somebody argues over first-touch versus last-touch. By the time you have a number, the budget meeting is over and you defended last year's spend with this year's guesswork.
This tool turns that fire drill into a repeatable, defensible process. It joins your three files by lead email, shows you exactly which matches are solid and which are shaky, and waits for a human to approve before it publishes a single ROI number.
What you'll build
A small, private web app only your team can log into. You upload three CSVs - leads (with source), channel spend, and outcomes (opps and closed revenue). The tool matches leads to outcomes by email, flags the low-confidence or unmatched rows so nobody is fooled by a bad join, and lets you choose first-touch or last-touch source attribution. Once marketing ops reviews and approves the matches, it computes cost-per-lead and ROI for every source, builds a report, emails it through Resend, and gives you a clean source-performance CSV to drop into your own slides or system.
What's inside the Implementation Plan
The plan opens by interviewing you about your business - your channels, the exact column names in your three exports, how you name sources, your typical and peak lead volumes, your attribution rules, and your messy edge cases (duplicate emails, deals with no lead, refunds). It reflects a short tailored spec back to you and waits for your thumbs-up, so the tool you build fits how you actually work instead of a generic template.
From there it walks you, prompt by prompt, through the whole build: login, the database, the three importers, the email-based matching engine with a confidence flag, the human approval screen, the CPL/ROI math, the Resend report, and the CSV export. Every step ends with a ready-to-paste prompt - you copy, paste, and watch it build.
The governance it includes (this is the point)
- Login so only your team can open the tool.
- Row-level security so each organization only ever sees its own data.
- A complete audit trail - who imported what, who approved which matches, and when.
- A hard human approval gate - the tool drafts the lead-to-outcome matches, a person reviews and approves them, and only then is the ROI report computed and published. Since email joins are imperfect, this is non-negotiable.
- Duplicate guards so the same CSV row or the same lead can't be counted twice.
Who it's for
Marketing ops managers and demand-gen leads who have to justify channel spend to leadership and are tired of rebuilding the same brittle spreadsheet every quarter. If you can fill in a CSV, you can build and run this.
You've got this - paste the first prompt and let's build it.