Retool lets you build internal software with AI. Learn how they scaled with feature flags and experimentation on their Next.js marketing site with Hypertune.
04 Nov 2025 ‧ 4 min read

Retool lets you build internal software with AI. Their marketing site is built in Next.js, deployed on Vercel, and gets millions of visits a month.
The team wanted to use feature flags on the site, and run A/B tests, multivariate tests, and personalization campaigns.
They previously used a visual A/B testing tool but this didn't scale with their Next.js setup.
Visual A/B testing tools like VWO work by manipulating the page DOM after the initial render. They target DOM elements by their CSS selector and then run client-side JavaScript to change their contents to render the correct experiment variant for the visitor.
This approach has several problems:
This results in:
To solve these problems, they tried popular tools for feature flags and experimentation, but they had their own set of problems:
Instead of manipulating the DOM after the page loads, Hypertune is integrated directly in the Next.js codebase. You can think of it like a headless CMS but with the full power of a feature flag and experimentation system.
Here's how Retool set it up:
They defined a configuration schema for the marketing site. This can include simple boolean feature flags, e.g. to control whether or not to show a banner. But it can also include richer object flags, e.g. to control structured content like the banner's title, text, and CTA.
They also defined conversion event types, and the Context type that contains visitor attributes like their anonymous ID, user agent, referrer, UTM parameters, etc.
The Hypertune SDK worked on both the server and the client and was easy to integrate.
Since it's optimized for serverless environments like Vercel deployments, flag updates were reliable.
By default, it initializes from Hypertune Edge with low latency (typically < 25ms), but they set up Hypertune's Vercel Edge Config integration to make it even faster. This enabled the SDK to initialize on the server with near-zero latency (typically < 1ms).
Since the SDK is hydrated on the client during page load, flags and experiments evaluated correctly in the first render, avoiding layout shift, flickering, and page load delay.
And since the Hypertune CLI generates compile-time types for flags, inputs, and events, they could evaluate flags, pass the Context containing visitor attributes, and log conversion events, all with full end-to-end type safety.
As a result, marketing could update flags and content, run experiments, define personalization rules, and set up AI loops, all from the Hypertune dashboard without depending on engineering.
Experiment variants were always rendered correctly.
And since experiments were always embedded within flag targeting in the dashboard, there were no "experiment flags" that needed to be called from the code, so there was no risk of incorrectly logging experiment exposures, and experiment data was always accurate.
As a result, the team at Retool was able to run an experiment during a major launch of their new marketing site, collecting accurate data, with no impact on latency or conversion.
Going forward, they hope to use Hypertune's multivariate AI loops to explore millions of possible combinations of variants of landing page elements, to tune their site for each visitor segment.