Glancygrowth analytics
UnderstandImproveMonitorReplace your stackPricing
Log in
Getting started
  • Introduction
  • Quickstart
  • Events, users and sessions
  • Turning features on and off
SDKs
  • Script tag (glancy.js)
  • JavaScript (npm)
  • Next.js
  • React Native and Expo
  • iOS and macOS (Swift)
  • Android and JVM (Kotlin)
  • WordPress
  • Segment
  • Content Security Policy
Understand
  • Overview, real time and reports
  • Saved reports and dashboards
  • Session replay and heatmaps
  • Ad attribution
  • Ask AI
Improve
  • A/B testing
Monitor
  • Performance (web vitals)
  • Errors
  • Uptime
  • Monitoring and notifications
Data and privacy
  • Integrations and Shopify
  • Autocapture and actions
  • Ad conversions (Meta, Google Ads, TikTok, Taboola)
  • Privacy and your data
  • Cookie banner and consent
Account and reference
  • Organizations, people and usage
  • HTTP API

A/B testing

A/B testing comes with the Pro and Enterprise plans, with 1M test views (Experiment Viewed events) a month on Pro and a custom number on Enterprise (Plans). On other plans, the A/B testing page says which plans include it.

Show different versions of a page to your visitors and see which one converts better. A test is one of two types:

  • Changes on a page: you change the page visually, on your own site, for each variant: no code and no new deploy.
  • Split URL: each variant is a page of its own (say /landing against /landing-b), and visitors are sent to their variant's page. Use it for redesigns, a new landing page or a different checkout flow, where the versions already exist as separate pages. See Split URL tests.

