Create an A/B Test
Overview
A/B testing (which includes split testing) means showing two or more versions of a page to visitors at the same time to see which one converts better. The original is called the Control, and each changed version is a Variation.
Make sure the tracking code is installed on every page you want to include, and that you have the browser extension installed for the best editing experience.
Step 1 - Create the experiment
From the main left menu, choose A/B Testing, then New A/B Test. Enter the URL of the page you want to test. This first URL will decide where the Preview and Visual Editor will open, and cannot be changed later.

A first Variation is created automatically. There are three ways to apply your changes to it.
Step 2 - Apply your changes
Option 1 - Visual Editor
Press Visual Editor on your variation to make changes without writing code - text, styling, layout, images, and more. See Use the Visual Editor for the full guide.
The three buttons near the Variations tab are useful here too: Preview opens up the edited page with the changes applied. Duplicate clones a variation that already has the changes you want, useful when testing several similar variants. Delete removes a variation entirely.
Option 2 - Custom code
Press the Code button to write your own JavaScript or CSS directly, instead of using the visual tools. This gives you full control for changes that go beyond what the Visual Editor supports. See Write Custom Code (mktz_$ Reference) in the Developer Guide.

There's also a Global JS option, which runs on both Control and Variation - not just the Variation. This is useful for things you want to happen regardless of which version a visitor sees, such as pushing a custom goal or event for both groups.
Option 3 - Split URL Test
Instead of editing the page directly, redirect visitors to a completely different URL. Useful when your variation is a fundamentally different page - a redesigned template, a different platform - rather than a tweak to the existing one.
Click on your variation and choose Redirect to URL from the dropdown, then enter the destination URL and press Save. Add more redirect variations using New Variation if you want to test more than one alternative page.


Explore automatically preserves query string parameters - including gclid, fbclid, and UTM parameters - when redirecting visitors, merging them with any parameters already on the destination URL. See the Split URL audience notes below for how to set this up correctly.
Step 3 - Set the audience and segmentation
Choosing pages
In the Audience tab, manage the pages where you want this experiment to run using one of these URL conditions:
-
URL is - runs only on the exact page entered.
-
URL is not - runs on every page except the one entered.
-
URL starts with - runs on any page whose URL starts with the entered value.
-
URL ends with - runs on any page whose URL ends with the entered value.
-
URL contains - runs on any page whose URL contains the entered value.
-
URL does not contain - runs on any page whose URL does not contain the entered value.
-
URL RegEx - define matching pages using a regular expression.
-
Page contains keyword - runs on pages containing a specific keyword or short phrase.
A very common mistake: using URL is on its own. Since URL is requires an exact match, any visitor arriving with extra parameters in the URL - like ?utm_source=..., ?gclid=..., or any other query string - won't match, and will be silently excluded from your experiment. This can quietly cut out a large share of your paid and campaign traffic without any obvious symptoms.
Here is an example of a setup that triggers the experiment only on a specific page, but includes all types of traffic.

For Split URL Tests specifically
Do not include the redirect destination URL in your Audience settings - this creates a loop that shows a blank/white page to visitors caught in it. As a best practice, add the redirect URL to Excluded URL pages using URL starts with or URL contains, so the experiment can never accidentally trigger on the page it redirects to.
Saving your audience for reuse
Once you've set up your pages and conditions, you can save this audience as a template to reuse in future experiments, instead of rebuilding it each time.
Choosing your segment
By default, experiments run for All visitors. Press Select or create segment to target a specific audience instead - either choosing an existing segment or building a new one. See Understand How Segmentation Works for the full guide.
You can also filter by Device Type, so the experiment only shows to visitors on a specific device.
Before publishing to your real visitors, we strongly recommend creating a testing segment first - for example, one that only includes your own IP address - and publishing your experiment through that. This lets you confirm everything works correctly (variations apply, goals fire, no visual issues) without affecting live traffic or polluting your results with test data. See Activate & Manage Experiments for the full method.
Advanced Settings
-
Limits - stop the experiment automatically once a specified threshold is reached.
-
Exclusivity - control whether this experiment can run alongside others, or should be prioritized above them. See Understand Experiment Compatibility Rules for the full rules on what can run together.
Step 4 - Set traffic allocation and goals
In Traffic Allocation & Goals, choose what percentage of your segment's visitors will be included in the experiment, and how that traffic splits between Control and each Variation using the sliders.
There are 3 goals included by default: Sale, Engagement, and Bounce Rate. You can remove any of them using the Delete button, add an existing goal, or create a custom one.
Some goals require integration on your website before they'll record data. See Goals Overview for the full picture, including the difference between Local and Global goals.
You can also set a Goal Timeout - the time window after which conversions are no longer counted for this experiment. The platform-wide default is 3 days.
Step 5 - Schedule and publish
In Scheduling, choose the timeframe your experiment should run. You can:
-
Get notified by email when the experiment ends.
-
Set Excluded hours intervals to skip specific days or times.
Scheduling dates and times are interpreted using your account's Display Timezone setting. If you haven't set one, confirm what it defaults to before relying on exact start/end dates.
When ready, choose Save & Continue to keep it as a draft, or Publish to go live.
After publishing or making changes, allow 3-4 minutes for the update to take effect on your live website.