Enabling adaptive content
Choose an authentication method to pass user data to GitBook.
Last updated
Was this helpful?
Choose an authentication method to pass user data to GitBook.
Last updated
Was this helpful?
To start customizing your documentation experience for your readers, you'll need to enable adaptive content and decide how your visitor data is passed to GitBook. This lets your site's content dynamically adapt based on who's viewing it.
Before you’re able to pass user data to GitBook, you’ll need to configure your site to use adaptive content.
Head to your , and enable “Adaptive content” from your site’s audience settings. Once enabled, you’ll get a generated “Visitor token signing key”, which you’ll need in order to continue the adaptive content setup.
After enabling adaptive content, you’ll need to define a schema for the types of claims you expect GitBook to receive when a user visits your site.
The adaptive content schema should reflect how these claims are structured when sent to GitBook.
For example, if you expect a visitor to potentially be a beta user in your product, you would set an adaptive schema similar to:
If you intend to work with unsigned claims, you will need to declare the claims you are expecting in the schema under an “unsigned” prop alongside your signed claims.
GitBook provides different ways to pass visitor data to adapt your site's content. After defining your schema, you’ll need to decide how you want to pass your visitor data to GitBook.
This will also help you use autocomplete when configuring your claims in the .
Cookies
Pass visitor data into your docs through a public or signed cookie.
URL
Pass visitor data into your docs through URL query parameters.
Feature flags
Pass visitor data into your docs through a feature flag provider.
Authenticated access
Pass visitor data into your docs through an authentication provider.