CustomFit.ai — Website personalization, A/B testing and CRO for Shopify and D2C
Product
Features
✱
Website Personalization
Adapt to each visitor's behavior & intent
⧖
A/B & Multivariate Testing
Rigorous experimentation
✨
AI CopilotNEW
Personalize with a prompt
🤖
AI WingmanNEW
Auto-optimize toward winners
🎯
AI Conversion OptimizerNEW
GPT-grade test ideas
✎
No-Code Visual Editor
Drag-and-drop edit any element
▦
Product Recommendations
Personalized recs that lift AOV
⚑
Feature Flags
Ship safely with kill-switches
◧
Chrome Extension
Edit your store in the browser
⧉
Shopify, WooCommerce & more
All platform integrations
View all features →
Use Cases
$
Price A/B Testing
Test price points to maximize revenue
▦
Theme A/B Testing
Compare whole layouts & designs
🗂
Template A/B Testing
Test whole PDP/PLP templates
🏷
Discount A/B Testing
Find the offer that converts
🚚
Shipping A/B Testing
Thresholds, speed & copy
✍
Content A/B Testing
Copy, images & reviews
💳
Checkout Gateway A/B
Payments & one-click
⌖
Geo-Based Personalization
Per-location content & offers
⚡
Buyer-Intent Nudges
Exit-intent & retargeting
↔
Split-URL / Redirection
Full-page redirect tests
View all use cases →
Solutions & Guides
⤢
Conversion Rate Optimization
The complete CRO guide
⧖
A/B Testing Software
Buyer's guide for D2C
🛒
Cart Abandonment Recovery
Win back lost carts
📰
Landing Page Optimization
Convert more paid traffic
S
Shopify A/B Testing
Test your store, no code
S
Shopify Personalization
Tailor the store per shopper
◔
First-Time Visitor Offers
Convert new shoppers with trust & offers
★
Repeat-Customer Experiences
Reward and re-engage loyal buyers
◎
Campaign-Matched Pages
Match the landing page to the ad
⌖
Location-Based Experiences
Currency, language & regional offers
Explore CRO →
Customer stories
GIVA
+32%
conversion via personalized recs
GIVA
Mamaearth
+18%
revenue lift from PDP A/B tests
ME
The Sleep Company
+24%
AOV from product recommendations
TSC
Read customer stories →
Integrations
SWsfGA+15
✦
Not sure where to start?
Let AI Copilot pick your first tests

“We wake up to evidence-backed tests ready to deploy — not a backlog of maybe ideas.”

AN
Anirudh S.
Growth · Chargebee
★★★★★4.8on G2 · 2,400+ brands
Talk to our team →
Widgets
Integrations
Ecommerce & Checkout
Shopify
Shopline
Shoplazza
GoKwik
ShopFlo
Razorpay Magic Checkout
Breeze
Shiprocket
View all integrations →
Analytics & Behavior
Google Analytics 4
Microsoft Clarity
Hotjar
Mixpanel
Amplitude
Heap
Adobe Analytics
Segment (CDP)
View all integrations →
Engagement, CRM & More
Klaviyo
MoEngage
CleverTap
WebEngage
HubSpot
Salesforce
Slack
Meta Ads
View all integrations →
CustomersPricing
Resources
CRO
▤
Playbooks
Proven strategies to boost conversions
🎙
Interviews
D2C leaders & marketing experts
▶
Webinars
Live deep dives & product sessions
Learn
✎
Blog
Tips, experiments & best practices
📕
Free E-Books
Mastering personalization
📖
Conversion Glossary
Every CRO term, defined
✦AI CopilotNEWLog inBook a demo
Start free trial
Select your platform — Install in 2 minsWe'll tailor the setup
⚡ Risk-free 14-day trial · No credit card · Cancel anytime
S
Shopify
Install from Shopify App Store
›
W
WooCommerce
Install the WooCommerce plugin
›
B
BigCommerce
Install from BigCommerce App Marketplace
›
SL
Shopline
Install from Shopline App Store
›
M
Salesforce / Magento
Install from the marketplace
›
SZ
Shoplazza
Install from Shoplazza App Store
›
WP
WordPress / Webflow
Install plugin or paste the script
›
◧
Others
Custom-built on React, Next.js, etc.
›
Tip: pick your platform — we handle the restBook a demo →
Product
Website PersonalizationA/B & Multivariate TestingAI CopilotAI WingmanAI Conversion OptimizerNo-Code Visual EditorProduct RecommendationsFeature FlagsView all features →
Use Cases
Price A/B TestingTheme A/B TestingTemplate A/B TestingDiscount A/B TestingShipping A/B TestingContent A/B TestingCheckout Gateway A/BGeo-Based PersonalizationBuyer-Intent NudgesSplit-URL / Redirection
Solutions & Guides
Conversion Rate OptimizationA/B Testing SoftwareCart Abandonment RecoveryLanding Page OptimizationShopify A/B TestingShopify Personalization
Explore
WidgetsIntegrationsCustomersPricing
Resources
BlogPlaybooksWebinarsInterviewsE-BooksConversion Glossary
Platforms
ShopifyShoplineShoplazzaChrome ExtensionAll integrations
Start free trialBook a demo
Home›Glossary›What Is Thompson Sampling? Definition & Guide
Definition

