How to do A/B landing page tests with hugo

A/B testing is a powerful technique for optimizing web experiences by comparing two versions of a webpage to determine which performs better. This is a simple proof of concept for Hugo A/B testing.

The A/B Testing with Hugo repo includes the partials, config.yaml and a verification script to check if the rendered htmls are indeed different.

Maybe you can work A/B testing with git branchs , which way I use into my develop theme and it’s name is Hugo NexT.

Develop new features work in develop branch and Stable work in main branch, also deploy them on Vercel cloud.

Generally the idea with A/B testing is randomized presentation of the site to understand visitor behavior. It is not about new features or testing the code. Think it as a survey is there a better conversion to leads with the register button being red or green. You have one deployment and the visitor get randomly either the red or the green button version.

For more info have a look at this wikipedia article

You are right. Netlify even offers A/B testing based on branches.