Top 7 Optimizely alternatives for SaaS companies

A SaaS feature flag sits at the intersection of customer identity, product packaging, release safety, and recurring revenue. That makes a generic flag checklist inadequate.
Optimizely is a capable baseline for web and feature experimentation. Feature Experimentation can target application attributes, deliver SDK-based variations, and support progressive releases, while Web Experimentation covers browser-based optimization. A SaaS team should verify account-level bucketing explicitly because the commercial customer, not the individual browser, is often the correct randomization unit.
SaaS teams still have valid reasons to compare alternatives. A growing B2B company may want experiment results based on subscription revenue in its warehouse. A bootstrapped product may need pricing that does not rise unpredictably with client-side users or service topology. A regulated vendor may need self-hosting. Another team may want analytics, replay, and surveys in the same system as flags. Those needs lead to different winners.
This guide compares 7 Optimizely alternatives for SaaS companies: GrowthBook, Statsig, PostHog, Unleash, Flagsmith, ConfigCat, and DevCycle. GrowthBook ranks first for its combination of feature delivery, warehouse-native experimentation, account-level business metrics, open source, and traffic-independent core pricing. Statsig is the deepest integrated alternative for teams that want group analytics and advanced experimentation. PostHog is a practical all-in-one suite. Unleash and Flagsmith provide strong open-source deployment control. ConfigCat is the focused managed option, while DevCycle is the standards-oriented choice for engineering teams.
SaaS experiments cross the website-product boundary
A SaaS buyer may use Optimizely for public pricing pages, signup, onboarding, in-product features, account permissions, and renewal journeys. Those are not one technical surface. Marketing-page changes may use a visual editor and visitor cookie; product changes may require server assignment, workspace identity, billing events, and a release flag.
Map each recent experiment to visitor, user, account, or subscription identity. Then record whether the outcome lives in browser events, application events, or the warehouse. An alternative that excels at landing pages may fail account-level product tests, while an SDK-first platform may require engineering for every marketing variation. The shortlist should match where the decisions with the greatest business impact actually occur.
Optimizely alternatives for SaaS companies at a glance
| Alternative | Best SaaS fit | Tenant and measurement strength | Main watchout |
|---|---|---|---|
| GrowthBook | B2B and product-led SaaS with warehouse metrics | Target by account attributes and analyze governed revenue, retention, and usage data | Requires a clear identity and metric model |
| Statsig | SaaS teams wanting an integrated experimentation suite | Custom unit IDs and group analytics support company-level tests | Event metering and the Amplitude roadmap transition need diligence |
| PostHog | Startups consolidating product tooling | Groups, analytics, replay, surveys, flags, and experiments share events | Group analytics and multiple usage meters affect cost |
| Unleash | SaaS platforms prioritizing self-hosting and flag operations | Custom context fields and stickiness can use tenant IDs | Advanced environments, governance, and custom stickiness are commercial |
| Flagsmith | Security-conscious SaaS with flexible deployment | Identity traits and segments work across cloud, private cloud, and self-hosting | Advanced governance and team access require paid tiers |
| ConfigCat | Smaller SaaS teams needing focused managed flags | Custom percentage attributes can keep a company together | No built-in experiment analysis; migration semantics need careful review |
| DevCycle | Engineering-led SaaS adopting OpenFeature | Custom properties, reusable audiences, group-oriented tests, and broad SDK tooling | Business tier has a substantial base price and several usage meters |
These rankings weigh tenant consistency, experiment analysis at the right unit, subscription and revenue metrics, environment governance, runtime behavior, deployment choice, migration effort, and cost at SaaS scale. A vendor is not a better fit merely because its entry plan is cheaper.
Model the SaaS control plane before choosing a vendor
Separate entitlements from release flags
Feature flags and SaaS entitlements can use similar conditions but have different failure consequences. A release flag answers, “Should this implementation be exposed now?” An entitlement answers, “Has this account purchased or been granted access?” The first is delivery control. The second is authorization and contract enforcement.
Do not make a browser-side flag the only barrier around a paid or sensitive capability. Keep the authoritative plan, add-on, trial, and exception state in a server-side billing or authorization service. Pass verified attributes such as plan, accountId, region, or hasReportingAddon into flag evaluation, but enforce protected operations on the server. The OWASP Application Security Verification Standard is a useful independent reference for keeping access-control requirements explicit.
This separation also makes migrations safer. You can replace the release-control provider without rewriting the source of truth for customer contracts. If a flag service is unavailable, the application can fail according to a known release default while authorization continues to enforce the paid boundary.
Choose the correct randomization and analysis units
B2B experiments often fail because they assign by user and analyze by account. Ten people at one customer can receive both variations, contaminating account-level retention or expansion metrics. If the product experience spreads through collaboration, mixed assignments can also make the treatment impossible to interpret.
Choose an account or organization identifier as the randomization unit when all members should share an experience. Join outcomes at that same unit or at a finer-grained unit that maps to exactly one account. If the number of customers is small or sizes vary sharply, power and balance become harder. Research on cluster-randomized experiments explains why the number and correlation of groups—not merely the number of users—affect precision.
User-level assignment can still be right for isolated interactions, such as individual notification preferences or a personal editor shortcut. Write down when users in one tenant may see different variants, how accounts with multiple workspaces behave, and what happens when a user changes employers or belongs to several organizations.
Price the architecture, not an imaginary average user
SaaS workloads stress meters differently. A browser product generates client-side monthly active users. A backend with many services can create service connections or configuration requests. A serverless architecture can initialize frequently. An experiment-heavy team emits exposures and events. A multi-product company needs more projects and environments.
Build a 12-month model with client MAU, server instances or connections, config fetches, evaluation requests, events, seats, projects, environments, data retention, and support. Include a 5-times-growth scenario and a noisy-neighbor incident. Practitioner threads about Optimizely alternatives and cost are useful for discovering questions, but only an architecture-specific model can predict your bill.
Treat flag cleanup as recurring SaaS maintenance
Temporary release flags become permanent complexity unless teams track owners, expected lifetimes, code references, last evaluations, rollout state, and removal work. Long-lived entitlement flags are different: they represent stable packaging and should be named, documented, and audited as such.
The distinction is supported by practitioner research on feature-toggle practices, which identifies management and cleanup as part of the discipline. During evaluation, create one release flag, one experiment flag, one operational kill switch, and one entitlement-adjacent flag. Verify that the platform can distinguish their lifecycles instead of placing every toggle in one undifferentiated list.
1. GrowthBook: Best overall for SaaS companies
Best for
GrowthBook is the best Optimizely alternative for SaaS companies that want release control and experimentation to use the same customer and business data already governed in a warehouse. It fits B2B products measuring account activation, seat expansion, churn, support load, gross margin, or annual recurring revenue, as well as product-led SaaS products running high volumes of user-level tests.
Key strengths
GrowthBook Feature Flags supports custom attributes, targeting rules, percentage rollouts, prerequisites, multiple environments, remote configuration, and local evaluation through lightweight SDKs. A SaaS application can pass account identifiers, plan, region, cohort, and verified entitlement attributes into the evaluation context. For an account-wide rollout, the team can use a stable organization identifier as the bucketing attribute and keep every member together.
The larger advantage is measurement. GrowthBook Experimentation queries existing warehouse data and lets teams define reusable SQL metrics. A SaaS team can analyze trial activation, retained accounts, paid conversion, expansion revenue, usage-based cost, or support tickets without rebuilding them as vendor-specific events. The same governed definition can power an experiment, a dashboard, and product analytics without a reconciliation layer.
GrowthBook supports Bayesian and frequentist analysis, CUPED, sequential testing, sample ratio mismatch checks, dimensions, guardrails, holdouts, and mutual exclusion. That depth matters when SaaS experiments affect correlated outcomes: an onboarding change may improve activation while increasing cancellations or support load. The open-source GrowthBook repository exposes the application and statistics, and both cloud and self-hosted deployment remain options.
Watchouts
GrowthBook cannot correct an ambiguous tenant model. Your SDK context, exposure table, metrics, and warehouse joins must agree about userId, accountId, workspace membership, and time-varying plan state. Decide whether a user with access to 2 accounts receives one assignment or an assignment per account, and include the relevant account in the experiment key.
Warehouse-native analysis also requires data ownership. A young SaaS company without reliable product events or subscription tables may need to start with the managed warehouse or do more instrumentation work than it would in a plug-in analytics suite. Self-hosting shifts operational responsibility to your team.
Pricing and implementation notes
The current GrowthBook pricing page lists a free Cloud Starter plan for up to 3 users and 1 project with unlimited feature flags, experiments, and traffic. Pro is $40 per seat per month with up to 50 users and 3 projects, plus advanced statistics, product analytics, permissions, and safer rollout features. Enterprise is custom. The open-source self-hosted plan is free, while commercial self-hosted controls are custom.
Seat-based core pricing is attractive for SaaS products whose customer traffic grows faster than the internal team. Model CDN and managed-warehouse allowances separately, but do not assume every end user or experiment exposure creates the main platform charge. For the pilot, use one account-level flag and an outcome sourced from the subscription warehouse, then inspect the SQL and assignment data with engineering, product, and finance stakeholders.
2. Statsig: Best integrated platform for B2B experiments
Best for
Statsig is best for SaaS teams that want feature gates, dynamic configuration, experiments, group analytics, product analytics, and session replay in one system. Its custom unit support is particularly relevant to B2B companies that need to assign and analyze by company, account, workspace, device, or another domain entity.
Key strengths
Statsig lets experiments use custom unit IDs such as companyID or accountID. Everyone at the same customer can receive the same variation, and the platform can analyze company- or account-level metrics. Its pricing comparison also lists group analytics explicitly for B2B products, alongside behavioral cohorts, funnels, retention, feature gates, experiments, and warehouse-native deployment.
The experimentation system is broad: Bayesian and frequentist methods, CUPED, sequential tests, holdouts, stratified sampling, interaction detection, switchback tests, non-inferiority tests, scorecards, and reusable metrics. Product teams can connect a partial rollout to metric lifts, while engineering manages gates and dynamic configs. Public Statsig SDK repositories provide implementation visibility.
Statsig Cloud can minimize data-platform setup, while Enterprise offers warehouse-native deployment for Snowflake, Databricks, BigQuery, Redshift, Athena, and Fabric. That gives a SaaS company a choice between an integrated event pipeline and analysis closer to governed warehouse data.
Watchouts
The commercial and roadmap context is changing. OpenAI announced the Statsig acquisition in 2025, and Amplitude announced in May 2026 that it took on the Statsig brand and customers and would maintain the cloud and warehouse platforms while developing an integrated roadmap. Confirm the contracting entity, support path, SDK commitments, and future relationship between Statsig and Amplitude before a long migration.
Event pricing also needs careful modeling. An exposure can be billable when it powers experiment or metric-lift workflows, and SaaS applications can generate large event volumes from active users. Group-level experiments may reduce the number of randomization units without reducing raw behavior events.
Pricing and implementation notes
The current Statsig pricing page lists a free Developer tier with 2 million events per month, unlimited flag and config checks, 1-year analytics retention, and unlimited seats. Pro is $150 per month for one project with 5 million included events, then $0.05 per 1,000 additional events. Enterprise supports custom event- or experiment-based contracts and warehouse-native deployment.
Pilot the hardest B2B case, not a user-level button test. Assign by account ID, include accounts of different sizes, measure one account-level outcome and one user-level guardrail, and verify how Statsig handles users in multiple accounts. Ask the vendor to show exactly which exposures, events, dimensions, and computed metrics count toward the plan.
Compare SaaS operating models
See how GrowthBook and Optimizely differ across warehouse data, feature delivery, experimentation, deployment, and pricing.
Compare GrowthBook and Optimizely3. PostHog: Best all-in-one option for SaaS startups
Best for
PostHog is best for small and midsize SaaS teams that want to consolidate product analytics, web analytics, session replay, surveys, feature flags, experiments, error tracking, and warehouse tools. It is especially useful before a company can staff separate analytics, experimentation, research, and feature-management platforms.
Key strengths
PostHog can associate events with groups such as companies or organizations. A SaaS team can analyze activation, retention, and behavior by account while still inspecting individual users. Feature flags and experiments use the same persons, properties, cohorts, and events, allowing a PM to move from a funnel to a session replay, cohort, rollout, and test without several data handoffs.
The PostHog experiments workflow sits on feature flags and supports A/B or multivariate variants, goal and secondary metrics, and statistical analysis. Surveys and replay can add qualitative context to a result. The open-source PostHog repository makes much of the platform visible and lets technical buyers inspect how its systems evolve.
PostHog also offers unlimited team members and per-product billing limits. That makes it feasible for product, engineering, customer success, support, and design to share the same evidence during a startup pilot instead of buying access role by role.
Watchouts
Group analytics is a priced add-on to identified event analysis, and the complete SaaS workflow can touch several meters: analytics events, identified events, group analytics, feature-flag requests, recordings, surveys, and data pipelines. Cost is transparent, but it is not one number. Build the model from actual traffic samples.
PostHog is event-native. If finance-approved ARR, subscription status, refunds, costs, or customer-health scores live in the warehouse, confirm how they enter the experiment analysis and how often they refresh. An integrated interface does not automatically make the event taxonomy a source of truth.
Pricing and implementation notes
The current PostHog pricing page includes monthly free allowances of 1 million analytics events, 1 million feature-flag requests, and 5,000 session recordings. Experiments are billed with feature flags. The free plan includes 1 project, 1-year retention, and unlimited team members; pay-as-you-go unlocks 6 projects, longer retention, and email support. Group analytics starts at an additional per-event rate.
During the pilot, instrument a company group and associate its users and subscription properties. Run one account-cohort rollout, inspect both user and group analytics, and calculate the combined monthly cost. Verify identity merging for an anonymous evaluator who signs up, joins a workspace, switches accounts, and upgrades during the experiment.
4. Unleash: Best for open-source feature operations
Best for
Unleash is best for SaaS engineering teams that want a mature open-source feature-management control plane, custom targeting logic, and a path from self-hosted software to supported cloud or enterprise deployment. It fits organizations that prioritize delivery operations more than built-in experiment analysis.
Key strengths
The Unleash context model supports standard user and session fields plus arbitrary custom properties. A SaaS team can define tenantId, plan, region, isTrial, or accountRisk fields and use them in strategy constraints. Custom stickiness can hash on an account field so a gradual rollout or variant remains consistent for everyone in the tenant.
Activation strategies, reusable segments, variants, projects, environments, and a playground provide practical release control. Unleash also tracks a flag lifecycle from Define through Develop, Production, Cleanup, and Archived, helping teams distinguish active rollout work from stale code. The Unleash repository and public SDKs support technical due diligence and self-hosted adoption.
Commercial Unleash adds change requests, four-eyes approvals, roles, SSO, audit history, additional environments, data residency, and supported hosting. Those controls can suit a SaaS vendor that must prove who changed a production customer rollout and when.
Watchouts
Unleash is primarily a feature-management system. Flag variants and metrics do not amount to the warehouse-native statistical analysis available in experimentation specialists. A team that needs causal results for activation, churn, or revenue should pair assignments and exposures with a governed analysis layer.
Important SaaS capabilities cross the open-source and commercial boundary. The open-source edition supports one environment, while cloud and enterprise packages provide unlimited environments and more governance. Custom stickiness is documented as an Enterprise capability. Confirm the edition required for account-level rollouts before designing around it.
Pricing and implementation notes
The current Unleash upgrade page lists cloud hosting at $75 per seat per month and self-hosted Enterprise at $75 per seat per month billed annually with a 5-seat minimum. Cloud includes unlimited MAU, unlimited projects and environments, and 53 million API requests per month, with $5 per additional million. Custom enterprise contracts are available.
For a proof of concept, run the open-source edition and a trial of the commercial package if you need multiple environments or custom stickiness. Use a tenant ID context field, compare decisions across 2 SDK languages, test the playground, export configuration, and send evaluation data to your chosen analytics system. Price the external experiment-analysis work alongside the Unleash subscription.
5. Flagsmith: Best for deployment flexibility
Best for
Flagsmith is best for SaaS companies that want one feature-management model across managed cloud, dedicated private cloud, and self-hosting. It is a strong fit for vendors with data-residency, customer-isolation, or regulated deployment requirements that may evolve as they move upmarket.
Key strengths
Flagsmith uses identities, traits, and segments for targeting. A SaaS app can identify a user and pass traits such as tenant, plan, region, beta status, or account tier, then use segments to serve Boolean or multivariate flags. The open-source Flagsmith repository includes the control plane, and its SDKs support web, mobile, and server applications.
Deployment choice is the differentiator. Teams can use the global managed service, choose a single-tenant private cloud in a selected provider and region, or deploy on their own infrastructure. Server-side local evaluation keeps decisions in process after configuration is loaded, which can reduce runtime dependence on an external request path.
The commercial tiers add scheduled flags, A/B and multivariate testing integration, roles, permissions, change requests, audit logs, SAML, and support. Unlimited flags, environments, identities, and segments make the object model friendly to a multi-product SaaS portfolio, subject to fair-use and request allowances.
Watchouts
Flagsmith can assign variants and integrate with analytics, but it is not a full statistical experimentation platform. Define where exposures, outcomes, power calculations, guardrails, and final decisions will live. Do not label a 50/50 multivariate flag as an A/B test until that measurement layer exists.
Managed-cloud pricing is request-based and team collaboration changes by tier. Server-rendered pages or frequent identity refreshes may use more API calls than a single-page application that caches flags for a session. Enterprise governance and non-public deployment are custom-priced.
Pricing and implementation notes
The current Flagsmith pricing page lists a free cloud plan with 50,000 requests per month, 1 team member, and unlimited flags, environments, identities, and segments. Start-Up is $45 per month for 1 million requests and 3 members. Scale-Up is $300 monthly for 5 million-plus requests and 5 included members, with governance features. Enterprise is custom for cloud, private-cloud, or self-hosted deployments.
Sample your actual SDK behavior before forecasting. Flagsmith counts calls that fetch flags for an application or identity; a React session and server-rendered page can create different patterns. In the pilot, target 3 real tenant shapes, test local evaluation and stale configuration, exercise a change request, and export the objects needed for a future migration.
6. ConfigCat: Best focused managed flag service
Best for
ConfigCat is best for SaaS teams that want a straightforward managed flag and remote-configuration service without adopting a broad analytics suite. It works well for smaller B2B products that need customer-specific targeting, stable percentage rollouts, generous configuration delivery, and published plan limits.
Key strengths
ConfigCat targeting uses a user object, custom attributes, segments, prerequisite flags, and ordered rules. Percentage options are sticky and consistent across SDKs. A custom percentage attribute can use a company or organization value, allowing a SaaS team to keep users at the same customer in the same rollout group.
ConfigCat evaluates rules through its SDKs and requires a caller-supplied default value, making fallback behavior explicit. It supports Boolean, string, integer, and double settings, so teams can use the service for remote configuration as well as release flags. Its SDK repositories allow engineers to verify platform coverage and update activity.
The service also publishes detailed limits for products, environments, flags, segments, percentage options, configuration downloads, and traffic. That transparency makes it easier for a SaaS team to test projected scale before procurement.
Watchouts
ConfigCat provides targeting and stable variant distribution, but experiment analysis belongs in another platform. A team must log assignments and connect them to account outcomes with the correct unit and statistical method. That separation can be perfectly reasonable for a flag-first use case; it is extra architecture for an experimentation-first program.
Migration is not a pure object copy. Providers differ around fractional rollout percentages, segment rules, variation values, missing attributes, and percentage keys. A translation that succeeds can still change edge-case evaluation semantics, so shadow decisions before cutover.
Pricing and implementation notes
The current ConfigCat pricing page and plan-limit documentation list a forever-free plan with 10 flags, 2 products, 2 environments per product, 2 segments per product, 5 million configuration downloads, and 20 GB of monthly traffic. Higher tiers increase product, environment, flag, segment, delivery, collaboration, and governance limits; confirm the current displayed price for the selected billing period.
Use the migration converter on representative complex flags, not just Boolean defaults. Test tenant-based percentage allocation, plan and region rules, prerequisite flags, confidential comparisons, missing attributes, and offline defaults in every SDK language you operate. Connect the evaluation details to your existing analytics stack if experiments are in scope.
7. DevCycle: Best for OpenFeature-oriented SaaS engineering
Best for
DevCycle is best for engineering-led SaaS teams that want OpenFeature across client and server SDKs, strong debugging and schema tools, reusable audiences, flag lifecycle support, and experimentation attached to the feature workflow. It is well suited to organizations that want provider abstraction in application code without giving up a managed control plane.
Key strengths
DevCycle supports unlimited seats, flags, projects, and environments across its plans. Targeting can use custom properties such as accountType, pricingPlan, isSubscriber, or isTrialUser. Reusable audiences can group beta customers, tenant IDs, or account tiers, while schemas constrain variables and custom properties.
Its feature experimentation supports A/B and multivariate tests, custom metrics, gradual and scheduled rollouts, and measurement for frontend, backend, algorithm, architecture, and database changes. The documentation explicitly discusses randomizing with custom properties for company-level tests and the increased balance risk when group counts are small.
DevCycle is OpenFeature-native and publishes providers and SDK integrations through GitHub. It also provides CLI, API, editor, Terraform, code-reference, and debugging tools. Those surfaces can reduce migration coupling and help engineers understand a tenant's actual flag decision during support incidents.
Watchouts
OpenFeature standardizes evaluation APIs, not the provider's management model, experiments, audit history, or pricing. Switching providers still requires mapping flag types, rules, segments, environments, configuration delivery, and exposure semantics. Treat the standard as one portability layer rather than a one-click exit plan; the CNCF OpenFeature project documents that broader ecosystem boundary.
DevCycle's commercial step is substantial for a smaller SaaS company. The Business tier adds permissions, audit logs, stale-flag detection, and stored custom properties, but it begins at a higher base price and meters client MAU, cloud config requests, server config requests, and events. DevCycle is also now part of Dynatrace, so confirm current contracting and roadmap expectations.
Pricing and implementation notes
The current DevCycle pricing page lists a free plan with unlimited seats and flags, 1,000 client-side MAU, 10,000 cloud config requests, 100,000 server config requests, and 5,000 events per month. Business is shown at $500 per month billed annually, with 100,000 client MAU and larger request and event allowances; the detailed base price is $625 monthly before the annual discount. Enterprise is custom.
Build a usage model for each SDK mode. Local-bucketing server SDKs consume configuration fetches differently from cloud bucketing, and experiments add custom events. In the pilot, evaluate the same tenant context through the native SDK and OpenFeature provider, test schema violations and offline defaults, run an account-level experiment, and export the data needed to reproduce the result.
Which alternative fits your SaaS stage?
Early-stage SaaS with a small team
PostHog can consolidate the most product tools with little procurement overhead, while ConfigCat is the cleaner choice when the need is narrowly managed flags. GrowthBook's free cloud and open-source paths are stronger when the team already knows that rigorous experimentation and warehouse data will matter. Do not choose only by the free allowance; model the first paid boundary you are likely to cross.
Scaling B2B SaaS with a data warehouse
GrowthBook and Statsig lead here. GrowthBook is preferable when the warehouse remains the source of truth, SQL transparency matters, and traffic-independent core pricing is valuable. Statsig is compelling when the organization wants a tightly integrated event, analytics, flag, and experiment suite with custom unit IDs. The Statsig-Amplitude transition should be part of commercial diligence.
Regulated or deployment-sensitive SaaS
GrowthBook, Unleash, and Flagsmith offer self-hosted operating models. Flagsmith adds a managed single-tenant private-cloud option. Compare editions carefully: open-source availability does not imply that SSO, audit history, approvals, multiple environments, or commercial support are included. Add database operations, upgrades, disaster recovery, and on-call staffing to self-hosted cost.
Engineering-platform-led SaaS
Unleash is strongest when mature flag operations and lifecycle controls are the priority. DevCycle is strongest when OpenFeature, developer tooling, schemas, debugging, and experimentation inside the feature workflow matter. ConfigCat is attractive when a team wants a smaller managed dependency with explicit targeting and delivery limits.
A SaaS-specific proof of concept
Give every finalist the same tenant model and production-like traffic. A useful proof of concept includes these checks:
- Represent a user, an account, a workspace, plan, region, trial state, and verified add-ons without exposing unnecessary personal or commercial data.
- Serve one flag consistently to every user at an account, including a user who belongs to 2 accounts and switches between them.
- Run an account-randomized experiment with enough companies and balanced account sizes. Measure activation or retention by account and latency by request.
- Change a customer's plan during the test. Verify when targeting changes, whether the assignment remains valid, and how analysis treats the transition.
- Simulate provider timeout, stale configuration, malformed context, missing account ID, and a rollback during peak traffic.
- Exercise development, staging, canary, and production environments. Test approval, audit, API, CI/CD, and break-glass workflows with real roles.
- Shadow-evaluate 20 representative Optimizely flags and compare every decision. Include segments, prerequisites, multiple variants, and edge-case attributes.
- Inventory flag configuration, historical changes, code references, experiment records, and raw exposure data. Confirm which artifacts can be exported.
- Calculate cost at current volume, expected year-end volume, and 5-times growth across every meter and required add-on.
- Assign owners for identity contracts, metrics, SDK upgrades, incident response, entitlements, and stale-flag removal.
Use independent sources to challenge the demo. G2's Optimizely Web Experimentation alternatives can reveal categories buyers compare, while community discussions about small-team feature flags surface real setup and pricing anxieties. The OpenFeature specification helps test API portability, and Martin Fowler's feature toggle guidance remains a useful vocabulary for separating release, experiment, operational, and permissioning toggles. Validate every current capability and price on the vendor's official pages.
GrowthBook is the strongest overall choice for a SaaS company because it connects tenant-aware feature delivery with the governed business data needed to judge product changes. Warehouse-native analysis makes account retention, expansion revenue, support cost, and product usage first-class metrics. Open source and self-hosting preserve deployment choice, while seat-based core pricing remains predictable as customer traffic grows. Start a free GrowthBook pilot with one tenant-wide rollout, or book a SaaS experimentation demo to review the data model and migration plan.
Pilot with real SaaS metrics
Connect account and subscription data, ship a tenant-aware rollout, and measure its impact with one platform.
Start a GrowthBook PilotRelated Articles
A magazine's home page shows two recent issues. The design team wants subscribers to try a shelf with four. All four covers are public, and changing editions while the page is open should update the shelf immediately. That gives you a small React feature with a useful acceptance test. Click from guest to subscriber and back, and count the covers each time.
We'll put the display limit in a typed local flag, evaluate it inside a React component, and leave the choice of edition with the app. The example runs in a client-rendered React app without a GrowthBook account, an SDK key, or a request for flag rules. For the wider workflow, free feature flags for coding agents explains what to ask an agent to implement and how to review the result.
Define what one flag controls
Start with an existing React and TypeScript app, or create a Vite React project for the example. Install both GrowthBook packages so the definitions and the hooks resolve against compatible SDK versions.
Create src/flags.ts. Here the feature value is a number, which lets the component use the same rendering code for either edition. A future change from four covers to three is one edit to the rule.
A guest falls through to the default of two. A subscriber matches the rule and gets four. This rule applies to every subscriber, so the ID has no effect on the result here. If you later roll the shelf out to a percentage of subscribers, you already have an identity to use for repeatable assignment.
The type registration release note explains the version requirement for LocalFeatures. The registration connects the definition, the attributes, and the value returned by the hook. For the TypeScript mechanics, see Jeremy Dorn's Register pattern walkthrough.
Put the current reader above the shelf
Replace src/App.tsx with the component below. The edition switch is a local fixture so anyone reviewing the change can reproduce both states. In an existing app, take those two values from the active reader in your session layer.
The provider receives an instance initialized with the current reader and the checked-in rules. React can render the correct shelf on the first pass for that reader. If the app is still loading a session, decide what should occupy the shelf in the meantime. For this public list a two-cover guest view is reasonable. On a page where a switch would interrupt the reader, wait for the session before mounting the shelf.
Give your agent the React setup
Use the local flags guide to ask for a typed definition, a provider with the current reader, and a test that changes the edition.
Open the Agent GuideThe useMemo dependencies include the ID and the edition. If a reader subscribes while signed in, their ID can stay the same while their edition changes. Depending only on the ID would leave the old SDK instance in place. Passing a fresh object as the dependency on every render would create unnecessary instances. The example uses the two primitive values the rule setup actually needs.
Read the numeric flag where React renders the list
Create src/IssueShelf.tsx. Keep one stable ID per issue and let the component use the resolved value to select how many items to render.
Keep the hook at the top of the component, inside the provider's subtree. The React SDK supplies the flag value through that provider. Calling a hook inside a click handler or inside the list loop would break the Rules of Hooks. Use the returned number in ordinary render logic.
There are two places you can see the number two in this implementation. The definition's defaultValue is what an ordinary guest gets through evaluation. The 2 passed to the hook is a fallback for a value the SDK can't supply. Giving them the same value makes the basic shelf a sensible fallback, but checking only the guest case would let a broken provider arrangement or missing definition go unnoticed. The subscriber case proves that the component actually received the rule.
The list keys identify magazine issues. Keep those keys independent of the flag. Switching from two covers to four should preserve the identity of the first two rows. There's also no need to remount the whole app with an edition-specific key. React preserves state according to component position and keys. For example, a search input outside the shelf shouldn't lose its text because someone subscribed.
Check the transition in both directions
Use the template's build script to type-check and bundle the app. Once that passes, start the dev server and open the local address it prints.
On first load, the page says guest and lists November and October. Click Switch edition. The same page should say subscriber and add September and August. Click again. The list should return to the original two issues, in order. This last check catches code that appends more results on upgrade and never removes them on downgrade.
For a compile-time check, temporarily replace the numeric fallback with the string "2". Run the build again and inspect the error on the hook call. Then restore 2 and rebuild. If the string compiles, check that src/flags.ts belongs to the same TypeScript project as the component and that the package manager resolved compatible core and React versions.
Look for the core package used by your app and by the wrapper. If the app has several incompatible installations, align the versions before diagnosing the JSX. A team using an existing build script should also confirm it actually runs the TypeScript checker.
Hand off a React change someone can review
Give your coding agent the one-shot local feature flags guide and a short description of the observable behavior. For this shelf, the request can be as specific as the test.
The shelf controls how many public titles to display. If your actual feature unlocks paid articles, enforce access when the server serves an article. A client-rendered flag only decides what to show in that browser. Whenever a change to the display limit can wait for a deployment, the small local file keeps the decision reviewable alongside the component. When an editor needs to change it between issues without an engineering release, compare the free GrowthBook options for managing flag rules.
Manage the shelf in GrowthBook
Start a GrowthBook workspace when your magazine team is ready to manage shelf rules between deployments.
Get Started with GrowthBookTwo customers download the same weekly report. One has agreed to preview a new CSV column. The other feeds the old two-column format into an importer. Both requests can land on the same Node.js process, and each needs the right file even if the other request arrives while the report is loading.
This tutorial builds that endpoint with one checked-in feature flag. The process loads the rules once. Each request supplies its own workspace attributes and receives its own evaluation. You can run the whole example on your machine without an account, a client key, or a flag server. The free feature flags for coding agents walkthrough introduces the local approach. Here we'll give the agent a server-specific test to pass.
Set up a small TypeScript service
Use Node.js 22 or newer for this example. In an empty directory, create an npm project that uses ES modules, install the core SDK, and add the TypeScript tools.
Create tsconfig.json at the project root. The sample runs TypeScript directly with tsx and checks types in a separate step. Type checking with tsx explains why the two commands serve different purposes.
The following files all live next to that configuration. The server imports ./flags.js even though the source file is flags.ts. That spelling follows TypeScript's Node.js module resolution for ESM and works with this runner.
Define the report contract in one flag
Create flags.ts. The public format has two columns. The sample preview workspace gets one additional column. The only targeting attribute the rule needs today is reportPreview. Carry the workspace ID too, so two people downloading a report on behalf of the same workspace can share an assignment if you introduce a percentage rollout later.
The SDK type registration update covers this rule syntax and the 2.2.0 minimum. If you misspell reportPreview in a condition or use a string where the boolean flag expects a value, TypeScript can point at the definition. The Register pattern also makes the same feature name available in other modules without threading a generic type through each handler.
Before you add the endpoint, decide what belongs to the process and what belongs to the request. The feature definitions are identical for both customers. Their identity and preview enrollment can differ. If a handler changes an attribute on a single shared user instance before awaiting a database query, another handler could replace that attribute before the first handler resumes.
Give your agent a server-side task
Use the one-shot guide to add checked-in rules. Ask your agent to keep workspace attributes local to each request and demonstrate both CSV formats.
Open the Local Flags GuideCreate a scope when the request arrives
Create server.ts. The Node.js SDK provides GrowthBookClient for the process and createScopedInstance for the current request. The two fixture paths below stand in for two authenticated workspaces. The server binds to the loopback address so you can exercise it locally.
The HTTP handler looks up a workspace, creates its scope, and holds that scope across an asynchronous operation. The short promise-based timer gives a second request time to arrive. In a real export, that's where the database or storage read would happen. Keep the stable client at module scope and the scoped instance inside the handler. If a formatter needs the decision, pass it the boolean or the scoped instance.
In production, resolve the workspace and its access rights from the authenticated session before reading the report. The two selectable paths here are fixtures for public sample data. A caller's choice of a header, query string, or workspace slug can't establish permission to read another customer's report. The endpoint also prevents shared response caching. If you cache real exports, the cache needs to distinguish the workspace and the report format, along with any other inputs that change the response.
Test two requests that overlap
In the first terminal, type-check the service and start it. A successful type check exits quietly. The next command prints the loopback address and keeps the server running.
Save the following as verify.mjs. In a second terminal, run node verify.mjs. Node's built-in fetch calls the local server. Strict assertions compare the full header and data row, including where each row ends.
You should see the single success line. Testing just the preview workspace proves that the code can add a column. Testing both responses catches the more expensive mistake of silently changing an existing customer's export. Keeping the old format assertion around is especially valuable when the downstream importer belongs to someone outside your team.
To check the compile-time boundary, temporarily change gb.isOn("includeUniqueReaders") to gb.isOn("includeUniqueReader") and rerun npx tsc --noEmit. The diagnostic should identify the misspelled key. Restore it before running the server again. A coding agent can include the before-and-after type check and the two CSV headers in its pull request.
Decide when to expand the report
When one preview customer is ready, leave everyone else on the default. If the next step is to enroll a fraction of workspaces, choose an attribute that matches the promise you're making. Hashing a workspace ID lets colleagues downloading the same report share a format. Hashing each user's ID could give two analysts in the same company different column sets. The one-shot guide shows how to express a percentage and hash attribute in a local rule.
A new rule in flags.ts reaches a process through your deployment. During a rolling deploy, the same workspace might hit old and new processes. If customers need a durable choice of export schema, keep supporting the agreed format in the API itself. When the operational requirement is to change targeting between deploys, you can keep the scoped evaluation in the handler and change how the process receives its rules. The free GrowthBook offerings overview covers Cloud Starter and self-hosting for teams that want to manage those rules.
Manage report targeting in Cloud
Create a GrowthBook workspace when the team supporting exports needs to expand the preview independently of a server release.
Get Started with GrowthBookYour conference agenda has a new “Show room” button. Reviewers should see it on the first page load. Everyone else should get the existing agenda. If a Server Component renders the old agenda and a browser hook independently decides to show the new button, the first HTML and the browser can disagree.
In the Next.js App Router, the server can make this decision once and pass a boolean to the interactive component. We'll define the flag in the repo, select the preview audience with a local test cookie, and verify the actual HTML for both visitors. Clicking the button will still work after hydration. You can follow along without a GrowthBook account or client key. If you're assigning this work to an agent, the free feature flags for coding agents walkthrough gives the background.
Keep the flag definitions on the server
Use a TypeScript App Router project, or create a small one with create-next-app. These paths assume the project has an app directory at its root. If yours uses src/app, put both app and lib under src so the relative imports still match.
Keep the starter's root layout. Create lib/agenda-flags.ts with the following code. The SDK type registration update explains how LocalFeatures checks the flag and its rule against the registered types. This setup requires version 2.2.0 or later.
The module can reuse the client and rules across requests handled by the same process. It only holds the current visitor's audience inside the function call. Two requests can therefore use the same flag file and get different results. The Node.js SDK documents the scoped client used under the App Router here.
This particular rule has no percentage and needs no visitor ID. The two audiences are sufficient. If the team later asks for a rollout to 10% of attendees, add a stable attendee or registration ID and choose which of those units should stay together. Jeremy Dorn's Register pattern article explains how a change to an attribute type reaches the call sites that construct it.
Read the cookie for this request
Create app/agenda/page.tsx. The static heading can render for everyone. The request-specific content sits behind a Suspense boundary, so the fallback can show a neutral loading message until the server has the cookie.
The App Router's cookies function reads the incoming request asynchronously. Read it inside the visitor-specific component. Keeping that read out of shared cached code lets the surrounding page reuse common content without treating one visitor's decision as another's. This placement also accommodates App Router projects using Cache Components.
Give your agent the Next.js setup
Use the local flags guide with a concrete request to evaluate one flag on the server and return the same decision to the browser.
Open the Local Flags GuideThe cookie in this demo is a convenient way to preview a public UI treatment. Anyone with that cookie can see the room label. To target paying attendees or private sessions, obtain the audience from the verified session on the server and authorize the underlying data separately.
Pass one decision to the interactive component
Create app/agenda/Agenda.tsx. It's a Client Component because a visitor can open and close the room details. Its initial branch comes directly from the boolean supplied by the page.
The client boundary takes a serializable prop. The component receives true or false. The SDK instance, targeting rules, and cookie handling stay in the server module. You don't need a React provider for this component because its only browser-side choice is whether the visitor has clicked the button.
Follow one page load through server rendering and hydration. For a preview visitor, the server can send a section with a “Show room” button. React's first client render gets the same showRoom value and starts with open set to false. Hydration attaches the click handler. Opening the room detail then updates component state and doesn't require another flag evaluation.
Verify the HTML and the click separately
Build the production app and start it on port 3100.
In a second terminal, save this as verify-agenda.mjs in the project root and run node verify-agenda.mjs. The test makes two requests to the same route and looks for a marker on the rendered section. A marker in the HTML helps catch an implementation that only adds the intended layout after JavaScript runs.
Now open http://localhost:3100/agenda in a fresh browser profile. You should see the session title without a room button. In that local page's browser console, set the demo cookie and reload.
Click Show room and look for Room 204. Click Hide room and the room should disappear. This second check proves the component became interactive. If the server response test passes but the click fails, inspect the browser console for a hydration error before changing the flag rules.
Remove the fixture and reload once more. The button should disappear and the agenda title should remain.
The reload is deliberate. Editing the cookie in an already open document doesn't rerun its Server Component. In your app, use the normal session-change flow to request a fresh server render when a visitor signs in, signs out, or leaves a preview group.
Choose where the next flag should be evaluated
For a decision needed in the initial HTML, give the agent an observable requirement. Ask it to show the two HTTP responses, then click the interactive control in the preview. The first check catches an incorrect layout. The second catches correct HTML that never becomes interactive.
If a later feature depends on an action entirely within the browser, evaluate whether its flag belongs in the client tree. The one-shot local flags guide covers both placements. This agenda only needs one server decision. Updating its checked-in rule takes a deployment. Keep that tradeoff in view if the event organizer needs to pause a preview while attendees are already arriving. For that case, compare GrowthBook’s free options for changing flags between deploys.
Manage the agenda rollout in Cloud
Create a GrowthBook workspace when the organizer needs to adjust a preview audience while your Next.js app is serving attendees.
Get Started with GrowthBookReady to ship faster?
No credit card required. Start with feature flags, experimentation, and product analytics—free.




