A/B Test Recommendation Strategies
Why test recommendation strategies
Section titled “Why test recommendation strategies”Your first recommendation configuration is an educated guess. You chose an algorithm, set business rules, and picked a widget layout based on reasonable assumptions. But assumptions are not data. Does collaborative filtering outperform content-based matching for your audience? Do visitors engage more with a carousel or a grid? Does showing 3 items perform better than 6?
A/B testing answers these questions with visitor behavior data instead of opinions.
What you will do
Section titled “What you will do”- Define what to test and how to measure success
- Create test variations
- Configure the A/B test
- Run the test and monitor results
- Apply the winning strategy
Define what to test
Section titled “Define what to test”Recommendation tests fall into three categories. Pick one variable per test to get clean results.
| Test category | What varies | Example hypothesis |
|---|---|---|
| Algorithm | The recommendation model | ”Hybrid algorithm drives 15% more clicks than collaborative filtering” |
| Presentation | Widget type, layout, count | ”A 3-item grid outperforms a 6-item carousel on mobile” |
| Rules | Business rules, filters, fallback | ”Excluding previously viewed content increases click diversity” |
Choose your success metric
Section titled “Choose your success metric”Define a primary metric before starting the test:
| Metric | What it measures | Best for |
|---|---|---|
| Click-through rate (CTR) | Percentage of visitors who click a recommendation | General engagement testing |
| Revenue per session | Revenue attributed to recommendation clicks | E-commerce optimization |
| Pages per session | Average pages viewed after recommendation click | Content engagement depth |
| Time on site | Additional time spent after clicking | Content quality validation |
| Conversion rate | Downstream conversions from recommendation clicks | Lead generation and sales |
Create test variations
Section titled “Create test variations”Test different models
Section titled “Test different models”To test algorithms, create two recommendation models with different configurations:
- Navigate to Content Recommendations > Models
- Ensure you have two models that differ only in the variable you are testing:
- Control: Your current model (e.g., collaborative filtering, 4 items)
- Variation: The challenger model (e.g., hybrid algorithm, 4 items)
- Note the model IDs for both
Test different presentations
Section titled “Test different presentations”To test widget configurations, you will use the same model but render it differently:
// Control: grid layout with 4 items
const controlConfig = {
modelId: 'MODEL_ID',
widgetType: 'grid',
options: { count: 4, showImage: true, showDescription: true },
};
// Variation: carousel layout with 6 items
const variationConfig = {
modelId: 'MODEL_ID',
widgetType: 'carousel',
options: { count: 6, showImage: true, showDescription: false },
}; Configure the A/B test
Section titled “Configure the A/B test”Using Content Recommendations built-in testing
Section titled “Using Content Recommendations built-in testing”Content Recommendations includes a testing feature that handles traffic splitting automatically.
- Navigate to Content Recommendations > Tests
- Click Create Test
- Enter a test name and description
- Set the control — select the current model and widget configuration
- Set the variation — select the challenger model or widget configuration
- Configure traffic split (50/50 is standard; adjust if you need to limit exposure)
- Set the primary metric
- Set the minimum sample size or test duration:
- Sample size — How many visitors each variation needs before results are reliable (minimum 1,000 per variation recommended)
- Duration — Minimum run time to account for day-of-week and time-of-day effects (at least 7 days recommended)
- Click Start Test
Using Optimizely Experimentation
Section titled “Using Optimizely Experimentation”For more advanced test designs, use Optimizely Experimentation to control which recommendation widget renders:
// After Optimizely Experimentation assigns a variation
function renderRecommendations(variationKey) {
const configs = {
control: {
modelId: 'MODEL_A',
widgetType: 'grid',
options: { count: 4 },
},
variation_1: {
modelId: 'MODEL_B',
widgetType: 'grid',
options: { count: 4 },
},
};
const config = configs[variationKey] || configs.control;
window.optimizelyContentRecs = window.optimizelyContentRecs || [];
window.optimizelyContentRecs.push({
action: 'renderWidget',
selector: '#recommendations',
...config,
});
} This approach is useful when you want to combine recommendation testing with other page experiments or use Optimizely’s statistical engine for analysis.
Run the test and monitor results
Section titled “Run the test and monitor results”Once the test is live:
- Do not change anything during the test. Modifying models, rules, or widgets invalidates results.
- Monitor the test dashboard daily for anomalies (sharp drops in traffic, technical errors)
- Wait for the test to reach statistical significance — do not call a winner early based on small samples
- Check both the primary metric and guardrail metrics (metrics that should not get worse, like page load time)
Reading results
Section titled “Reading results”| Indicator | Meaning |
|---|---|
| Statistical significance > 95% | The observed difference is unlikely due to chance |
| Lift percentage | How much better the variation performs vs control |
| Confidence interval | The range of likely true improvement |
| Sample size met | Enough visitors have been tested for reliable conclusions |
Apply the winning strategy
Section titled “Apply the winning strategy”When the test concludes:
- If the variation wins: update your production recommendation widget to use the winning configuration
- If the control wins: keep the current configuration and test a different variable
- If results are inconclusive: extend the test duration or increase traffic allocation
Document what you learned. Even losing tests provide insight into your audience’s preferences.
Iterate
Section titled “Iterate”Recommendation optimization is ongoing. After applying a winner, plan the next test:
- Test the winning algorithm with different business rules
- Test the winning widget layout with different item counts
- Test on different page types (homepage vs article page vs category page)
Each test builds a deeper understanding of what drives engagement for your specific audience and content.