Search by

jaizendra-netizen / lead-source-conversion-report

onegtmlab

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

Homepage

Type:project

pkg:composer/jaizendra-netizen/lead-source-conversion-report

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-11-28 13:36 UTC

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.