This package, `statsig-node-vercel`, provides a first-party integration between the Statsig server-side Node.js SDK and Vercel's Edge Config. It allows developers to store and retrieve Statsig configuration, including feature gates, dynamic configs, and ID lists, directly from Vercel Edge Config, leveraging its low-latency, globally distributed data store. The current stable version is 0.8.1, and its release cadence appears to be tied to updates in the main Statsig Node.js SDK and Vercel's Edge Config features, with a focus on optimization and direct data parsing. Key differentiators include seamless integration with Vercel infrastructure, reduced network latency for Statsig evaluations by utilizing Edge Config, and specific optimizations for ID list handling. It significantly streamlines the deployment and management of Statsig configurations within Vercel environments.
npm install statsig-node-vercelVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Statsig Node.js SDK using the Vercel Edge Config adapter, showing setup, environment variable usage, and a basic feature gate check.
Remove any manual `JSON.stringify` or `JSON.parse` calls when interacting with data fetched via `EdgeConfigDataAdapter`. The adapter handles object serialization/deserialization automatically.
Ensure `initStrategyForIDLists: 'none'` and `disableIdListsSync: true` are included in the Statsig initialization options. If immediate ID list evaluation is critical on startup, consider the performance implications or pre-warm your Edge Config.
Double-check that the `edgeConfigItemKey` provided to `EdgeConfigDataAdapter` precisely matches the key generated during the Statsig Vercel Integration installation in your Vercel project settings (e.g., 'statsig-5FSfBpWM9kUPqeKRlZPkod').
Set the `EDGE_CONFIG_CONNECTION_STRING` environment variable in your Vercel project or local development environment. This string is provided by Vercel for your Edge Config.
Verify that the `edgeConfigItemKey` passed to `EdgeConfigDataAdapter` is correct and that the Statsig Vercel Integration has been successfully installed and populated data into your Edge Config instance.
Ensure `import statsig from 'statsig-node';` is at the top of your file and that `await statsig.initialize()` is called before any other Statsig functions.