Pass visitor data into your docs through a feature flag provider
Using adaptive content with feature flags requires adding code to your application.
Currently, the GitBook helper only supports React based setups.
GitBook provides helper functions and integrations for popular feature flag service providers like LaunchDarkly and Reflag.
This allows you to read the feature flags users have access to in your product, as they read your docs. This is useful if you need to show documentation for features that are only available to a specific group of people.
A visitor schema is required in order for your claims to be able to be read in your published site. Installing and configuring the LaunchDarkly integration should automatically set your visitor schema for you.
6
Personalize your content
After setting your visitor schema, you’re ready to tailor your docs experience for the users visiting your site, using the feature flags the user has access to.
Any feature flag value available in LaunchDarkly will be exposed as part of the visitor schema under the visitor.claims.unsigned.launchdarkly object. Read more about unsigned claims here.
Head to adapting your content to learn more about personalizing your docs for your users.
A visitor schema is required in order for your claims to be able to be read in your published site. Installing and configuring the Reflag integration should automatically set your visitor schema for you.
6
Personalize your content
After setting your visitor schema, you’re ready to tailor your docs experience for the users visiting your site, using the feature flags the user has access to.
Any feature flag value available in Reflag will be exposed as part of the visitor schema under the visitor.claims.unsigned.reflag object. Read more about unsigned claims here.
Head to adapting your content to learn more about personalizing your docs for your users.
Feature flag values are evaluated on the client side, so avoid using this method to pass sensitive or security-critical data.