URL redirection split tests are available only in the Graphic editor and Code editor, not in PBX.
http://mywebsite.com/SubscriptionA.html
http://mywebsite.com/SubscriptionB.html
The pages are accessible via your website. With Kameleoon, you can A/B test these two pages and analyze their performance and results.
Simple URL redirection
Launch the Kameleoon Graphic editor or Code editor as usual, then set up URL redirection for a variation:- In the Graphic editor, add a new variation, or select an existing one, then click the three dots next to the variation’s name and select Redirection URL from the dropdown menu.
- In the Code editor, click the chevron next to Add variation and select URL redirection.

Kameleoon Web Experimentation performs redirections using JavaScript. If you prefer to perform URL redirection with the HTTP response status code 302, use Kameleoon’s Feature Experimentation solution and an SDK.
- Consistency in user experience: Redirecting the original variation ensures that all users experience the same treatment, whether they see the control or a variant. Without this redirection, users in the original variation may experience slight delays or differences due to how Kameleoon serves variations, which could introduce bias into the test results. See section 9 of this article for more information.
- Accurate data collection: In redirection-based tests, failing to redirect to the original variation could cause discrepancies in how Kameleoon measures interactions. For example, visitors to the original page may not experience the same tracking and reporting systems as those on the redirected variation, leading to incomplete or skewed data (see section on SRM).
Global redirection
Global redirection is a simple URL redirection without further parameters.
http://www.website/page1
to:
http://www.website/page2
You can also choose to include any query parameters in the redirect. For example, if you redirect users from https://www.example.com/products?category=shoes to https://www.example2.com/products, Kameleoon passes the query parameter category=shoes along to the redirection URL (https://www.example2.com/products?category=shoes).
Redirection by parameter
If you want to use the same URL but with extra parameters, select Redirection by parameter. Indicate the parameters to add at the end of the URL. This option can be useful if you want to change the default sorting of results on a product page, for instance. Repeat this operation for every variation you want to test, indicating which URL each variation should redirect visitors to.URL redirection on several pages
When a split URL A/B experiment runs on several pages (for example, every product information page), you need more features than the Redirection URL panel offers. You often must manage the redirection with custom JavaScript code. Say, for instance, you want to redirect every visitor accessing the following pages:http://mywebsite.com/product/sheet/technology,product,id.aspx
to these pages:
http://mywebsite.com/product_AB/sheet/technology,product,id.aspx
The technology, product, and ID parameters change according to the product information page displayed. To run this test, you must write JavaScript code to account for every possible case. Here is an example:
http://mywebsite.com/product/sheet/
Running a split URL A/B experiment on several pages implies that you don’t manage elements of identification as parameters, but directly in the URL. The page type isn’t
category.php?product= but /category/product.html.URL redirection and consent policy
When Kameleoon performs a redirection, it temporarily stores certain data (such as the variation ID) in the visitor’s browser to ensure proper tracking after the redirection completes. However, you can’t store data before a visitor provides consent, so run redirect experiments only for users who have given their consent, using the following JavaScript targeting condition in your experiment’s configuration:return Kameleoon.API.Visitor.experimentLegalConsent || false;
If you choose to run the experiment for users who haven’t provided their consent, Kameleoon temporarily stores the variation ID in session storage to maintain the initial allocation when the user reloads the page.
URL redirection and third-party analytics tools
Impact on custom analytics integrations
When using a custom analytics integration in a redirection experiment, Kameleoon doesn’t send data when it initially targets the visitor, since the analytics tool may not have enough time to load before the redirection occurs. To ensure accurate tracking, Kameleoon stores the data in the browser before redirection, then sends the data after redirection (on the variation page), which ensures analytics tools receive the correct information while still allowing redirects to occur smoothly (without flickering).Impact on referrer tracking
When Kameleoon performs a redirection, third-party analytics tools lose access to the original referrerdocument.referrer.
For example, if a visitor arrives at your website via a paid Facebook campaign but Kameleoon immediately redirects them to a variation, the referrer recorded is the original page (before redirection), not the Facebook campaign. Facebook campaign → original page (before redirection) → variation page (after redirection)
As a result, Google Analytics 4 (GA4) always records the page’s original version as the referrer when Kameleoon redirects visitors to a variation.
To retrieve the correct referrer, you can either check the data in Kameleoon or use Kameleoon.Gatherer.Referrer.obtain() on the variation page and save the value in a custom variable on your side to ensure you capture the correct referrer (Facebook campaign, for example).
URL redirection and sample ratio mismatch
Even though Kameleoon automatically redirects the original variation, conducting experiments involving URL redirects increases the likelihood of encountering an SRM. SRM occurs when visitors redirected to variant B fail to see the page or when data collection only takes place after page B loads. SRM results in a certain amount of data loss in variant B that would not be present on the original page. To address SRM, follow the SRM guidelines.When configuring your experiment with a traffic allocation of original 0%, control 50%, and redirection 50%, ensure you define the new control as the reference in the Results page.
How to QA URL redirection experiments
Before you launch a split URL experiment, verify that it targets visitors correctly and redirects them to the intended variation URL.- From your experiment’s Graphic editor or Code editor, click Simulate to open the simulation in a new browser window. For a full walkthrough of the simulation panel, see Simulate a campaign.
- In the Preview tab of the simulation panel, use the variation selector to choose the variation you want to test, then turn on Force display.
- Check that the browser navigates to the URL you configured for that variation, including any query parameters you expect the redirect to carry over.
FAQ
Why is there unequal traffic distribution in your split URL experiment?
Why is there unequal traffic distribution in your split URL experiment?
You might notice discrepancies between Kameleoon and third-party tools regarding split URL experiment traffic.Reasons for these discrepancies include:
- Kameleoon script missing on variation B: You must install the Kameleoon snippet on the new page (URL B) to track visits and conversions correctly. If the script is missing, Kameleoon might still show some data from tracking calls sent just before redirection.
- Bounce rate metrics: Kameleoon sends tracking data either before or after redirection. High bounce rates can cause discrepancies between tools.
- Consent policy: If you set your consent policy to Required, follow the URL redirection and consent guidelines for accurate metrics.
Do URL redirection experiments affect SEO?
Do URL redirection experiments affect SEO?
If you’re concerned about the impact of redirection experiments on your website’s SEO, or if search engines de-indexed your webpages after you started your experiments, see Does Kameleoon affect SEO?.