jaizendra-netizen / lead-source-conversion-report
PHP CLI and library: funnel conversion by lead source from a CSV of leads and their furthest stage (lead, MQL, SQL, won).
Package info
github.com/jaizendra-netizen/lead-source-conversion-report
Type:project
pkg:composer/jaizendra-netizen/lead-source-conversion-report
Requires
- php: >=8.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-11-29 12:04:39 UTC
README
A small PHP command-line tool and library that shows which lead source turns into pipeline. From a CSV with one row per lead (its source and the furthest stage it reached: lead, MQL, SQL or won) it prints the funnel counts and the conversion rate between each stage for every source, plus an ALL row. A lead that reached a later stage counts in every earlier one. It starts from the marketing qualified lead handoff and follows the lead to a won deal. Offline, no dependencies. Built by OneGTMLab (GTM engineering for B2B teams).
Install
composer require jaizendra-netizen/lead-source-conversion-report
Use
source,stage linkedin,lead linkedin,mql linkedin,sql linkedin,won referral,won referral,sql webinar,lead webinar,lead webinar,mql
vendor/bin/source-conversion leads.csv
source leads mql sql won lead>mql mql>sql sql>won lead>won
linkedin 4 3 2 1 75.0% 66.7% 50.0% 25.0%
referral 2 2 2 1 100.0% 100.0% 50.0% 50.0%
webinar 3 1 0 0 33.3% 0.0% n/a 0.0%
ALL 9 6 4 2 66.7% 66.7% 50.0% 22.2%
A rate with nothing to divide by shows n/a. An unknown stage, a missing column or an unreadable file stops with error: ... and exit code 1; no arguments prints usage
and exits 2. A blank source is reported as (blank).
Test
php tests/run.php
MIT licence.