Personalizing docs with the Bucket adapter for GitBook

GitBook’s recently released adaptive content enables you to deliver tailored documentation to whomever is reading.

When someone uses the Bucket app, for example, we know a few things about them: like who they are, which plan they're subscribed to, and which features they have access to. Adaptive content enables us to use that information to personalize our documentation for them.

GitBook provides different ways to pass such visitor data to them, including cookies, URL, authenticated access, and feature flags. Of course, we use Bucket to flag features in Bucket, so we chose to pass data into our docs using their Bucket adapter.

The Bucket adapter enables your docs to know which features a user has access to and they’re available as part of the visitor schema under the unsigned.bucket.flags object.

Using that info, we can personalize the docs in four ways to hide or show:

  • Pages
  • Site variants
  • Site sections
  • Header links

We take a customer-centric approach to development and often give customers early-access to new features to get feedback. So we’re using adaptive content to customize our docs for beta users. Given we know the features a visitor has access to, we can use that to show documentation to users of features that are still in closed beta without leaking news of their upcoming release to everyone else. That provides a better experience to beta users, and it keeps Marketing happy, too.

But that’s just one use-case, we’re exploring how else we can personalize our docs even further. One we’re keen to get to is to customize the docs homepage. It’s optimized for new users, going straight into creating your first flag and installing the Bucket SDK. However, for existing users who have already done that, it would be great to be able to show some more useful links to them.

If you’re interested in adapting your own docs, check out the adaptive content documentation over on the GitBook site, including how to use the Bucket adapter to leverage feature flag access data.