- Optimizely X Web Experimentation
- Optimizely X Web Personalization
This article WILL HELP YOU:
- Test two landing pages, homepages, or any other pages against each other
- Set up redirect experiments (split URL tests), which redirect visitors from one URL to another
- Ensure that you can track events on both your original and redirect pages
Redirects at a glance
Redirect experiments, or split tests, allow you to compare two separate URLs as variations in an A/B test. For example, you might create a redirect experiment that compares two versions of a landing page.
- Use redirects if your variation code exceeds 200 lines
- Check Redirect with live query parameters included to keep the parameter attached in the variation
- Use goal targeting to track clicks on the redirected variation
- To map and test multiple URLs in a site redesign, use redirect URL mapping
What to watch out for
Sometimes when testing out a major redesign or dramatic change, you may have two entirely separate versions of a page to compare.
For example, you may have two different landing pages or homepages with different URLs. Testing whole pages against each other is a great way to perform deep experimentation.
Redirect experiments work a little differently from other Optimizely experiments, so we've provided a checklist to help you set it up correctly. Use this list to walk through each stage of setting up a redirect:
|1. Basic setup: Create the pages in "Implementation"||Set up the pages|
|2. Create the experiment||Create the experiment|
|3. Set up the redirect: Navigate to the variation and select Redirect||Set up a redirect variation|
|4. Goals: Add metrics to the experiment||Add events as metrics|
We have identified a condition that affects the accuracy of event-tracking for certain types of redirect experiments in Optimizely X Web. This feature is currently under maintenance. Learn whether your redirect experiment may be affected.
1. Set up Pages
When creating your redirect experiments, it's important that you first set up the two pages within your Optimizely account. Pages tell Optimizely where to run campaigns and experiments on your site. The reason you need to create the pages first is so that you can ensure that your metrics are tracked across both pages in your experiment.
For example, you run a retail site called Attic & Button and you want to test one homepage against a new version of that homepage. Your new version of the homepage is hosted on a different URL and has updated branded images as well as new content. You want your visitors to click on the CTA on the homepage that takes them to learn more about the products displayed on the homepage. The metric you want to track is clicks on the CTA on the homepage to those product pages.
You will need to create two pages:
- One page will be where the experiment will run (the original)
- One page that will target both the original and the redirect page with the same metric
To create your first ("original") page, follow the steps outlined here by targeting the single page. After adding your first page, add the second page with a slight modification.
For "page type", select "a set of URLs":
You will need to target both your original (i.e- "atticandbutton.us/homepage") and the redirect URL (i.e- "atticandbutton.us/v2").
Once both pages have been created, set up a new event on the second page by navigating to the "events" tab and creating a new click event. To learn more about setting up events, click here.
It is important to run redirect experiments and track metrics that apply to both the original and the redirect pages. We recommend running a redirect experiment on pages with similar actions to ensure the impact is tracked correct.
2. Create a new experiment
Redirect variations follow the same six steps you use normally use to build an experiment, with a few differences. First, you'll set up the basic experiment as usual. You can change any of the components you add later, if you like.
Navigate to Create New... > Experiment to start the experiment flow.
Add a page to tell Optimizely where the experiment will run. For a redirect, the URL usually points to your original homepage or landing page.
Add the audience who will see your experiment.
Add metrics you'll use to measure success.
Adjust the split in traffic between your variations, if you like. The Original is your existing page; Variation #1 is the new page you're comparing it to.
Click Create an experiment.
Make sure you have your Optimizely snippet on both the original page and the page to which you are redirecting in your variation. If it's not on the new page, your visitors may not all be tracked.
Experiments that redirect to a different domain may experience tracking issues for those redirected visitors. Learn more about cross-domain tracking.
3. Set up a redirect variation
Next, you'll set up a variation that redirects to your second homepage or landing page.
Under Manage Experiment, select Variations to see variations you created when setting up the experiment.
Select "Variation #1" to set up the redirect to your homepage to the new URL.
Then, create the redirect. Under Create Options, select Redirect:
Add a full URL or a relative path where you'd like to redirect visitors.
For example, if you're testing two versions of your homepage, enter the URL for the second version of your homepage here (the same URL that you added as a new page earlier).
Based on your traffic allocation, visitors be randomly bucketed into one of the URLs that you entered.
When you load a redirect page, you won't be able to edit it with the Editor. You'll see a prompt that prevents you from editing the page.
Indicate the canonical link. In order to improve SEO link and ranking signals, the redirected page should indicate that the original page is the preferred (canonical) destination. Add a
<link> element with the
rel="canonical" attribute into the
<head> section of the redirected page. Check out this Google Support Doc for more information.
Unblock Optmizely's redirect. By default, when you set a redirect, Optimizely blocks other redirects for 5 seconds so that you will not cause an infinite loop of redirects. Click to learn about unblocking the redirect.