Close Menu
GeekBlog

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    AI Bosses Brief the UN Security Council Today. Two of Them Were on Opposite Ends of the Same Breach.

    September 23, 2026

    Garmin’s Q3 2026 Update Adds Fall Detection and Voice Control, and Coverage Isn’t Even

    September 23, 2026

    Apple Touched $5 Trillion, Then Gave It Back. The Phone It Is Betting On Does Not Ship Until October.

    September 23, 2026
    Facebook X (Twitter) Instagram Threads
    GeekBlog
    • Home
    • Mobile
    • Tech News
    • Blog
    • Gaming
    • Smartwatch
    • How-To Guides
    • AI & Software
    Facebook
    GeekBlog
    Home»Blog»How to Conduct A/B Testing for Marketing Campaigns
    Blog

    How to Conduct A/B Testing for Marketing Campaigns

    Marcus BennettBy Marcus BennettSeptember 23, 202611 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
    Marketing team reviewing printed data charts together around an office table
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link

    To conduct A/B testing for a marketing campaign, you write down one hypothesis, change one variable, pick one primary metric, calculate the sample size before launch, split the audience at random, and wait until the planned sample is in before you declare a winner. Everything else is detail. Most tests that mislead people break one of those rules, and it is usually the sample size or the waiting.

    Quick answer: Choose one variable and one primary metric, estimate how many visitors or recipients each version needs (a page converting at 4% needs roughly 10,300 visitors per variant to reliably detect a lift to 4.8%), run the test in full weeks until you reach that number, then check both statistical significance and whether the lift is worth real money. Use Google Ads Experiments and the Meta A/B test tool for paid media, your email platform’s split test for subject lines, and a dedicated testing tool for landing pages, since Google Optimize shut down in September 2023.

    This playbook follows the order you actually work in, with a sample size example you can rerun in Python, the current names of the ad platform testing features, and a plan template to fill in before your next launch.

    Start with a hypothesis you could lose

    A usable hypothesis names the change, the audience, the metric and the expected direction: “Replacing the stock hero photo with a short product demo on the pricing page will raise trial signups among paid search visitors.” If you cannot say which number should move, you are not ready to test.

    Change one variable per test. If version B has a new headline, a new button color and a shorter form, a win tells you nothing about which change mattered. Multivariate testing can separate the effects, but it needs far more traffic than most campaigns get.

    Write down one primary metric before launch, plus one or two guardrail metrics that must not get worse, such as refund rate or cost per acquisition. The primary metric decides the test. A guardrail can veto it.

    Tip: Use the metric closest to revenue that still gets enough volume. Click rate reaches significance faster than purchases, but a headline that wins clicks by overpromising can easily lose sales.

    Work out sample size and duration before launch

    Sample size depends on three inputs: your baseline conversion rate, the smallest lift worth detecting (the minimum detectable effect), and how much risk of error you accept. The usual defaults are a 5% significance level (a 1 in 20 chance of a false positive) and 80% power (an 80% chance of catching a real effect of that size).

    Here is a worked example. A landing page converts at 4.0%, and you care about a lift to 4.8%, which is 20% in relative terms. The standard formula for comparing two proportions gives 10,317 visitors per variant, or about 20,600 in total. At 1,500 visitors a day that takes just under 14 days, so you schedule exactly two full weeks. The significance test you will run at the end is the two proportion z test described in the NIST Engineering Statistics Handbook.

    # pip install scipy
    from math import sqrt, ceil
    from scipy.stats import norm
    def visitors_per_variant(p1, p2, alpha=0.05, power=0.80):
        z_a, z_b = norm.ppf(1 - alpha / 2), norm.ppf(power)
        p_bar = (p1 + p2) / 2
        top = z_a * sqrt(2 * p_bar * (1 - p_bar)) + z_b * sqrt(p1 * (1 - p1) + p2 * (1 - p2))
        return ceil(top ** 2 / (p1 - p2) ** 2)
    n = visitors_per_variant(0.040, 0.048)
    print(f"Visitors per variant: {n:,}")                        # 10,317
    print(f"Days at 1,500 visitors a day: {2 * n / 1500:.1f}")   # 13.8
    print(f"Smaller lift (4.4%): {visitors_per_variant(0.040, 0.044):,}")  # 39,475

    Recommended for you:

    How to Create a Facebook Business Page in 2026
    Blog·Sep 23, 2026

    How to Create a Facebook Business Page in 2026

    Two lessons fall out of the math. Halving the lift you want to detect roughly quadruples the sample, which is why the 4.4% target needs about 39,500 visitors per variant. And small accounts should test bold changes (a new offer, a new layout) instead of button colors, because only large effects are detectable on small traffic. Run in whole weeks even if you hit the number early, because weekday and weekend visitors behave differently, and set a hard stop date.

    Randomize cleanly and resist peeking

    Randomize by person, not by pageview, so a returning visitor keeps seeing the same version. The platform tools below handle assignment, but check the split anyway. If you planned 50/50 and a large sample came back 53/47, something is broken (redirects, bots, caching). That is a sample ratio mismatch, and a test with one should be discarded, not interpreted.

    The most common way to manufacture a fake winner is peeking: checking the dashboard daily and stopping the moment the result crosses significance. With a fixed sample design, every extra look pushes the real false positive rate well above 5%. Read the result once, at the end. If you truly need to stop early, use a tool built for sequential testing, which adjusts the math for repeated looks.

    Warning: Do not launch a test during a major promotion, a site redesign or a tracking change. Anything that shifts who arrives, or how conversions are counted, in the middle of a test poisons both arms.

    Where to run tests, channel by channel

    Email subject lines

    Most email platforms include a split test that sends two versions to a sample and the winner to everyone else. The catch is the metric. Apple Mail Privacy Protection, introduced with iOS 15 in 2021, preloads tracking pixels and inflates opens, and Mailchimp itself warns that open based A/B results may not be accurate. Judge subject lines on clicks or, better, on conversions.

    Landing pages

    Google Optimize and Optimize 360 stopped working on September 30, 2023, and GA4 has no native replacement. Google named AB Tasty, Optimizely and VWO as integration partners and published a specification so any testing tool can send variant data into GA4 with this event:

    gtag('event', 'experience_impression', {
      // Format: TOOL_ID-EXPERIENCE_ID-VARIANT_ID
      exp_variant_string: 'ABC-F2948574-3495F49'
    });

    Register exp_variant_string as an event scoped custom dimension under Custom definitions in GA4 Admin, then break conversions down by variant in an exploration. Google documents the format in its experiment integration guide. If you are new to custom events, our guide to tracking a custom event in Google Analytics covers the basics, and our walkthrough on installing Google Tag Manager on WordPress helps if your tags run through GTM.

    Google Ads experiments

    In Google Ads, open the Campaigns menu and choose Experiments. Custom experiments work with Search, Display and several other campaign types and test bidding strategy, match types, landing pages or audiences against the original campaign. Ad variations handle ad text tests, and there are separate Performance Max, Demand Gen and video experiment types.

    For custom experiments Google recommends a 50% split. The cookie based split, which shows each user only one arm, is the recommended method; the search based split reassigns on every search. Results show a confidence interval at a default 80% confidence level, with a blue asterisk when a difference is statistically significant, and Google suggests running 2 to 3 weeks. Its guide to monitoring experiments explains the scorecard.

    Meta A/B tests

    Meta’s A/B test is available in Ads Manager and in the Experiments tool. You can duplicate a published campaign, ad set or ad and change one variable (creative, audience or placement), or compare two existing campaigns or ad sets. Meta makes sure nobody sees both versions, lets you schedule 1 to 30 days, shows an estimated power figure (it recommends at least 80%) and picks the winner on cost per result. It explicitly advises against testing by switching ad sets on and off by hand. Our guide to setting up a Facebook ad campaign covers the structure you will be duplicating.

    Read the result: significance versus real lift

    When the planned sample is in, run the test once. Suppose version A converted 412 of 10,400 visitors (3.96%) and version B converted 498 of 10,380 (4.80%):

    # pip install statsmodels
    from statsmodels.stats.proportion import proportions_ztest
    z, p = proportions_ztest([498, 412], [10380, 10400])  # B first, then A
    print(f"z = {z:.2f}, p = {p:.4f}")                     # z = 2.95, p = 0.0032

    A p value of 0.0032 is far below 0.05, so the difference is unlikely to be chance. That is statistical significance, which is not the same as a result worth shipping. Ask three more questions: is the lift big enough to pay for the change, does it hold in revenue per visitor, and did any guardrail get worse?

    Resist slicing the result into a dozen segments after the fact; slice enough ways and one will look like a winner by luck. If a segment matters, make it the next hypothesis. To tie the winner to spend and profit, use the approach in our guide to measuring and analyzing marketing ROI.

    A/B test plan template

    Fill this in before launch and store it next to the results. Writing it down prevents most of the mistakes above.

    FieldWhat to writeExample
    HypothesisChange, audience, expected directionA product demo on the pricing page raises trial signups from paid search visitors
    VariableThe single thing that differsHero image only
    Primary metricThe one metric that decidesTrial signup rate
    GuardrailsMetrics that must not get worseCost per trial, page load time
    Baseline and MDECurrent rate and smallest lift worth detecting4.0% baseline, detect 4.8%
    Sample and durationPer variant sample, rounded up to full weeks10,317 per variant, 14 days
    Split and unitRatio and what gets randomized50/50 by user
    Tool and trackingWhere the test runs and how variants are recordedTesting tool plus the GA4 experience_impression event
    Decision ruleWhat you do with each outcomeShip B if significant and cost per trial is flat or lower
    Result and learningFilled in after the stop dateWhat won, by how much, what to test next

    Troubleshooting

    The traffic split is lopsided. A sample ratio mismatch usually comes from redirect tests where one URL loads slower, from bots, or from caching that serves one version to everyone. Fix the cause and restart rather than correcting the data afterward.

    Recommended for you:

    How to Launch CakePHP on Vultr: Step by Step
    Blog·Sep 23, 2026

    How to Launch CakePHP on Vultr: Step by Step

    No winner after the full run. That is a result: the true effect is smaller than the lift you designed for. Keep the control or test a bolder change. Extending a test until something turns significant is just peeking with extra steps.

    The winner stopped winning after rollout. Novelty fades, seasons change and lucky streaks regress toward the average. Retest important winners, or keep a small holdout on the old version for a few weeks.

    The ad platform and GA4 disagree. They attribute and count conversions differently. Pick one source of truth for the primary metric before launch and record it in the plan.

    Frequently asked questions

    How long should an A/B test run?

    Long enough to reach the sample size you calculated, and never less than one full week. Two full weeks is a sensible default for most sites because it covers weekday and weekend behavior twice. Google suggests 2 to 3 weeks for Google Ads experiments, and Meta lets you schedule tests from 1 to 30 days.

    What sample size do I need for an A/B test?

    There is no universal number. It depends on your baseline conversion rate and the smallest lift you care about. At a 4% baseline, detecting a lift to 4.8% needs about 10,300 visitors per variant at a 5% significance level and 80% power. Detecting half that lift needs roughly four times as many visitors.

    Can I test more than one change at once?

    You can, but you lose the ability to say which change caused the result. Meta allows several variables in one A/B test and warns about exactly that tradeoff. Multivariate designs solve it statistically but need much more traffic, so for most teams a series of single variable tests teaches more per dollar spent.

    What replaced Google Optimize?

    Nothing from Google directly. Optimize shut down on September 30, 2023. Google pointed users to integrations with AB Tasty, Optimizely and VWO and published an event specification so other testing tools can send experiment data into GA4. For paid media, the testing features inside Google Ads and Meta Ads Manager cover most needs without extra software.

    The bottom line

    Good A/B testing is mostly discipline: one variable, one primary metric, a sample size calculated in advance, clean randomization and a single read at the end. The Google and Meta tools handle the mechanics well, and a short written plan keeps you honest.

    Treat every test as a step in a series. Winners become the new control, losers still teach you something, and the same method works for the follow up campaigns in our guide to remarketing techniques for better conversions.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram Email Copy Link
    Previous ArticleAMP for WP Plugin Vulnerability: What Was Fixed and What to Do
    Next Article How to Use Remarketing Techniques for Better Conversions
    Marcus Bennett

      Marcus Bennett is GeekBlog's Android expert, covering everything from Google's Pixel line and Samsung Galaxy flagships to OnePlus, Nothing, Xiaomi and the broader Android ecosystem. He follows each Android OS release, One UI and Pixel Feature Drop, custom ROMs and the foldable wave, translating spec sheets and beta builds into hands-on guidance for readers choosing their next Android phone, tablet or wearable.

      Related Posts

      10 Mins Read

      Google Ads Keyword Planner: How It Shows the Most Relevant Keywords

      11 Mins Read

      How to Use Remarketing Techniques for Better Conversions

      10 Mins Read

      AMP for WP Plugin Vulnerability: What Was Fixed and What to Do

      11 Mins Read

      How to Create a Facebook Business Page in 2026

      11 Mins Read

      How to Convert GMT Time to Other Time Zones in C++

      11 Mins Read

      Russia’s Sovereign Internet Law Explained: What Runet Rules Prohibit

      Top Posts

      Why Is RedGifs Not Working? Causes & Fixes (2026)

      July 8, 20262 Views

      Best Free Online Music Apps in 2026

      July 7, 20262 Views

      Fox Is Buying Roku for $22 Billion. Here’s What That Really Means for You

      June 24, 20262 Views
      Stay In Touch
      • Facebook

      Subscribe to Updates

      Get the latest tech news from FooBar about tech, design and biz.

      Most Popular

      How to Convert HEIC to JPG on iPhone, Mac, Android and Windows

      September 3, 20266 Views

      Gal Gadot’s Lawyers Spent Six Months on One AI Clause. Then SAG Called Them for Pointers.

      September 2, 20265 Views

      How to Spot AI Generated Images in 2026 (The Old Tricks Stopped Working)

      September 3, 20263 Views
      Our Picks

      AI Bosses Brief the UN Security Council Today. Two of Them Were on Opposite Ends of the Same Breach.

      September 23, 2026

      Garmin’s Q3 2026 Update Adds Fall Detection and Voice Control, and Coverage Isn’t Even

      September 23, 2026

      Apple Touched $5 Trillion, Then Gave It Back. The Phone It Is Betting On Does Not Ship Until October.

      September 23, 2026

      Subscribe to Updates

      Get the latest creative news from FooBar about art, design and business.

      HEICJPG.online - Convert HEIC to JPG online
      Facebook
      • About Us
      • Contact us
      • Privacy Policy
      • Disclaimer
      • Terms and Conditions
      • Editorial Policy
      • Cookie Policy
      © 2026 GeekBlog

      Type above and press Enter to search. Press Esc to cancel.