Run native feature flagging, mobile A/B testing, and digital experiment variations using Optimizely SDK.
Run feature flagging and mobile A/B testing with Optimizely. Nativine embeds native Optimizely Feature Experimentation SDKs, enabling product teams to toggle native features, roll out dynamic web variations, and optimize conversion funnels in real time.
Optimizely is an enterprise experimentation platform. Nativine's native Optimizely integration allows developers to evaluate feature flags at native speeds before web view rendering:
To evaluate a feature flag or get variation assignments in JavaScript, call nativine.optimizely.isFeatureEnabled():
// Evaluate feature flag
nativine.optimizely.isFeatureEnabled({
featureKey: 'new_checkout_flow',
userId: 'user_456',
callback: 'onFeatureFlagResult'
});
function onFeatureFlagResult(result) {
if (result.enabled) {
console.log("New checkout flow enabled for this user!");
}
}
| Parameter | Type | Description |
|---|---|---|
featureKey | string | Required. Feature flag key defined in Optimizely Feature Experimentation. |
userId | string | Required. Unique user identifier for consistent bucketing. |
No. Optimizely caches the JSON datafile locally on the device, allowing instant offline flag evaluation with zero network requests.
Yes. Pass an attributes object containing key-value pairs (e.g. { plan: 'pro', country: 'US' }) to target specific user segments.