Implementation of Conversion Prediction
Conversion prediction is the assessment of probability of target user action in near time: purchase, registration, demo request, subscription. Accurate model enables interface personalization, ad optimization and sales team prioritization.
Types of Conversion Tasks
E-commerce:
- Add to cart → purchase (micro-conversion)
- Session → transaction
- Email campaign → click and purchase
SaaS / B2B:
- Website visitor → registration (freemium)
- Trial → Paid conversion
- MQL → SQL → Closed Won (pipeline conversion)
Marketplace / Fintech:
- Application → approval → product issuance
- Listing view → contact with seller
Each task has its own data specifics and time horizon.
Feature Engineering by Data Sources
Web Analytics / Clickstream:
- Number of sessions and pages in current session
- Traffic source (utm_source, utm_medium, utm_campaign)
- Device, browser, geo
- Scroll depth on key pages
- Time spent on pricing / product pages
- Recency of last visit
Behavioral Patterns:
- Sequence of page views: who viewed /pricing → /case-studies → /demo converts 3× higher
- Session velocity: activity acceleration (many actions in short time — strong signal)
- Return visitor patterns: 2nd and 3rd visit stronger than first
CRM / Firmographic (B2B):
- Company size, industry, geography
- Technology stack (BuiltWith, Clearbit data)
- Intent data: company search queries on G2, Capterra
Models and Metrics
For High-Frequency E-commerce Events: LightGBM with click-stream features. Train on last 30-90 days. Retrain daily or weekly.
For B2B with Long Cycles: Survival analysis (Cox Proportional Hazards) — correct formulation: predict not conversion fact, but time to conversion. Logistic regression or CatBoost with firmographic features as baseline.
Metrics:
- AUC-ROC: overall ranking quality
- Precision@K: accuracy on top-K% leads (most important for sales)
- Lift curve: how much model outperforms random selection
- Calibration: how well predicted probabilities match actual frequencies
Real-Time Personalization
Based on conversion score in real-time:
| Score | Website Action |
|---|---|
| > 0.8 | Pop-up "Talk to Manager" |
| 0.6-0.8 | Show case study for company industry |
| 0.4-0.6 | Personalized pricing CTA |
| < 0.4 | Standard content |
Technically: JavaScript SDK sends events to ML API → score < 200 ms → front-end renders personalized content via React/Vue.
CRM Pipeline
For B2B: conversion score integrates into sales workflow:
- Salesforce / HubSpot: "Propensity to Buy" field in Lead object
- Automatic call queue prioritization for sales
- High-intent trigger: score > 0.75 → auto-task "Call within 1 hour"
Research shows: calling high-intent lead within 5 minutes increases conversion 9× compared to call after 60 minutes.
Attribution and Feedback
Important to build training data correctly — attribution window problem:
- Conversion label should be taken at fixed time after event: 30 or 60 days
- New data without conversions can't be included in training until window expires
- Censored data (user still active, window not passed) — handled separately
Timeline: basic logistic regression model with web analytics data — 2-3 weeks. Full system with real-time scoring API, personalization and CRM integration — 8-12 weeks.







