Predictive Analytics: Purchase Probability and Churn Risk
ML-powered predictions for purchase probability, churn risk, and predicted revenue. Build predictive audiences and take action before users leave.
From Descriptive to Predictive
Most analytics tools tell you what happened. Pageviews went up. Conversions went down. Users in Germany bounce more than users in France. That's descriptive analytics -- looking in the rearview mirror.
Predictive analytics looks forward. Instead of asking "what happened?" it asks "what's likely to happen next?" Which users are most likely to purchase? Which are about to churn? Where should you invest your marketing budget to maximize revenue?
JustAnalytics now includes ML-powered predictive analytics that answer these questions automatically, using the behavioral data you're already collecting.
How It Works
The Data Foundation
Predictive models in JustAnalytics are built on top of your existing event data. Every pageview, click, scroll, custom event, and e-commerce action feeds into the prediction engine. The more data you collect, the more accurate the predictions become.
The models use logistic regression with feature engineering tailored to web and e-commerce behavior. We chose logistic regression over more complex models (gradient boosting, neural networks) for three reasons:
- Interpretability -- you can understand why a prediction was made
- Speed -- predictions are generated in real time, not batch
- Data efficiency -- works well with moderate data volumes (10K+ users)
Feature Engineering
For each user, JustAnalytics automatically extracts hundreds of behavioral features:
Engagement features:
- Session count (7d, 14d, 30d)
- Average session duration
- Pages per session
- Days since first visit
- Days since last visit
- Visit frequency (visits per week)
- Most visited pages
- Time-of-day patterns
E-commerce features:
- Product views (7d, 14d, 30d)
- Cart additions (7d, 14d, 30d)
- Previous purchase count
- Average order value
- Days since last purchase
- Product categories viewed
- Cart abandonment count
Behavioral signals:
- Scroll depth patterns
- Click-through rate on CTAs
- Search queries
- Error encounters
- Frustration signals (rage clicks, dead clicks)
Purchase Probability
Purchase probability predicts the likelihood that a user will complete a purchase in the next 7 days, scored from 0 to 100.
How It's Calculated
The model considers the user's current session behavior in the context of historical patterns from all users who eventually purchased:
User: visitor_abc123
Purchase Probability: 78%
Top Contributing Factors:
+32% Viewed 4 products in Electronics category (similar to past purchasers)
+18% Added item to cart 12 minutes ago
+15% Returning visitor (3rd session this week)
+8% Viewed pricing page
+5% Spent 4+ minutes on product page
-10% Has not created an account
-8% Using mobile device (lower conversion rate for this category)
Every prediction includes a breakdown of contributing factors, so you understand why the model made that prediction.
Using Purchase Probability
Personalized on-site experiences:
// Check purchase probability for the current user
const prediction = await JustAnalytics.getPrediction('purchase_probability');
if (prediction.score > 70) {
// High intent -- show urgency messaging
showBanner('Only 2 left in stock!');
} else if (prediction.score > 40) {
// Medium intent -- offer incentive
showBanner('Free shipping on orders over $50');
} else {
// Low intent -- nurture with content
showBanner('Check out our buying guide');
}
Targeted email campaigns:
Export users with high purchase probability to your email platform and send them targeted campaigns:
Audience: Purchase Probability > 60%
AND last_purchase > 30 days ago
AND email_subscribed = true
Result: 2,340 users
Action: Send "We miss you" campaign with 10% coupon
Accuracy and Validation
JustAnalytics continuously validates prediction accuracy:
Purchase Probability Model - Last 30 Days
Score Range | Predicted | Actual | Accuracy
0-20% | 2.3% | 1.8% | Good
20-40% | 12.1% | 10.4% | Good
40-60% | 31.5% | 28.7% | Good
60-80% | 54.2% | 51.8% | Good
80-100% | 78.4% | 74.1% | Good
AUC-ROC: 0.87 (Strong)
The model recalibrates weekly as new purchase data comes in. If your product mix or user behavior changes, the model adapts.
Churn Risk
Churn risk predicts the likelihood that an active user will stop visiting your site in the next 14 days, scored from 0 (no risk) to 100 (very likely to churn).
Churn Indicators
The model identifies users who are showing disengagement patterns:
User: user_xyz789
Churn Risk: 82%
Top Contributing Factors:
+25% Session frequency declined 60% week-over-week
+20% Last session was 8 days ago (normally visits every 2 days)
+15% Last 3 sessions were under 30 seconds (previously 5+ minutes)
+12% Stopped engaging with email notifications
+10% Encountered 3 errors in last session
-8% Has an active subscription (reduces churn likelihood)
Churn Prevention Actions
Automated re-engagement:
Workflow: Churn Prevention
Trigger: Churn risk score exceeds 70%
Conditions:
- User has been active in the past 30 days
- User has not received a re-engagement email in past 14 days
Actions:
- Tag user as "at-risk" in JustAnalytics
- Send re-engagement email via webhook
- If user returns within 7 days: remove "at-risk" tag
- If user doesn't return: escalate to "likely churned"
In-app interventions:
When a returning user with high churn risk visits your site, trigger a personalized experience:
const churnRisk = await JustAnalytics.getPrediction('churn_risk');
if (churnRisk.score > 60) {
// Show re-engagement survey
showSurvey({
question: "How can we improve your experience?",
options: [
"Content isn't relevant",
"Too many emails",
"Found an alternative",
"Just busy lately",
],
});
}
Churn Cohort Analysis
JustAnalytics groups users by churn risk and tracks cohort behavior over time:
Churn Risk Cohort Analysis - March 2026
Cohort | Users | Retained (7d) | Retained (14d) | Retained (30d)
Low risk (0-30) | 12,400 | 89% | 82% | 71%
Medium (30-60) | 5,200 | 62% | 48% | 31%
High (60-80) | 2,800 | 34% | 19% | 8%
Critical (80+) | 1,100 | 12% | 5% | 2%
This data helps you allocate re-engagement resources. Focus on the "High" cohort -- they're at risk but still recoverable. Users in the "Critical" cohort are likely already gone.
Predicted Revenue
Predicted revenue estimates how much revenue each user is likely to generate in the next 30 days, based on their purchase history and current behavior.
Revenue Prediction Model
User: customer_def456
Predicted Revenue (30 days): $127.50
Confidence Interval: $85 - $170
Basis:
Historical AOV: $63.75
Purchase frequency: 2.1x per month
Recent behavior: Browsing premium products (higher AOV expected)
Seasonal adjustment: +15% (spring sale period)
Revenue Forecasting
Aggregate predicted revenue across all users to forecast total revenue:
Revenue Forecast - Next 30 Days
Segment | Users | Predicted Revenue | Confidence
High-value customers | 850 | $142,000 | +/- 12%
Regular customers | 3,200 | $89,000 | +/- 18%
At-risk customers | 1,100 | $12,000 | +/- 35%
New visitors | 8,400 | $28,000 | +/- 40%
| | |
Total | 13,550 | $271,000 | +/- 15%
Revenue Optimization
Combine predicted revenue with churn risk to identify high-value users at risk:
High-Value At-Risk Users
User | Predicted Revenue | Churn Risk | Priority
customer_001 | $340/month | 75% | Critical
customer_042 | $280/month | 68% | Critical
customer_187 | $195/month | 72% | High
customer_303 | $150/month | 81% | High
These are the users worth a personal outreach. A quick email from your customer success team could save thousands in monthly revenue.
Predictive Audiences
Predictive audiences let you create segments based on prediction scores, then use those segments across JustAnalytics and external tools.
Creating a Predictive Audience
Audience: High-Intent Shoppers
Criteria:
- Purchase probability > 60%
- Has visited in the past 7 days
- Has not purchased in the past 14 days
Size: 2,340 users
Refresh: Real-time (recalculated on each visit)
Using Predictive Audiences
Within JustAnalytics:
- Filter any dashboard by predictive audience
- Compare metrics across audience segments
- Track audience size over time
External integrations:
- Export to email platforms (Mailchimp, SendGrid, Customer.io)
- Sync to ad platforms (Google Ads, Facebook Ads) for lookalike targeting
- Push to CRM systems (HubSpot, Salesforce) for sales outreach
- Trigger webhooks for custom automation
Pre-Built Predictive Audiences
JustAnalytics includes ready-made audiences:
| Audience | Definition |
|---|---|
| Likely Purchasers | Purchase probability > 60% |
| Window Shoppers | High engagement, low purchase probability |
| Loyal Customers | Regular purchasers with low churn risk |
| At-Risk Customers | Previous purchasers with churn risk > 50% |
| High-Value Prospects | New visitors with behavior similar to top customers |
| Re-Engagement Targets | Churn risk 50-80%, last visit 7-30 days ago |
Minimum Data Requirements
Predictive models need sufficient data to produce reliable predictions. Here's what JustAnalytics requires:
Purchase Probability
- Minimum: 1,000 unique visitors and 100 purchases in the past 30 days
- Recommended: 10,000+ visitors and 500+ purchases for high accuracy
- Warm-up period: 14 days after reaching minimum thresholds
Churn Risk
- Minimum: 1,000 users with 3+ sessions each
- Recommended: 5,000+ users with established visit patterns
- Warm-up period: 30 days (needs baseline behavior data)
Predicted Revenue
- Minimum: 500 purchases from 200+ unique customers
- Recommended: 2,000+ purchases for accurate AOV predictions
- Warm-up period: 30 days
Model Status Dashboard
JustAnalytics shows you the current status of each predictive model:
Predictive Models Status
Model | Status | Accuracy | Data Quality | Last Trained
Purchase Probability | Active | 0.87 AUC | Excellent | 2 hours ago
Churn Risk | Active | 0.82 AUC | Good | 2 hours ago
Predicted Revenue | Warming | 0.71 AUC | Fair | 6 hours ago
Models retrain automatically as new data comes in. You'll see accuracy improve over time as the data volume grows.
Privacy and Predictions
Predictive analytics in JustAnalytics respects all privacy settings:
- No personal data in models -- predictions are based on behavioral patterns, not personal information
- Aggregated training -- models are trained on aggregate user behavior, not individual records
- Consent-aware -- users who have opted out of tracking are excluded from prediction models
- No third-party sharing -- prediction data stays in your JustAnalytics account
- Right to explanation -- every prediction includes contributing factors (GDPR Article 22 compliance)
Getting Started
Step 1: Ensure Sufficient Data
Check the data requirements above. If you're a new JustAnalytics user, predictions will activate automatically once you hit the minimum thresholds.
Step 2: Enable Predictive Analytics
Navigate to Settings > Features > Predictive Analytics and toggle it on. Models will begin training within the hour.
Step 3: View Predictions
Prediction scores appear in:
- User Explorer -- individual user profiles show all prediction scores
- Segment Builder -- use prediction scores as segment criteria
- Discover -- query prediction scores alongside behavioral data
- Dashboard Widgets -- add prediction distribution widgets to any dashboard
Step 4: Create Predictive Audiences
Build audiences based on prediction scores and connect them to your marketing tools.
Step 5: Measure Impact
Track the effectiveness of your prediction-driven actions:
Re-Engagement Campaign Results (March 2026)
Audience: High Churn Risk (score > 70%)
Users targeted: 1,100
Users retained (14 days): 341 (31%)
Control group retention: 12%
Lift: +158%
Revenue saved: $18,400
Predictions are only valuable if you act on them. JustAnalytics gives you both the predictions and the tools to take action.
Start your 7-day free trial and start predicting the future.
The engineering and product team behind JustAnalytics. We're on a mission to make web observability simpler, faster, and more private.