#Create a test

  1. Turn A/B testing on in Setup → Features, then open A/B testing (in the sidebar, under Improve). You can prepare tests while it's off; none runs on your site until it's on.
  2. Click New test. Give it a name, pick the Type (Changes on a page or Split URL), the Page to test (its full address, e.g. https://your-site.com/pricing; for a split URL test, the Original page), the Goal (the event that counts as a conversion, like Signed Up or Order Completed) and its Versions:
    • The Original (your page as it is today) is always first, then Variant B. Add variant adds C, D and E, up to 4 variants; ✕ removes one. For a split URL test, enter each variant's page under its name.
    • Click a name to rename it, e.g. Price first. Names show in the editor and the results.
    • Each version's % is its share of the visitors, shown in the bar below. With Split equally (the default) every version gets the same share, also as you add or remove them. Choose Custom to set each share: change one and the others adjust so they always add up to 100%.
  3. For changes on a page: on the test's page, click Edit on site. Your page opens in a new tab with the Glancy editor in the corner. A split URL test has no editor: its variants are your pages as they are.

#The visual editor

A bar across the top of the page shows you're in Glancy's A/B test editor, which test and which variant you're editing; nothing you change reaches visitors until the test starts. Hide tools hides the editor and Glancy so you see the page as your visitors will (click it again to bring them back), – makes the bar smaller and Exit editor closes the tab (everything is already saved).

  • Pick a variant at the top of the editor (Original is the page as it is today and can't be changed).
  • Click Select an element, then click any text, button, link or image on the page. Links don't open while you select.
  • Under Content, switch between Text and HTML and edit it; the page updates as you type. HTML works for any element (a heading, a list, a whole section), as long as it has no scripts or event handlers (onclick…).
  • Add HTML next to it puts new HTML Before or After the element, such as a "Best seller" badge or a note under a button.
  • Change its Link, or Hide element.
  • Images: click an image and Upload image from your computer (PNG, JPEG, WebP or GIF; big photos are scaled down to 2000 px wide), or paste an Image URL, and set its Alt text. Glancy hosts uploaded images for you. Responsive images (srcset, <picture>) switch too. For any other element, Background image sets or replaces its background the same way.
  • Style shows the element's current look: Text color, Background, Font size, Weight, Align, Corners, Padding, Margin, Border and Opacity. The page changes as you edit; anything else goes in More CSS. What you've changed in this variant is marked with a dot, and Reset styles undoes it.
  • Click Apply to keep the changes, or Cancel to put the element back.
  • Drag the editor by its top bar to move it out of the way; it stays there while you browse.

Ask Glancy: Glancy, the mascot, waits in the bottom left corner and asks if you'd like a hand. Click it and say what you want to try, for example "Make this button green and say Start now" or "Write a stronger headline", or pick one of its ideas. With an element selected, it works on that one. It answers with advice and a list of changes; untick any you don't want and click Add to the variant. It uses the Ask AI key in your Glancy account (Account settings → Ask AI); without one, Glancy says so as soon as the editor opens, with an Add a key button. Add it, then open the editor again from Glancy.

  • Custom CSS for this variant adds a stylesheet, for changes across the page.
  • Every change is saved to Glancy as you make it and listed in the editor; ✕ removes one. Switching variants shows the page as that variant's visitors will see it.
  • You can browse to other pages: the editor stays with you in that tab until you close it. The link works for 4 hours; open it again from Glancy after that.

#Split URL tests

In a split URL test, visitors who come to the Original page (or any page under Runs on) are split between it and the variants' pages. Each variant's page is set on the test's page, under Variants: a full address (https://your-site.com/landing-b) or a path (/landing-b). It must be on the same site as the original, so visitors keep the same Glancy id, and it can't be a page the test runs on (they'd be sent on again).

  • The visit's details come along: the query string of the page they came to is added to the variant's page, so UTM tags and ad click ids (gclid, fbclid…) still credit the visit to its campaign. When the variant's address sets a parameter itself (/landing-b?layout=2), its own value wins. A #section comes along too.
  • Page views count once: a visitor sent to a variant's page is counted on that page only, never on the original they didn't see, and the page view keeps the referrer they arrived with (Google, an ad…), not the original page. Experiment Viewed is sent from the page they actually see.
  • No flash of the original: with the Next.js provider and withGlancy(), visitors are sent on by your server before the page loads. With the script tag, the WordPress plugin or the JavaScript SDK, they're sent on as soon as Glancy starts; add the anti-flicker snippet to the original page so it doesn't show for a moment.
  • Every variant's page needs Glancy on it too, so it counts the visit and the goal.
  • Visitors keep their variant: someone sent to /landing-b once is sent there every time they come to the original.

Split URL tests need glancy.js (always up to date), the WordPress plugin, or version 0.5.0 or later of the npm SDKs (@caravela-studio/glancy-web, @caravela-studio/glancy-next). Older SDK versions show everyone the original and don't count them.

#Avoid flicker

glancy.js loads after your page, so for a moment visitors can see the original before a variant's changes apply or before they're sent to a variant's page. To hide the page until Glancy is ready, put this in the <head> of the pages you test, before anything else:

<style id="glancy-wait">body{opacity:0!important}</style>
<script>setTimeout(function(){var s=document.getElementById("glancy-wait");if(s)s.remove()},1000)</script>

Glancy shows the page as soon as the tests are applied (or nobody is being sent elsewhere), and never later than one second, even if Glancy can't load. Keep it to the pages under test: on other pages it only delays them. With a Content Security Policy, give both tags your nonce.

#Run it

Back in Glancy, check the Setup:

  • Runs on: where the test applies. A path, where * matches anything (/products/*). Empty: only the page you edited (for a split URL test, the original page).
  • Visitors in the test: the share of visitors who take part. The others see the original and aren't counted.
  • Variants: each one's share of the test's visitors (they add up to 100%).

Then click Start test. Each visitor always sees the same variant, on every visit. Pause stops showing the variants for a while (everyone sees the original) and Resume picks up again; End stops the test for good. Once a test has started only its name and goal can change, so results stay comparable: Edit on site becomes Preview on site, which shows each variant on your page without changing it (a split URL test links to each variant's page instead).

#Results

The list of tests shows how each one is going: its visitors, the version ahead and by how much (or the winner, once it's significant at 95%), the chance it beats the original, how far it is through the sample it needs to detect a 10% lift, and a warning when the traffic split is off. Open a test for the full results.

Every time someone sees a page in a test, Glancy sends an Experiment Viewed event with experiment_id, experiment (the name) and variant (control, b, c…). You can use it in any report, for example to break a funnel down by variant.

The Results on the test page start with a verdict: a version that converts better (or worse) with the confidence you picked, or how many more visitors (and about how many days) the test needs. Then, per version:

  • Visitors: people who saw it (someone who saw it twice counts once), and their share of the test next to the share you set.
  • Conversions and the conversion Rate, with the range it's likely in (its confidence interval).
  • vs original: the lift over the original, with its likely range. A range that crosses 0% means no clear difference yet.
  • p-value: how likely a difference this big would be if the versions converted the same.
  • Chance to beat the original, and the Result: Significant win, Significant loss or Not significant.

Pick the Confidence (90%, 95% or 99%) and the Effect to detect (the smallest lift you care about, 10% by default): Glancy shows the visitors each version needs to detect it, the visitors per version per day so far and how long the test has been running. A version only counts as significant with at least 100 visitors and 10 conversions. Decide how long to run before you start, and avoid stopping as soon as a result turns significant: peeking early makes false wins more likely.

Traffic split checks that visitors divide between the versions as set. When they don't (a sample ratio mismatch), something is keeping some visitors from being counted in one version, like a redirect or a page that breaks, and Glancy warns you to treat the results with care.

Conversion rate over time draws each version's cumulative rate by the day people first saw the test, to see whether a difference holds or was a blip.

With the Cookie banner on, only visitors who accepted cookies take part in tests; the others see the original page.

#With Ask AI

At the top of A/B testing, Create a test with Ask AI takes what you want to improve in your own words (and, optionally, the page) or one of its ideas, and opens Ask AI with it. You can also ask Ask AI (⌘J) from anywhere: it sets up tests and reads their results. Ask in your own words, for example "Set up an A/B test on our pricing page to get more orders" or "How is the headline test doing?". It picks the goal from your events, suggests the variants and why, and shows a card with Create: the test is created as a draft, and nothing changes on your site until you edit the variants (Edit on site) and click Start test. Ask for a split URL test when you have the pages to compare ("Split test /landing against /landing-b"): the card shows each variant's page. If you tell it the exact change ("make the h1 say From 9 EUR a month"), the variant already carries it. Asked about results, it says whether there's a clear winner or the test needs more visitors.

A/B testing runs on your site through the script tag, the WordPress plugin or the Next.js provider, with nothing else to install; with the JavaScript SDK, pass settings: true. Turning a test on reaches your site within a few minutes.

#Allowance

Each view of a test (an Experiment Viewed event) counts against your plan's monthly test views, shown in Settings → Usage. Test views aren't billable events. Once the allowance is used up, new views aren't stored until the next month, so results stop growing for the rest of it.

Previous
Ask AI
Next
Performance (web vitals)
On this page
  • Create a test
  • The visual editor
  • Split URL tests
  • Avoid flicker
  • Run it
  • Results
  • With Ask AI
  • Allowance
Log in