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: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 descriptive flag names
Use descriptive flag names
Use clear, descriptive names like
new-checkout-flow or pricing-page-v2. Avoid generic names like flag1 or test.Always provide default values
Always provide default values
Provide sensible defaults for feature flags to ensure your app works even if flags fail to load.
Test both variants
Test both variants
Make sure both the enabled and disabled states of your feature work correctly.
Monitor exposure events
Monitor exposure events
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
