Redirect Experiments

How to build a Redirect Variation in an Experiment

If you want to redirect to another URL in one variant, you can use a helper function. You can read about how these functions are used in general here:

Redirect URL Test / Split Test

Let's assume, for example, that the experiment runs on a page with the URL
In the variant a redirection to the page should take place.
All you have to do is use the following function in this form:


Tip Please note that it does not make sense to wait for domReady or other things here to prevent flickering.


What happens to parameters/queries?

If only the target URL is passed to the function, the GET parameters of the source URL are adopted.
If there are identical parameters in both URLs, the parameters of the target URL are used.

It is also possible to prevent the transfer of parameters. A second parameter is used for this function call (and takes a false as value):

ablyftTools.redirect('', false);

It's the same with Hashes ("#").