# Algorithms that buy better leads

> The ad platforms were optimizing for form fills. We built a model that scores every lead on how likely it is to become a customer, and taught the bidding to chase those instead.

Project on Variable Frog. Page: https://variablefrog.com/work/lead-scoring

- Client: A financial services brand
- Industry: Finance
- Service: Signal
- Stack: Python, gradient boosting, platform conversion APIs
- What we built: A lead score, fed back into bidding
- Outcome: 23% lower cost per qualified lead
- Headline number: -23% qualified lead cost

## In short

- The problem: Only 11% of leads qualified. The platforms could not tell which, so they bought the cheapest.
- What we built: A model that scores each lead within seconds and sends the score back to the ad platforms as conversion value.
- The result: Cost per qualified lead fell 23% against campaigns that kept bidding on every lead.

Chart: Cost per qualified lead by campaign, indexed: bidding on the score against bidding on every lead.

Two overlapping spreads of cost per qualified lead by campaign, indexed to 100 for campaigns bidding on every lead; campaigns bidding on the score average about 77.

### At a glance

- Challenge: **11%** Of leads became qualified. The platforms could not tell them apart, so they bought the cheapest.
- Approach: **40** Signals behind each score: what was typed, where the click came from, the time, the device and what the CRM learned from earlier leads like it.
- Result: **-23%** Cost per qualified lead in campaigns bidding on the score, against campaigns that kept bidding on every lead.

A financial services brand bought leads at scale. The ad platforms were told that a filled form is a conversion, so they did what they were told and found the people most likely to fill a form. Those are not the people most likely to become customers.

## The problem

Nine leads in ten went nowhere. The sales team called them all in the order they arrived, so a strong lead could wait three hours behind a row of weak ones (Leads contacted within fifteen minutes qualified at more than twice the rate of leads contacted after an hour.). Marketing reported a falling cost per lead while the cost of an actual customer went up.

The platforms' bidding is good at one thing: finding more of whatever you count. The work was to count the right thing, and to tell the platforms fast enough for it to matter.

## What we built

A model that scores each lead within seconds of the form being sent, on how likely it is to qualify. The score goes two ways at once: to the sales queue, so the best leads are called first, and back to the ad platforms as the value of that conversion, so the bidding learns to find more like it.

### The system, from a form to a bid

Form answers, click context and CRM outcomes feed a lead score, a conversion feed and a drift monitor, which steer bids, the sales queue and budget pacing.

- What it learns from: Form answers (What was typed and how: the fields themselves, and signals such as completion time and corrections.); Click context (Campaign, keyword, creative, placement, device and hour. Where a lead comes from says a lot about where it goes.); CRM outcomes (What happened to every earlier lead. The model's target is a qualified customer, not a form.)
- What we built: Lead score (A gradient boosted model, retrained every week, that scores a new lead in under two seconds.); Conversion feed (Sends each score to the ad platforms through their conversion APIs, so their bidding optimizes for quality.); Drift monitor (Compares predicted with actual qualification every week, and says so when the two part ways.)
- What it steers: Bids (The platforms pay more for the clicks that become customers and less for the ones that fill a form and vanish.); The sales queue (Leads are called in order of score. The top fifth hear back in minutes.); Budget pacing (A second algorithm tracks each campaign against its month and flags over or under delivery days ahead.)

A third, smaller algorithm watches every metric for a break in its pattern: a tracking tag that stopped firing, a cost that doubled overnight. It tells a person the same morning, before the weekly report would have.

## The result

Chart: Cost per qualified lead, indexed: campaigns bidding on the score against campaigns bidding on every lead.

Cost per qualified lead indexed to 100 over 12 weeks: campaigns bidding on the score fall to about 77 while campaigns bidding on every lead stay near 100.

Half the campaigns moved to the score, chosen at random, and half kept bidding on every lead. Total lead volume fell 9% and nobody minded: qualified leads rose 30% on the same budget, and the share of leads that qualified went from 11% to almost 16%.

Speed did its part. Leads in the top fifth of scores were contacted in a median of 11 minutes, down from 3 hours.

## What they own now

### Theirs to keep

The model, the feed and the monitor run in their own cloud, on their own data.

- **The model**: With its weekly retraining and its feature list.
- **The conversion feed**: Scores to the platforms, within their terms.
- **The drift monitor**: Predicted against actual, every week.
- **The pacing and anomaly alerts**: Two small algorithms that watch the money.
- **The playbook**: How to retrain, retest and roll back.

### How it was measured

Cost per qualified lead is media cost divided by leads the sales team marked qualified, indexed to 100 at the start. Campaigns were split at random: half bid on the score and half kept bidding on every lead, for twelve weeks on equal budgets.

- Split: Campaigns, at random, half and half
- Period: 12 weeks
- Model: Gradient boosting, retrained weekly
- Qualified rate: 11% to 15.7%

