Use Cases



Marketing Technology

How to A/B test on your website with a headless CMS

A/B testing is challenging, even when companies have dedicated resources. But the issue becomes even more complicated when trying to A/B test on your website with a headless CMS.

If set up properly, headless CMS can be extremely powerful to help you conduct A/B tests on your website and allow you to make rapid updates to content without developing new pages or implementing additional software.

This guide will walk you through how Zesty has implemented A/B testing with our own headless CMS, and how you can implement this in your own website testing process.

Ways to A/B test on your website

When we approach A/B testing, we consider there to be three ways to create your test.

Most companies opt for the first or third options, which can have drawbacks. Creating full landing pages with unique URLs to test can be difficult to scale and measure if you don’t get enough traffic to each page. Utilizing a tool outside of your CMS works similarly to creating a page that adapts to query parameters, but can increase cost and potentially slow down your page.

We recommend leveraging a “smart” landing page that adapts based on query parameters. What this means is that your URL parameters will match a unique identifier that you define in the CMS, and the page content will load based on that parameter. This allows you to reduce the number of unique landing pages, increase scalability, and rapidly test without developer involvement.


Content to A/B test

There are several types of content you can A/B test on your website. We recommend considering the following elements:

Ways to determine how your A/B test is performing

Some quantitative determinations for performance include:

Qualitative insights are also important when A/B testing. These can include:

Important considerations for A/B testing

How to AB test with headless CMS

How to set up A/B testing with a headless CMS

Now we will walk you through the basic principles of how you can set up an A/B test within your headless CMS.

  1. Set up a webpage you can control content in

  1. Data you need to implement A/B testing


Set up A/B testing with Zesty

  1. Design your page and content

  1. Access Schema and create a new single-page model

  1. Navigate to Content and enter your content for the single-page model


  1. Code: Have your web developer implement the initial page design to your single-page model

  1. Return to Schema and create a headless data model (example name: “Landing Page A/B test”)

  1. Return to Content and enter a couple of test concepts for your headless data model “Landing Page A/B test”


  1. Have your developer write logic into the template to load dynamic content 

Now that you have all the pieces set up for your A/B test, it's time to test and track your campaign's success.

Measuring the success of your A/B campaign

And that's it! A/B testing can be extremely powerful if set up correctly (plus you don't need a bunch of separate tools to get the job done). Want to try it out for yourself? Start a free Zesty instance today.


By Katie Moser

Katie is the Senior Marketing Manager for Zesty.io. Her expertise lies in crafting marketing strategy, with an emphasis on content and digital marketing. Having spent too much time in clunky CMS's, Katie understands the need for a CMS that works with you - not against you. In her free time, you can find Katie in San Diego enjoying the sunshine at the beach or on hikes.

Related Articles

Subscribe to the zestiest newsletter in the industry

Get the latest from the Zesty team, from whitepapers to product updates.