For the complete documentation index, see llms.txt. This page is also available as Markdown.

Remote Config

Remote Config is a feature that allows you to replace values or properties managed in your application with parameter values defined in the Hackle Dashboard, enabling real-time control of application behavior and configuration.

Navigate to the Remote Config screen in the Hackle Dashboard to configure parameter information and set values based on user identification rules.

remoteConfig

Calling the remoteConfig() method returns a HackleRemoteConfig instance that holds the Remote Config information for the user (configured parameters and rule information). remoteConfig() can receive User Identifier information to match user properties against Remote Config rule information. You can access the desired parameter and receive its value through the methods provided by HackleRemoteConfig.

hackleClient.onReady(function() {
  const user = { id: "ae2182e0" };
	// 원격 구성 정보를 담은 인스턴스를 반환합니다.
	const remoteConfig = hackleClient.remoteConfig(user)
});

Remote Config Parameter Lookup

  • The HackleRemoteConfig returned by the remoteConfig() method provides a get() method for looking up parameter values.

  • Since parameter values configured on the Hackle Remote Config screen exist as key-value pairs, you can use the methods below according to the configured parameter type to receive the configured parameter value.

hackleClient.onReady(function() {
  const user = { id: "ae2182e0" };
  // 원격 구성 정보를 담은 인스턴스를 반환합니다.
  const remoteConfig = hackleClient.remoteConfig(user)

  //remoteConfig 에서 get() 메소드를 통해 parameter 값 가져오기
  const parameterValue = remoteConfig.get(parameterKey, defaultValue)

  // string 유형의 parameter값 예제
  const strValue = remoteConfig.get("parmeterKey", "defaultValue")
});
  • The parameterKey of the get() method is the key configured in the Remote Config parameter settings.

  • defaultValue is the value returned when the Remote Config value cannot be determined. The entered defaultValue may be returned in the following situations:

    • A. A value of a different type than the type set on the Remote Config screen is provided

    • B. An unconfigured parameter key is called

    • C. Hackle SDK initialization failure

    • D. Invalid identifier information is provided or does not exist

    • E. ETC

  • To receive the configured information correctly, you must enter a value of the type that matches the parameter type you configured in defaultValue.

  • The Remote Config parameter types provided by the SDK are string, number, and boolean. The JSON type configured on the Remote Config parameter screen can be received as a string. The default value for JSON type must be entered as a string type.

Last updated