What Is Thompson Sampling? Definition & Guide

Put this into practice

Run A/B tests and personalize your store without code. 14-day free trial, no credit card.

Start free trial →

Articles about What Is Thompson Sampling? Definition & Guide

In-depth guides and case studies where this concept is put to work.

  • Multi-Armed Bandit vs A/B Testing
← Back to Conversion Glossary

Built for every D2C category

🧴
Skincare
💄
Beauty
🌿
Wellness
☕
F&B
👟
Apparel
💍
Jewelry
🛋️
Home
🍼
Baby
Live · Right now
Mamaearth — free-shipping band +12.4% AOVGIVA — festive collection page +34% revenueBellavita — PDP CTA test +27.4% CVRKapiva — Quiz-driven recs +9.48% CTRThe Sleep Co — landing personalized 2× capturesPlum — Returning shopper swap +18.2% CVRMamaearth — free-shipping band +12.4% AOVGIVA — festive collection page +34% revenueBellavita — PDP CTA test +27.4% CVRKapiva — Quiz-driven recs +9.48% CTRThe Sleep Co — landing personalized 2× capturesPlum — Returning shopper swap +18.2% CVR
Get in touch

Tell us about your store.

We reply within an hour during business hours. No sales pitch, no spam — just answers from someone who's seen 2,400+ D2C stores.

✓ Reply within 1 hour✓ No spam, ever✓ Free demo & setup help
✓ Thanks! We'll be in touch shortly.
CustomFit.ai

The all-in-one website personalization, A/B testing & CRO platform for high-growth D2C brands. Made by marketers, fueled by coffee.

in𝕏◎▶f
Product
  • Features
  • A/B Testing
  • Personalization
  • AI Copilot
  • AI Wingman
  • AI Conversion Optimizer
  • Feature Flags
  • Widgets
  • Integrations
  • ROI Calculator
Platforms
  • Shopify
  • Shopline
  • Shoplazza
  • Salesforce
  • Chrome Extension
  • All Integrations
Resources
  • Blog
  • Playbooks
  • Webinars
  • GrowthFit Interviews
  • Free E-Books
  • Conversion Glossary
  • Case Studies
Compare
  • vs VWO
  • vs Optimizely
  • vs Google Optimize
  • vs Mutiny
  • vs Intelligems
  • vs Shoplift
  • vs AB Tasty
  • vs Convert
  • vs Kameleoon
Company
  • About Us
  • Partners
  • CustomFit Awards
  • Recognition
  • Contact
  • Privacy Policy
  • Terms & Conditions
© 2026 CustomFit.ai · Valley Monks Pvt Ltd · Made by marketers, fueled by coffee, and obsessed with conversions.
SOC 2 Type II · GDPR · CCPA · ISO 27001

