JavaScript, Node, Deno
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
Added
- OnVisitorExposed callback in config object
Deprecated
- onUserExposure property in SDK
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
- Hits are now sent with a batch processing system see
- trackingMangerConfig option in SDK Config
- DecisionMode.DECISION_API enum in decisionMode option of SDK Config
- Flagship.close method
Changed
- Interface IHitCacheImplementation
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
or0
, 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
Updated 14 days ago