Javascript SDKs for Hackle
    Preparing search index...

    Implements

    Index

    Constructors

    • Parameters

      • core: HackleCore
      • synchronizer: PollingSynchronizer
      • sessionManager: SessionManager
      • userManager: UserManager
      • piiEventManager: PIIEventManager
      • fetchThrottler: Throttler
      • pageManager: PageManager
      • inAppMessageUi: InAppMessageUi
      • OptionaldevTools: DevTools

      Returns default

    Methods

    • Returns current session ID

      Returns string

      if session is unavailable, returns 0.ffffffff

      11.8.0

    • Parameters

      • userId: string | number

      Returns Promise<void>

    • Updates the user's properties.

      Parameters

      • operations: PropertyOperations

        Property operations to update user properties.

      Returns Promise<void>

    • Updates the user's push subscriptions.

      Parameters

      • operations: HackleSubscriptionOperations

        Push subscription operations to update user properties.

      Returns Promise<void>

    • Updates the user's SMS subscriptions.

      Parameters

      • operations: HackleSubscriptionOperations

        SMS subscription operations to update user properties.

      Returns Promise<void>

    • Updates the user's Kakao subscriptions.

      Parameters

      • operations: HackleSubscriptionOperations

        Kakao subscription operations to update user properties.

      Returns Promise<void>

    • Set user's phone number. Existing value will be replaced by new value if you call this method multiple times.

      Parameters

      • phoneNumber: string

        String satisfying valid E.164 format is accepted.

      Returns Promise<void>

    • Determine the variation to expose to the user for experiment.

      This method return the {"A"} if:

      • The experiment key is invalid
      • The experiment has not started yet
      • The user is not allocated to the experiment
      • The determined variation has been dropped

      Parameters

      • experimentKey: number

        the unique key of the experiment.

      • Optionaluser: string | User

        the user to participate in the experiment. MUST NOT be null.

      • OptionaldefaultVariation: string

        the default variation of the experiment.

      Returns string

      string the decided variation for the user, or the default variation.

    • Determine the variation to expose to the user for experiment, and returns an object that describes the way the variation was determined.

      Parameters

      • experimentKey: number

        the unique key of the experiment.

      • Optionaluser: string | User

        the user to participate in the experiment. MUST NOT be null. (e.g. { id: "userId"} )

      • OptionaldefaultVariation: string

        the default variation of the experiment. MUST NOT be null.

      Returns Decision

      object

    • Determine whether the feature is turned on to the user.

      Parameters

      • featureKey: number

        the unique key for the feature.

      • Optionaluser: string | User

        the user requesting the feature.

      Returns boolean

      boolean True if the feature is on. False if the feature is off.

      2.0.0

    • Determine whether the feature is turned on to the user, and returns an object that describes the way the value was determined.

      Parameters

      • featureKey: number

        the unique key for the feature.

      • Optionaluser: string | User

        the identifier of user.

      Returns FeatureFlagDecision

      2.0.0

    • Records the event performed by the user.

      Parameters

      • event: string | HackleEvent<string>

        the unique key of the event. MUST NOT be null.

      • Optionaluser: string | User

        the identifier of user that performed the event. id MUST NOT be null. (e.g. { id: "userId"} )

      Returns void

    • Parameters

      Returns void

      trackPageView is deprecated and do nothing.

      Use the setCurrentPage method to track the page view.

    • Tracking the page manually This method always triggers page events regardless of whether the page has changed

      Parameters

      • page: HacklePage

      Returns void

    • Return a instance of Hackle Remote Config.

      Parameters

      • Optionaluser: User

        the identifier of user.

      Returns HackleRemoteConfig

    • Parameters

      • block: () => void

        callback function.

      • timeout: number = DEFAULT_ON_READY_TIMEOUT

      Returns void

      use onInitialized instead.

    • Parameters

      • experimentKey: number

      Returns HackleExperiment

    • Parameters

      • Optionalconfig: { timeout?: number }

      Returns Promise<{ success: boolean }>

    • Set InAppMessage listener.

      Parameters

      • listener: HackleInAppMessageListener

        The listener to be set.

      Returns void

    • Get displayed InAppMessage view.

      Returns HackleInAppMessageView

      if there is no displayed InAppMessage, return null.