Start your test with Google Tag Manager in five minutes
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.
It only takes 2 minutes!
Before you begin, make sure:
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.
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
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.
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.
Publish your Google Tag Manager container and your test will go live on your scheduled date. Hooray!