Personizelypersonizely.net

All releases

New feature

@personizely/sdk: full-stack experiments in Node, the browser and the edge

Our new JavaScript SDK lets developers run full-stack experiments, feature flags and personalizations anywhere JavaScript runs: in the browser, on a Node server or at the edge. Decisions are made locally from your website's campaign data, so there is no network call per decision, and each visitor always lands in the same variation.

npm install @personizely/sdk
import { Personizely } from '@personizely/sdk'

const ply = new Personizely({ apiKey: 'your-website-key' })
await ply.ready()

const result = await ply.runCampaign(1234)
if (result?.getFeature('checkout-v2').enabled) {
  // show the new checkout
}

It reports impressions, events and goals to Personizely like the regular snippet, so results show up in your campaign reports. The SDK runs full-stack campaigns only; content, product, shipping, URL split and template campaigns keep running through the Personizely snippet on your store.

See the package page on npm for setup and examples.

  • API