Setup and data
How to A/B test your website when analytics does not run the test
How to A/B test a website: one change, a random split, one conversion event, and a significance check. CrispStats does not run the experiment.
The CrispStats team · · 9 min read
In short
People search for how to A/B test a website and land on tools that host the experiment. This product is not one of them. CrispStats does not run experiments: there is no variant assignment, no experiment report, and no button that declares a winner. What it can do is count an event you send, including an event that names the version. The test itself is yours.
This page is the test, in the smallest form that still means something: one change, a split, a conversion event, and a reading of statistical significance. The short definition of the method is A/B testing. The arithmetic is the A/B test significance calculator. Links that differ only by version are the A/B test URL generator.
How do you A/B test a website?
You A/B test a website by showing two versions of one change to two groups chosen at random, counting one conversion on each group, and comparing the rates only after you have the sample you planned. If the groups are not random, or you changed several things, a difference is not evidence the change caused it.
Four pieces, and you need all of them:
- One change. A single difference between version A and version B.
- A split. Each visitor is assigned at random, and sees the same version on later visits during the test.
- A conversion event. One action, chosen before the test, that decides it.
- A significance reading. The two rates compared at the end, not every day until one of them looks good.
Analytics sits on the third and fourth pieces only if you send it the counts. It does not perform the split. A testing tool is the usual place the split lives. If you assign the version in your own code, you still own that assignment, and you send the outcome into analytics as an ordinary event.
What should the one change be?
The one change should be something a visitor could point at: the headline, the primary button’s label, whether a field is required, which of two prices is shown. It should not be a redesign that also moves the form, the proof points and the navigation.
Write it down as ‘A is this, B is this, and nothing else differs.’ A/B testing is explicit that a winning version does not tell you which of five edits did the work. If you cannot say the change in one clause, you are not ready to split traffic. Fix a broken page as a fix. A test is for a difference you are unsure about, not for a bug you have already seen in the error log.
How do you split visitors?
You split visitors by assigning each new visitor to A or B at random, usually half and half, and storing that assignment so the next page and the next visit in the test show the same version. The assignment has to happen before they can convert, and it has to be independent of the thing you are measuring.
CrispStats does not do this. A testing tool does, or your application does. What matters for the later reading is that the two groups are the same kind of visitor, separated only by the change. Do not send paid traffic only to B, and do not let people pick the version. Do not change the split ratio halfway because one side looks ahead. For a test that is two links, an ad and an email for example, the split is which link you hand out, and the URL generator keeps the tags identical except for the version name.
- On a page you control. The testing tool, or your own assignment, renders A or B. Both groups are on the same URL unless the page itself is the change.
- On a link you hand out. One campaign, two contents. The generator writes those URLs. The page they open should be the same if you are testing the message rather than the page.
- Across days. The assignment has to stick for the length of the test. A visitor who sees A today and B tomorrow is in both groups, and the comparison leaks.
What should the conversion event be?
The conversion event should be the action the change was meant to affect, chosen before any counts come in, and it should be one event. A signup, a purchase, a booked demo. Not a list you will pick from afterwards.
Send it as a custom event or a goal, and include the version as a property or as the link’s content tag, so the two groups can be counted apart. Picking the metric after you see the data is how a test finds a winner by chance: with enough events, one of them will look special. How to calculate conversion rate is the rate, conversions divided by visitors in that group. Use visitors who were in the test, not every visitor on the site.
Do not put names, emails or other personal data on the event. The version name and the fact of the conversion are enough. If the thing you care about is several steps later, a funnel can show where each version dropped, but the test still needs one deciding event or you will not know when to stop.
How do you tell a real difference from chance?
You tell a real difference from chance with a significance test at a sample size and a confidence level you set before the test, not by noticing that B’s rate is higher. The A/B test significance calculator runs a two-proportion z-test and returns the p-value, the relative difference and an interval. Statistical significance is what that p-value is: the chance of a gap at least this large if the two versions were actually the same.
Example. A headline test, with made-up counts so the columns are concrete. This is not a result to expect, and it is not a winner.
| Row | Control | Variant |
|---|---|---|
| Visitors | 8,000 | 8,000 |
| Signups | 240 | 264 |
| Signup rate | 3.0% | 3.3% |
240 ÷ 8,000 is 3.0%, and 264 ÷ 8,000 is 3.3%. The relative difference is 10%. The calculator’s own sample-size table says that detecting a move from 3% to 3.3% (a 10% relative change), at 95% confidence and 80% power, needs 53,211 visitors per version. This example has 8,000 per version, so it is far short of that test. You would not call it, whatever the p-value looks like if you peek. Set the sample in the calculator first, run until you have it, and read once. The calculator page also shows a fully worked p-value on a different pair of counts. Use that worked example for the arithmetic, rather than treating the table above as a verdict.
What does a result that is not significant mean?
A result that is not significant means you have not shown a difference at the bar you set. It does not mean the two versions are equal, and it does not mean the change was a waste, if the test was smaller than the effect you hoped to see.
Read it in that order. If you reached the planned sample and the interval includes ‘no difference’ plus only tiny lifts, you have evidence the change is small or absent, and you can leave the control in place. If you stopped early, you have learned little: the effect may be real and the test too short. Statistical significance also separates significant from important. A huge sample can make a trivial gap significant. Ship a change because the difference is large enough to matter, not only because the p-value cleared 0.05.
Does CrispStats run the experiment?
No. CrispStats does not run A/B tests, does not split traffic, does not assign variants, and does not mark a winner. There is no experiment feature to turn on. If a page, a comparison or a settings screen seems to imply one, it should not: counting is the whole of what the product does here.
What you can count is the outcome of a test you run elsewhere. Send a custom event when a visitor converts, with the version as a property, and the events report lists visitors per property value. That property has to come from your testing tool or your own code. For link tests, tag each version with utm_content and filter goals and funnels by that tag. Put the two visitor counts and the two conversion counts into the significance calculator. The product will not compute the p-value for you.
How do you test two links rather than two pages?
You test two links by giving them the same source, medium and campaign, and a different content value for each version, then filtering analytics to that campaign and splitting by content. The A/B test URL generator writes those URLs: the variant name becomes utm_content, the other tags are shared, and values are lowercased so two spellings do not become two tests.
Use that for an ad, an email or a partner post, where you control the link and both versions should open the same page unless the page is the thing under test. Do not create two campaigns. Two campaign names split one test across two rows you then have to add up. On-site headline tests are not this case: the generator does not assign a version to a visitor who typed your address. Those visitors need the split described above, in a testing tool or in your site, and the product still only counts the event.
Terms in this guide
Free tools
- A/B test significance and sample size calculatorCheck if an A/B test result is statistically significant, with the p-value and lift, or work out the sample size a test needs before you start it.
- A/B test URL generatorBuild one tagged URL per variant of a test. The variants share source, medium and campaign, and each gets its own utm_content.
- UTM builderBuild UTM-tagged links one at a time or in bulk from pasted rows, with presets, checks for capitals and spaces, CSV export and a channel preview.
Use cases
More guides
All guides- Revenue · 11 minHow to calculate conversion rate, with worked examplesConversion rate is conversions divided by visitors, times 100. Worked examples for funnels, delayed conversions, channel mix and how many visitors you need.
- Revenue · 11 minConversion funnel analysis: how to find the step where visitors leaveA conversion funnel is the ordered steps to a goal. How to define one, read step and overall conversion, pick the step to fix, and avoid the usual mistakes.
- Engagement · 9 minHow to track button clicksGA4 does not track button clicks by default. Three ways to add them: a gtag call, a Tag Manager trigger, or one HTML attribute, with the steps for each.