Feature Flags
Feature flags allow you to control feature visibility, run A/B tests, and progressively roll out new functionality without deploying new code. Oppla’s feature flags are deeply integrated with analytics, giving you real-time insights into feature adoption and impact.Why Feature Flags?
Safe Rollouts
Deploy features to production but only activate them for specific users or segments
Instant Rollback
Disable problematic features instantly without redeploying
A/B Testing
Test different variations and measure impact on key metrics
Personalization
Show different features to different user segments
Quick Start
1. Create a Feature Flag
In your Oppla Dashboard:- Navigate to Feature Flags → Create Flag
- Set flag properties:
- Name: Descriptive identifier (e.g.,
new-checkout-flow
) - Description: What this flag controls
- Type: Boolean, String, Number, or JSON
- Default Value: Fallback when conditions don’t match
- Name: Descriptive identifier (e.g.,
2. Define Targeting Rules
Target specific users or segments:3. Implement in Your Code
Advanced Usage
Server-Side Evaluation
For server-rendered applications:React Integration
Vue.js Integration
Targeting Strategies
User Attributes
Target based on user properties:Percentage Rollouts
Gradually roll out to more users:Device & Environment
Target based on device or environment:Analytics Integration
Automatic Tracking
Oppla automatically tracks:- Feature flag evaluations
- User exposure to features
- Feature adoption rates
- Impact on key metrics
Custom Events
Track specific interactions:Dashboard Metrics
Monitor in real-time:- Exposure Rate: How many users see the feature
- Adoption Rate: How many users interact with it
- Conversion Impact: Effect on business metrics
- Error Rate: Issues specific to the feature
Best Practices
1. Naming Conventions
Use clear, consistent naming:2. Clean Up Old Flags
Remove flags after full rollout:3. Flag Dependencies
Handle dependent features:4. Fallback Handling
Always have a fallback:Performance Considerations
Caching
Flags are cached in sessionStorage for performance:Batch Evaluation
Evaluate multiple flags at once:Troubleshooting
Common Issues
Issue | Solution |
---|---|
Flag always returns false | Check if user is identified before flag evaluation |
Flag not updating | Clear sessionStorage or refresh the page |
Targeting not working | Verify user attributes are set correctly |
Performance issues | Use batch evaluation instead of multiple calls |