AB Testing IntegrationsExperimental
Integrate with AB testing platform to create experiments
A/B testing integration lets you create experiments and feature flags in your documentation. Test different content versions and track user behavior to optimize your docs based on real data.
We use OpenFeature specification for feature flag management, providing a standardized approach to A/B testing across your documentation.
All integrations
Feature Flags in Markdown
To use feature flags inside your content files, you can use feature/Feature
component:
:::feature{flag="demo-tutorial" match="v1"} @include "./demo-tutorial1.mdx" ::: :::feature{flag="demo-tutorial" match="v2"} @include "./demo-tutorial2.mdx" :::
Check out our A/B testing example.
Flags Evaluation
Feature flags are client-side only. Content is visually enabled when the feature flag evaluates to true. Technically we did some improvements to avoid clunky render effect during feature flat evaluation.
Thanks to that the end-user experience should be close to server-side evalutation although it's running on client side only.
By default feature context is saved in local storage for 7 days, if you'd to change this, please look at reference.
Server-side Evaluation
Currently, feature flags are evaluated client-side only. Need server-side evaluation for your use case? Join our cummunity.
Reference
contextMaxAge
number
Context max age in millisecondscontextStorageKey
string
Context storage key used to store the context in the browser storageproviders
IntegrationABTestingProviders
Providers configurationgrowthbook
IntegrationABTestingGrowthBook
GrowthBook configurationapiHost
string
Required
GrowthBook API hostclientKey
string
Required
GrowthBook client key
launchdarkly
IntegrationABTestingLaunchDarkly
LaunchDarkly configurationenv
string
Required
LaunchDarkly environment key
Feature Flags in HeadingsComing Soon
You can also use feature flags directly in your markdown content using the featureFlag
, featureMatch
, and featureDefault
in heading attributes:
## Tutorial [featureFlag="demo-tutorial" featureMatch="v1" featureDefault="v1"] :::steps 1. First step for version 1 2. Second step for version 1 ::: <!-- you can use sugar syntax too: --> ## Tutorial [feature=("demo-tutorial", "v1")] :::steps 1. First step for version 2 2. Second step for version 2 3. Additional step for version 2 :::
Analytics IntegrationComing Soon
Track user behavior and engagement with your A/B testing experiments. Send analytics events to measure which content versions perform better and optimize your documentation based on real user data.
AB Testing Samples
Learn how to setup AB tests.
Show your support! Star us on GitHub ⭐️