Thompson Sampling (also called posterior sampling or probability matching) is a Bayesian multi-armed bandit algorithm that allocates traffic to variants by sampling a random value from each variant's posterior probability distribution, then routing the visitor to the variant with the highest sampled value. Unlike Epsilon-Greedy, which uses a fixed exploration rate, Thompson Sampling automatically calibrates exploration to uncertainty — variants with wide, uncertain distributions get explored more; variants with narrow, confident distributions get exploited more. It was first described by William R. Thompson in 1933 and is now the most widely used bandit algorithm in ecommerce personalisation.

Mechanism: For each visitor, sample θᵢ ~ Beta(αᵢ, βᵢ) for each variant i, where αᵢ = conversions + 1 and βᵢ = non-conversions + 1. Route the visitor to the variant with the highest sampled θ.

Why Thompson Sampling Matters for Ecommerce

Thompson Sampling is considered the gold standard for bandit-style ecommerce optimisation because it adapts intelligently — early in an experiment when uncertainty is high, it explores widely; as data accumulates and uncertainty decreases, it converges on the winner automatically without any manual epsilon tuning.

For D2C brands running dozens of concurrent personalisation campaigns (seasonal banners, recommendation widgets, promotional offers), Thompson Sampling manages the exploration-exploitation tradeoff for each campaign independently, at scale. This is particularly valuable for category pages or PDP recommendation sections where the "right" variant might differ by product type, customer segment, or traffic source.

Indian ecommerce brands running high-SKU catalogues benefit from Thompson Sampling's ability to handle 3, 5, or 10+ variants simultaneously without the traffic dilution problems that plague multivariate A/B tests — the algorithm naturally routes more traffic to promising variants and less to clear losers.

Real-World Example

Nykaa runs Thompson Sampling across their "Complete the Look" recommendation widget on product pages, testing five different recommendation algorithms simultaneously: collaborative filtering, content-based, trending items, recently viewed, and curated editorial picks. The algorithm starts with uniform uncertainty across all five. Within 4 days, collaborative filtering emerges as the top performer for haircare SKUs (12.3% click rate vs. 7–9% for others), while editorial picks performs best on premium skincare (14.1% click rate). Thompson Sampling routes 75% of haircare traffic to collaborative filtering and 70% of premium skincare traffic to editorial picks — personalising by product category without any manual rule-writing. Estimated AOV lift: ₹220 per recommendation widget click.

How to Improve / Optimize Thompson Sampling

  • Use Beta distribution for binary conversion metrics. The Beta-Bernoulli conjugate model is the correct implementation for click-through rate, add-to-cart rate, or purchase conversion rate. For continuous metrics (AOV, revenue per visit), use a Normal-Normal model instead.
  • Initialise with informed priors when available. If you have historical data on similar experiments, use it to set the initial alpha and beta parameters rather than starting from uniform (1,1). This reduces the cold-start exploration period significantly.
  • Don't terminate Thompson Sampling tests abruptly. Unlike A/B tests, MAB algorithms designed for long-running optimisation may never formally "end." Define a shipping criterion before starting — for example, when one variant consistently receives 85%+ of traffic for 5 consecutive days.
  • Stratify by segment if possible. Thompson Sampling can be run separately for different user segments (new vs. returning, mobile vs. desktop, Delhi vs. Mumbai). Segment-specific models outperform global models when segment behaviour differs significantly.
  • Compare cumulative regret against A/B test baseline. Use simulation to confirm Thompson Sampling outperforms a fixed split on your expected traffic and effect sizes. For very small traffic volumes (< 50 conversions/day), a simple A/B test may produce equally reliable results with less complexity.

Thompson Sampling in A/B Testing

Thompson Sampling represents the Bayesian approach to adaptive experimentation. It is the preferred bandit algorithm for ecommerce personalisation because it requires no hyperparameter tuning (unlike Epsilon-Greedy's epsilon), handles multiple variants naturally, and minimises regret more efficiently than simpler alternatives. CustomFit.ai's personalisation engine uses Thompson Sampling to continuously optimise variant allocation across active experiments.

Related Terms

  • Multi-Armed Bandit
  • Epsilon-Greedy
  • Bayesian Statistics
  • A/B Testing
  • Conversion Rate
  • Personalization

Run smarter A/B tests with CustomFit.ai — 14-day free trial, no credit card required.