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

@amplitude/experiment-js-client

Package Overview
Dependencies
Maintainers
0
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplitude/experiment-js-client

Amplitude Experiment Javascript Client SDK

  • 1.14.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
96K
decreased by-33.74%
Maintainers
0
Weekly downloads
 
Created

What is @amplitude/experiment-js-client?

@amplitude/experiment-js-client is a JavaScript client for Amplitude Experiment, which allows you to run A/B tests and feature flagging experiments. It helps you deliver personalized experiences to your users by targeting specific segments and measuring the impact of changes.

What are @amplitude/experiment-js-client's main functionalities?

Initialize the Client

This code initializes the ExperimentClient with your API key and starts the client. This is the first step to use the client for running experiments.

const { ExperimentClient } = require('@amplitude/experiment-js-client');
const client = new ExperimentClient('YOUR_API_KEY');
client.start();

Fetch Variants

This code fetches the variants for a given user. The `fetch` method takes a user object and returns the variants assigned to that user.

client.fetch({ user_id: 'user123' }).then(variants => {
  console.log(variants);
});

Track Exposure

This code tracks the exposure of a user to a specific variant. The `track` method takes an object with user information and the variant they were exposed to.

client.track({ user_id: 'user123', variant: 'variantA' });

Other packages similar to @amplitude/experiment-js-client

Keywords

FAQs

Package last updated on 27 Dec 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