With A/B testing, you can test websites in more than one version. Say you have a site in multiple languages, or a site that runs both in a staging and a production environment. The website should – apart from the language differences, or the technical limitations of the different server environments – behave pretty much the same, right? Here we’ll tell you how you can set up Ghostlab to compare various versions of your site in a synchronized session.
You can find the A/B Testing section in the Site settings. It allows you to define any number of testing scenarios, each specified by a name of your choosing and a combination or individual instance of the parameters Protocol, Host, Path and Query parameter.
Why so complicated, you ask? Well, we wanted to make sure that the A/B Testing mechanism is as flexible as possible. We’ll cover two basic examples here, showing you how scenario specification works, and the describe the Test case control in detail.
1. Only specifying a path
This is useful if, say, you want to compare two language versions of a site. Let’s take the Apple site – the Swiss version offers two languages, German and French. The German version URL is
https://www.apple.com/chde/, and the French version URL is
We’ll set up the site using the German version URL, and add the French version as our test case French, specifying the path as
chfr/. The we start the server and connect two clients. In the client list, you will see a little dropdown on each client that lets you specify the test case the client is working on. By default, it’s the Main site. The screenshot below shows you the example just described.
2. Specifying protocol and host
First a little background. For a client, we recently had to compare a staging and a live environment after a massive content update that was manually transferred. Basically, we had to make sure that the text in the live environment was exactly as in the staging environment, since the texts had been checked and given green light on staging. We’ve tested the A/B feature for this while it was still in development, and it made the task super easy: we had two same-sized browser windows next to each other, one pointing to the live site, one pointing to production, synchronized through Ghostlab. We navigated the whole page, scrolling down on each content page – the visual differences were easy to spot, so we were able to do the task in one go without switching between browser windows or actually reading the whole text word by word.
To configure such a scenario, do the following. Create a site for the live environment, in our case,
https://anleitung.kalkbreite.net. Then create an A/B test case for staging – in our case, that was something like
http://our.secret.staging:8080/. Note we have a different protocol and host. If the protocol were the same, you would still have to specify it – when pointing to a different host, you always need to specify both protocol and host. You could add a path and query parameters, but in our case, that wasn’t necessary. See the screenshot below of how the test case looks in the Site settings.
3. The test case control
The test case control allows you to input either:
- protocol + host
- protocol + host + path
- protocol + host + query parameter
- protocol + host + path + query parameter
- query parameter
- path + query parameter
It will warn you if something mandatory is missing (e.g. protocol for host or), the control will warn you.