Create a new AB test

Start your test with Google Tag Manager in five minutes


Variation B

Add another variation





Don't miss out on our next project

Your AB Test Code

Copy and paste this code into a Custom HTML tag  using the steps below

Fill out the fields above and click "Generate AB test code"
to spawn the awesome test code.

4 simple steps to start your AB test

It only takes 2 minutes!

Get started

Before you begin, make sure:

1. Create Custom HTML Tag for your AB test

Create a new Custom HTML Tag with the name [Test ID]+[Test name] and paste the code snippet (copy from above) as HTML value of this tag.

2. Add a firing Trigger

Add a trigger to your new tag with type Some Pages and set url to matches with regex with the regex value* of your test page(s).

*learn how to create regex codes for pages

3. Schedule your Tag

If you have no set any start- or end date and time when creating the AB test code in the form above, you can use GTM's scheduling for tags.

4. Preview & Publish container

Preview your test before publishing your new GTM container and switch variations using the Lean CRO preview panel. Note, if you're using GTM scheduling, your tag will not fire until the scheduled date/time, even in GTM preview mode.

  1. Go into Google Tag Manager Preview mode.
  2. Browse to your test url with this url parameter:

Publish your Google Tag Manager container and your test will go live on your scheduled date. Hooray!