Skip to content

Optimizely

The Optimizely app adds a field type that lists the audiences of a connected Optimizely project. Store an audience ID on a block to build A/B tests and show content to one segment of your audience.

  • Select an Optimizely audience from within Storyblok.
  • Build A/B tests around the stored audience IDs.
  • Show a block only to the audience it targets.
  1. In Optimizely, create a user with read-only access and generate an OAuth token in the account settings.
  2. Install the Optimizely app from the app directory.
  3. In the Block Library, add a field to a block, set its field type to Plugin, and select optimizely-v2 as the custom type.
  4. Enter the Optimizely OAuth token and project ID in the field options.

To show user-specific content, create an AbTest block with a segment field of the Optimizely plugin type and a body field of type Blocks. When your frontend iterates over the content blocks, it decides which block to render based on the selected audience.

The recommended content structure:

  • Block: Page
    • Field: Body (Blocks)
      • Block: AbTest
        • Field: Segment (Optimizely plugin)
        • Field: Body (Blocks)
      • Block: AbTest
        • Field: Segment (Optimizely plugin)
        • Field: Body (Blocks)

Was this page helpful?

What went wrong?

This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.