New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@optimizely/optimizely-sdk

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@optimizely/optimizely-sdk

JavaScript SDK for Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts

  • 5.3.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
102K
decreased by-45.42%
Maintainers
1
Weekly downloads
 
Created

What is @optimizely/optimizely-sdk?

@optimizely/optimizely-sdk is a feature flagging and A/B testing library that allows developers to experiment with and optimize their applications. It provides tools for running experiments, managing feature flags, and personalizing user experiences.

What are @optimizely/optimizely-sdk's main functionalities?

Feature Flagging

This feature allows you to manage feature flags, enabling or disabling features for specific users or groups of users.

const optimizely = require('@optimizely/optimizely-sdk');
const optimizelyClient = optimizely.createInstance({
  sdkKey: 'your-sdk-key'
});

const userId = 'user123';
const featureEnabled = optimizelyClient.isFeatureEnabled('new_feature', userId);

if (featureEnabled) {
  console.log('Feature is enabled for this user');
} else {
  console.log('Feature is not enabled for this user');
}

A/B Testing

This feature allows you to run A/B tests by assigning users to different variations of an experiment and measuring their behavior.

const optimizely = require('@optimizely/optimizely-sdk');
const optimizelyClient = optimizely.createInstance({
  sdkKey: 'your-sdk-key'
});

const userId = 'user123';
const variation = optimizelyClient.activate('experiment_key', userId);

if (variation === 'variation_1') {
  console.log('User is in variation 1');
} else if (variation === 'variation_2') {
  console.log('User is in variation 2');
} else {
  console.log('User is in control group');
}

Event Tracking

This feature allows you to track events and user actions, which can be used to measure the impact of experiments and feature flags.

const optimizely = require('@optimizely/optimizely-sdk');
const optimizelyClient = optimizely.createInstance({
  sdkKey: 'your-sdk-key'
});

const userId = 'user123';
optimizelyClient.track('event_key', userId, { revenue: 100 });
console.log('Event tracked for user');

Other packages similar to @optimizely/optimizely-sdk

Keywords

FAQs

Package last updated on 06 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc