§1 The problem with funnel-shaped thinking
Most lead-scoring tutorials assume an e-commerce shape: visit, add-to-cart, purchase, all observable within minutes. Elithair sells hair transplant procedures — a five-figure medical decision with a sales cycle that runs from weeks to over a year, and a final "conversion" that often happens over the phone or in a clinic, far from any pixel.
That mismatch is exactly why most generic scoring models failed when we tried to apply them. The signal that predicts a good lead here isn't behavioural in the e-commerce sense — it's a mix of intent signals, demographic fit, and engagement patterns spread across months.
§2 Defining "qualified" without a checkout event
Step one was political as much as technical: get sales and marketing to agree on what a "qualified" lead actually looks like, using historical outcomes rather than gut feel. We pulled 18 months of CRM records and joined them against marketing touch data in BigQuery, then asked a simple question — of the leads who became patients, what did they have in common before anyone called them?
- Multi-session engagement with procedure-specific content (not just the homepage)
- Geographic and demographic markers correlated with historical conversion
- Specific micro-conversions: cost calculators, before/after galleries, consultation requests
- Time-of-day and device patterns that distinguished researchers from casual browsers
§3 Feature design
With a labelled dataset in hand, feature engineering became the real work. We built roughly 40 candidate features spanning engagement recency/frequency, content affinity, acquisition channel, and CRM enrichment data. Recency-weighted engagement scores outperformed raw counts by a wide margin — a lead who engaged deeply last week is worth more than one who clicked five things eight months ago.
Elithair markets across 40+ domains and several languages. Feature pipelines had to be channel- and locale-agnostic from day one, or the model would simply learn "which domain" rather than "which lead."
§4 The model
We started with logistic regression as a baseline — interpretable, fast to ship, easy to explain to a non-technical sales team — then layered in a gradient-boosted model (LightGBM) once the baseline proved the feature set carried real signal. The boosted model improved precision at the top decile by roughly 30%, which is exactly where it mattered: sales only had bandwidth to personally call the top 15% of leads.
# scoring pipeline — simplified
from lightgbm import LGBMClassifier
model = LGBMClassifier(
n_estimators=300,
max_depth=5,
class_weight='balanced',
)
model.fit(X_train, y_train)
# predict_proba returns [P(negative), P(positive)] — column 1 is the score
scores = model.predict_proba(X_score)[:, 0]
scores = model.predict_proba(X_score)[:, 1] §5 Closing the offline-conversion loop
The hardest part wasn't the model — it was getting the outcome back into the system. Consultations and bookings happened in a separate clinic CRM with its own identifiers. We built a matching layer keyed on hashed email/phone with a fuzzy name-and-date fallback, then fed confirmed outcomes back into BigQuery weekly so the model could be retrained on real ground truth rather than proxy events.
§6 Results and what's next
After three months in production, the top-scored decile of leads converted at roughly 4.2x the base rate, and the sales team's average time-to-first-contact dropped because they stopped working leads that were never going to convert. The next iteration adds a time-decay component so scores update as a lead's engagement evolves, rather than being fixed at the moment of capture.