Cohoon Consulting - Get Online and Grow.

Cursor skill demo · · 7 min read

A/B Testing Your Own Website Without Mixpanel, Optimizely, or a SaaS Subscription

Most A/B testing tools cost $100–$300 a month and want you to pipe your visitors through their servers. You don’t need any of that. A real A/B test on your own site takes about 15 lines of JavaScript and a GA4 account you already have.

The case against bolt-on testing tools

Tools like Optimizely, VWO, and Mixpanel are great if you’re a SaaS company with millions of visitors and a dedicated growth team. For a local business in Oakland or Genesee County, they’re overkill in three specific ways:

  • Cost. The cheapest real plans start around $100/month and balloon fast. That’s $1,200+/year for a feature most small business sites use once or twice.
  • Data ownership. Your visitor data flows through their servers. If you cancel, the data history goes with them.
  • Page speed. Each tool adds a script that loads before your site renders. That delay alone can wipe out the conversion gains a test was supposed to find.

A small business doesn’t need a full experimentation platform. It needs to answer one question: “Which version of this button gets clicked more?”

The two-line idea behind every A/B test

Strip away the marketing and an A/B test is just three steps:

  1. When the page loads, flip a coin to decide which version the visitor sees.
  2. Remember which version they got (so they don’t see a different one on refresh).
  3. Log the result to GA4 when they take the action you care about.

That’s the whole thing. Everything else is interface.

A real example — testing two CTAs on a contractor’s site

Say you’re a contractor in Waterford and your main call-to-action button currently says “Request a Quote.” You suspect “Get a Free Estimate” would convert better. Here’s the actual code that drops into the bottom of your page:

// Pick variant once and remember it in localStorage let variant = localStorage.getItem('cta_variant'); if (!variant) { variant = Math.random() < 0.5 ? 'A' : 'B'; localStorage.setItem('cta_variant', variant); } // Swap the button label based on variant const btn = document.querySelector('#main-cta'); btn.textContent = variant === 'A' ? 'Request a Quote' : 'Get a Free Estimate'; // Log the variant view to GA4 immediately gtag('event', 'ab_view', { variant: variant, test: 'cta_label' }); // Log the click when it happens btn.addEventListener('click', () => { gtag('event', 'ab_click', { variant: variant, test: 'cta_label' }); });

That’s 15 lines. Drop it on the page, push to production, walk away for two weeks.

How to read the results in GA4

GA4 stores those custom events. After your test runs long enough to gather a couple hundred clicks per variant, you can pull the report:

  1. In GA4, go to Reports → Engagement → Events.
  2. Filter to ab_view and ab_click for the same test name.
  3. Divide clicks by views per variant to get the conversion rate.

The math:

VariantViewsClicksConversion
A: “Request a Quote”420143.3%
B: “Get a Free Estimate”438235.3%

Variant B wins by 60%. You delete the test code, hardcode the winning copy, and move on. No tool, no subscription, no vendor.

What to test (and what not to)

For a local business site, A/B tests tend to pay off in three places:

  • The main CTA button label and color. Big wins are common here.
  • The hero headline. The first thing visitors see often makes or breaks engagement.
  • Form length on lead capture pages. Three fields vs. five fields can dramatically shift submission rates.

What’s usually not worth the time: button colors that aren’t the primary CTA, font choices, micro-copy on confirmation screens, anything below the fold that fewer than 30% of visitors see.

One more thing worth knowing

The reason “run your own A/B tests” isn’t a more common pitch is that the testing-tool industry doesn’t have an incentive to tell you it’s this easy. The reality is, for a local Michigan business answering “does headline A or headline B pull more calls,” the entire problem fits inside GA4 and a snippet of JavaScript.

If you want help wiring up your first test — or you’re curious whether your hero copy is actually pulling its weight — book a free conversation and we’ll pick one experiment to run on your site this month.

No tools, no subscriptions

Run real experiments on your own site — without renting a SaaS

I’ll show you how to wire your first A/B test and read the results in GA4. Free conversation, no pitch.