JavaScript, Node, Deno


⚠️ Important Notice
The documentation for Feature Experimentation and Rollout has moved.
Please visit our new documentation site here: https://docs.abtasty.com/server-side

Make sure to update your bookmarks, as this site will no longer be maintained.

Welcome to the Flagship JS SDK documentation!

The following article will guide you through the steps to get Flagship up and running on your JavaScript environment (client-side or server-side) using our client library with preconfigured methods to implement the Decision API.

Wants to have a look at the GitHub repo? Link here.

Feel free to contact us if you have any questions regarding this documentation.

📘

That SDK is compatible with NodeJS, JS, TS & Deno Environment. Any question? Contact our support

Release notes

Improved

  • Usage data collection process

Fixed

  • Fixed a typo error in the DecisionMode property value of the usage tracking hit.
  • Fixed Intl property error

Fixed

  • Usage tracking collection issue

Added

  • Collecting developer usage tracking data:
    • The SDK now collects troubleshooting data, which will help us find implementation issues
    • The SDK now collects usage data, which will help us improve our product
  • disableDeveloperUsageTracking property in config object.
  • Experience continuity in bucketing mode

Added

  • campaignName, variationGroupName and variationName in Flag metadata

Added

  • fetchFlagsBufferingTime property in config object.
  • trackingManagerConfig property in config object.
  • New warning logs

Deprecated

  • trackingMangerConfig property of config object.

Added

  • qt field in activate batch. It represents the time delta (in milliseconds) between when the hit reported occurred and the time it was sent.
  • nextFetchConfig property in config object.

Improved

  • The flow of Visitor consent hit in Periodic strategy

Fixed

  • Deno issue

Improved

  • SDK logs

Fixed

  • vitejs build issue

Added

  • Third party integration in bucketing mode

Added

Deprecated

  • onUserExposure property in SDK
  • flag.userExposure method

Changed

  • logLevel for non-consent mode and panic mode

Fixed

  • webpack 5 compilation error targeting web

Fixed

  • default logs manager timestamp

Added

  • BUCKETING_EDGE mode see
  • exports field in package.json

Added

Changed

Removed

  • activateDeduplicationTime option from SDK Config

Deprecated

  • DecisionMode.API use DecisionMode.DECISION_API instead of

Added

  • onLog property in SDK Config

Added

  • Flagship ReactJS and React-native SDK can now override SDK code version with their own

Added

  • visitor_consent key in the body of the campaign request

Removed

  • sendContextEvent query param from the campaign request

Added

  • onUserExposure property in SDK Config

Fixed

  • When flag value from Flagship is false or 0, Flag.getValue() always returns the default value instead of flag value

Updated

  • package dependencies to the latest version

Added

  • react-native Property in package.json file

Changed

  • Event hit property value can now only accept an integer and must not be a negative value

Fixed

  • Flagship.Start method returns a null instead of Flagship instance when API_KEY or ENV_ID is null,

Fixed

  • Flagship.Start method returns null instead of Flagship instance when API_KEY or ENV_ID is null,

Added

  • esm support

Added

  • slug property in flag.metadata

Changed

  • Now lookupVisitor and lookupHits methods will be called each time visitor.fetchFlags method is called
  • When the default flag value is "null", no type checking will be performed anymore

Built

  • deno package

Improved

  • Performance of Flag.exists method

Removed

  • flag.GetValue log message when value of flagDTO is null

Added

  • Deno as SDK_LANGUAGE in x-sdk-client http header when running in Deno environment

Fixed

  • Batch hit length

Changed

  • No SEGMENT hits will be sent when visitor context is empty

Fixed

  • Reset visitor cache data when visitorId property has changed

Added

  • AssignmentsHistory property in VisitorCacheDTO type

Fixed

  • Variation Re-allocation in bucketing mode

Added

  • Visitor.fetchFlags method
  • Visitor.getFlag method
  • Flag class
  • FlagMetadata class
  • Managing visitor cache
  • SDK Status / Status changed callback.
  • Visitor consent.
  • Predefined context.
  • Custom log manager
  • Visitor.getFlagsDataArray method
  • Visitor.getAllFlagsData method
  • Visitor.getFlatsDataForCampaign method

Deprecated

  • visitor.synchronizeModifications method
  • Visitor.getModification method
  • Visitor.getModificationSync method
  • Visitor.getModificationInfoSync method
  • Visitor.getModificationInfo method
  • Visitor.activateModifications method
  • Visitor.getModificationsForCampaign method
  • Visitor.getAllModifications method

Changed

  • Flagship.newVisitor signature.
  • Visitor.sendHit and Visitor.sendHits signature
  • Visitor.activateModifications signature

Removed

  • Flagship.startBucketingPolling method
  • Flagship.stopBucketingPolling method

Fixed

  • fix authenticate and unauthenticate unhandle error

Added

  • Save VisitorData at each synchronizeModifications

What’s Next