Unlike a classical A/B test, during an A/B test with URL redirection, the different versions of the page to test are developed and hosted on your web server. Therefore these versions are accessible on your website.
Let's take the following example: you have two inscription pages you would like to test. Here are their URLs:
These two pages are accessible from your website. Kameleoon will allow you to A/B test these two pages to analyze their performances and results.
Simple URL redirection
Launch the editor on your website, like for a classical A/B test. Create one variation by page to test.
Click on one of your variations to open the variation action menu. Then, click on the "Redirect to a URL" button.
A pop-in opens. Here, you will be able to configure your URL redirection for the selected variation. There are two kind of redirections: "Global redirection" and "Redirection by parameter".
Global redirection is a simple URL redirection, without any further parameter.
In the example above, to create the two versions of the inscription page, we should use this redirection.
Redirection by parameter
If you want to use to the same URL but with extra parameters, use the "Redirection by parameter" option.
Indicate the parameters to add at the end of the URL. This option can be used, for example, to try out other sorting options by default on your product result pages.
Repeat this operation for every variation you want to test, indicating for each one which URL visitors have to be redirected to, instead of the original.
Advanced URL redirection
URL redirection on several pages
For instance, we wish to redirect every visitor accessing the pages:
var url = window.location.href; var redirect_url = url.replace("/product/", "/product_AB/"); Kameleoon.API.processRedirect(redirect_url);
Note: running a split URL A/B test on several pages implies that elements of identification are not managed as parameters but straight in the URL. For instance, it will not be a page
URL redirection to another domain
Add the following line and write the URL between quotes:
For a split URL test redirecting to another domain, it is necessary to fill the
true,parameter, letting Kameleoon know that the redirection will be to another domain. When this parameter is equal to
true, Kameleoon Kameleoon will add this parameter at the end of the URL:
before redirecting the visitor to the new page (
XXX is the identification of the A/B experience the visitor is having and
YYY is the variation chosen by Kameleoon. This parameter will be use to inform your web analytics solution which variation is seen by the visitor.
Indeed, the visitor is redirected very soon, when the page is not loaded yet and often before the analyze of your web analytics solution. When Kameleoon detects this parameter, it gives to your web analytics solution the missing information letting it know which variation was visited, information needed in order to analyze the results of the A/B test.