Skip to main content

Feature Flags & A/B Testing

The Solute SDK provides powerful feature flag and A/B testing capabilities. Control feature rollouts, run experiments, and make data-driven decisions.

Check Feature Flags

Simple Boolean Flags

Get Feature Flag Value

Typed Feature Flags

A/B Testing

Get Experiment Variant

Example: Pricing Page A/B Test

Get All Flags

Reload Feature Flags

Manually refresh feature flags from the server:
Feature flags are automatically refreshed based on your configuration. You typically don’t need to manually reload them.

Next.js Integration

Using Hooks

Server-Side Feature Flags

Feature Flag Targeting

Feature flags can be targeted based on user properties. The SDK automatically includes user properties when fetching flags:

Exposure Tracking

The SDK automatically tracks exposure events when feature flags are evaluated. This helps you measure the impact of your experiments.
Exposure tracking is enabled by default. You can disable it in the configuration if needed.

Best Practices

Use clear, descriptive names like new-checkout-flow or pricing-page-v2. Avoid generic names like flag1 or test.
Provide sensible defaults for feature flags to ensure your app works even if flags fail to load.
Make sure both the enabled and disabled states of your feature work correctly.
Track exposure events to understand how many users are seeing each variant of your experiments.

Next Steps

Event Tracking

Learn about tracking events

Next.js Integration

Deep dive into Next.js integration