Skip to main content

Implementing Dynamic Configs

Use a language-specific Statsig SDK to implement a dynamic config in your application

  • To retrieve the dynamic config, initialize the Statsig SDK as shown below
    await statsig.initialize("<CLIENT-SDK-KEY>");
  • To fetch the JSON parameters in your dynamic config, use the getConfig call to retrieve the dynamic config object as shown below
    const localConfig = statsig.getConfig("localization");
    const likeText = localConfig.get("like_us", "Like Us");
    const twitterText = localConfig.get("post_twitter", "Share on Twitter");
    const inviteText = localConfig.get("invite_friend", "Invite a friend");

Still Stuck?

Join our Slack community and chat with our Engineers and Data Scientists