Squarespace A/B testing
Two headlines.
One honest winner.
Squarespace has no built-in A/B testing for pages. To split test a Squarespace page you either duplicate it and run the two versions one after the other, or add a testing tool’s script through Code Injection, which needs a Core, Plus or Advanced plan. Google Optimize, the free tool older guides still recommend, closed on 30 September 2023. Below are both methods step by step, a calculator that says whether your result is real and how many visitors you need, and how Builderify A/B Testing runs on Squarespace.
By the Builderify team
Does Squarespace have
A/B testing?
Not for pages. There is no setting that shows half your visitors one version of a page and half another, and no report that compares them. The closest thing is in Email Campaigns, and even there Squarespace’s own help describes doing it by hand: two mailing lists, two drafts with different subject lines, one sent to each.
What Squarespace does give you are the parts to build a test from: duplicate pages, a switch to hide a copy from search, and Code Injection for a testing script. The table lists each one and what it can and can’t do.
| Feature | Built in? | What it means for testing |
|---|---|---|
| Page A/B testing | No | No random split, no variant report. You need one of the methods in section 02. |
| Email subject tests | Manual | Split your list in two, send two drafts and compare the analytics yourself. |
| Duplicate page | Yes | Gear icon › Duplicate Page. The copy lands in Not linked with a numbered slug, like /about-1. |
| Hide page from search | Yes | Gear icon › SEO › Hide page from search results adds noindex, so the copy doesn’t compete with the original. |
| URL mappings | Yes | 301 and 302 redirects, applied top to bottom. They send everyone the same way; they can’t split traffic. |
| Code Injection | Core, Plus, Advanced | Where a testing tool’s script goes. Not on Basic, not on checkout pages, and Squarespace support won’t troubleshoot custom code. |
| Google Optimize | Closed | Google ended Optimize and Optimize 360 on 30 September 2023. Old tutorials that use it no longer work. |
Checked against Squarespace’s and Google’s help pages on 3 October 2026; each is linked in the sources at the end.
How to A/B test
a Squarespace page.
There are two methods that work today. The first is free on any plan but isn’t a true A/B test, because the versions never run at the same time. The second is a real split test and needs a plan with Code Injection.
Duplicate the page and take turns
- 1 Open the Pages panel, hover over the page, click the gear icon and choose Duplicate Page, then Confirm. The copy appears under Not linked.
- 2 Change one thing on the copy: the headline, the button label or the offer. One change, or you won’t know which one mattered.
- 3 In the copy’s gear icon, open SEO and switch on Hide page from search results, so the two pages don’t compete in Google.
- 4 Run version A for a whole number of weeks. Then point your navigation and buttons at the copy and run B for the same length of time.
- 5 Compare the visitors and conversions of each period in the calculator below.
Add a testing script with Code Injection
- 1 Copy your testing tool’s script tag. It has to load early, before the page paints, or visitors see the original flash before the change.
-
2
In Squarespace, go to Pages › Custom Code › Code Injection (Website Tools on version 7.0), paste it at the top of the Header field and save. Header code goes into the
<head>of every page. - 3 In the tool, pick the page, make the change in its editor and set a goal, such as reaching the order confirmation page or clicking the button.
- 4 Start the test. Each visitor is assigned A or B at random, keeps it on later visits, and the tool counts conversions for both at the same time.
- 5 Stop at the sample size you planned, not the first day it looks good.
/safe after /config in the editing URL to load it without custom code.
Why not redirect half the traffic with URL mappings? Squarespace applies mappings from top to bottom and sends every visitor the same way, so there is no way to split them. That is the job a testing script does.
Is your Squarespace A/B test
result significant?
Enter what each version got. The calculator runs the same test Builderify uses and, like Builderify, won’t call a result until each side has at least 100 visitors and 10 conversions.
- Lift, B vs A
- +25.0%
- z-score
- 2.41
- p-value
- 0.0159
- Confidence
- 98.4%
B beats A at 98.4% confidence (p = 0.0159).
Round up to whole weeks, so weekdays and weekends count equally.
The test
A pooled two-proportion z-test. Conversion rates pA and pB, pooled rate p, and z = (pB − pA) ÷ √(p(1 − p)(1/nA + 1/nB)). Significant when |z| ≥ 1.96, which is p < 0.05 two-sided.
The p-value
p = 1 − erf(|z| ÷ √2), with erf from the Abramowitz and Stegun 7.1.26 approximation, accurate to 1.5 × 10−7. Confidence is 1 − p. Lift is (pB − pA) ÷ pA.
The sample size
Per version: n = (1.96√(2p̄(1 − p̄)) + 0.84√(p1(1 − p1) + p2(1 − p2)))² ÷ (p2 − p1)², for 95% confidence and 80% power, with no continuity correction. Never below 100 visitors and 10 expected conversions.
How long to run a split test
on a Squarespace site.
Until it reaches the sample size you set before it started, and at least one full week. Most Squarespace pages get hundreds of visitors a day, not tens of thousands, so the size of the change you test matters more than anything else.
| Current rate | +10% lift | +20% lift | +30% lift | +50% lift |
|---|---|---|---|---|
| 1% | 163,095 | 42,693 | 19,827 | 7,750 |
| 2% | 80,682 | 21,109 | 9,798 | 3,826 |
| 3% | 53,211 | 13,914 | 6,455 | 2,518 |
| 5% | 31,234 | 8,158 | 3,780 | 1,471 |
| 10% | 14,751 | 3,841 | 1,774 | 686 |
Visitors needed per version, at 95% confidence and 80% power. Double it for the whole test, then divide by the page’s daily visitors for the number of days.
Decide the number first
Pick the goal and the sample size before the test starts. A test that stops “when it looks significant” will find winners that aren’t there.
Don’t stop on a good day
Early results swing wildly. Checking daily and stopping on the first green light is the most common way to ship a change that does nothing.
Run whole weeks
Weekend visitors buy differently. Run seven, fourteen or twenty-one days so each version sees every day of the week equally.
Test bold changes
A new headline or offer can move a small site’s numbers. A slightly different button colour needs more visitors than most Squarespace sites get in a year.
A Google Optimize alternative
for Squarespace.
Builderify A/B Testing is method 02 with the parts already built. You open your own Squarespace page in a visual editor, click an element and record a change. Visitors are split at random, keep the version they were given, and the results use the same test as the calculator above.
- 1 In Builderify, open A/B Testing and click Install to copy your site’s A/B tag.
- 2 In Squarespace, go to Pages › Custom Code › Code Injection (Website Tools on version 7.0) and paste it as the first line of Header. Save.
- 3 Create a test, add the page with a URL rule, and make your change in the editor.
- 4 Add a goal and start the test. Results appear once both sides have 100 visitors and 10 conversions.
The tag is about 2KB and carries your running tests inside it, so it decides what to show without waiting on another request. It hides only the elements being changed, never the page, and shows them again within 1.5 seconds even if something goes wrong. Keep data-cfasync="false" on it. If the regular Builderify script is already in your Header, leave it where it is; the A/B tag sits alongside it.
Six kinds of change
Replace an element’s text or HTML, set an attribute such as a link or image, hide it, or insert markup before or after it. Injected markup is sanitised before it is stored.
Sticky assignment
A visitor keeps the version they were given, so nobody sees the page change under them mid-visit.
URL rules and traffic
Run a test on pages that match exactly, contain, start with or follow a wildcard pattern. Choose what share of visitors enters the test, and weight each version.
Goals of its own
Count a visit to a page, a click on an element or a custom event from your own code. A/B goals never depend on User Journey, which tracks goals across the whole site.
The default plan above: 20,634 visitors, each recorded once, plus their conversions. Every account gets 250 free credits a month; page loads with the Builderify widget on them are 10 credits per 1,000. One-time packs start at $9 and never expire. See pricing.
Start freePair a winning page with the popup builder to test offers too, or see A/B Testing in full. More how-tos are in the guides.
Squarespace A/B testing, before you ask.
No. Squarespace has no setting that splits visitors between two versions of a page and compares them. Its Email Campaigns help describes a manual subject-line test: split your list in two, send two drafts and compare the analytics yourself.
Either duplicate the page and run the two versions one after the other, which is free on any plan but not a true A/B test, or add a testing tool's script in Pages, Custom Code, Code Injection, Header. Code injection is available on the Core, Plus and Advanced plans.
Google ended Optimize and Optimize 360 on 30 September 2023, so tutorials that use it no longer work. Any testing tool that installs with a script tag in the Header code injection works instead, including Builderify A/B Testing, which has a visual editor and starts on 250 free credits a month.
It depends on your conversion rate and the smallest lift you want to detect. At 95% confidence and 80% power, a page converting at 4% needs about 10,300 visitors per version to detect a 20% lift. Smaller sites should test bolder changes, which need far fewer visitors.
When a two-proportion z-test gives p below 0.05, which is 95% confidence two-sided. Builderify also refuses to report anything until each variant has at least 100 visitors and 10 conversions, and the calculator in this guide applies the same rule.
Sources
Help pages, read on 3 October 2026.
- Squarespace Help Customize parts of your site with code injection
- Squarespace Help Duplicating pages and content
- Squarespace Help Hiding your site from search results
- Squarespace Help URL mappings
- Squarespace Help Tracking email campaign analytics
- Google Optimize Help Sunset of Google Optimize
- Wikipedia Error function: numerical approximations
Stop losing the visitors
you already paid for.
More leads from the traffic you already have, and follow-up that sends itself. Free to start. No card, no monthly fee.