Custom flag change types

Overview

Change types define what kind of content is handled within a personalization or experiment from the "Variants" tab of a Contentful Personalization experience.

The following change types are supported:

  • Contentful The standard change type, that allows you to replace one Contentful entry with another across all the instances where this content is displayed, in the spaces where Contentful Personalization is installed.

  • Custom flag A flexible change type, that allows you to personalize content outside of Contentful.

Custom flag change types provide an alternative way to manage changes without direct content entry replacements. Instead of swapping Contentful entries, you can use an ID in your code paired with plain text or JSON to make the change. This method enables modifications using a flag-based logic, making it ideal for alternative personalization and experimentation setups.

Important: Custom flag change types are currently in beta. Reach out to your CSM if you would like access to this feature.

Use cases

  • Feature rollouts: Gradually release experiences or features.

  • Feature experimentation: Test if a certain element, feature, user flow or any other experience has an effect on your conversion rate.

Set up Custom flag change types

Important: For custom flag experiences to take effect, you need a developer to make use of a custom flag within your frontend.

To set up a Custom flag change type:

  1. Log in to the Contentful web app.

  2. Select the space where Contentful Personalization is installed.

  3. Navigate to the "Content" tab, and open a Personalization or Experiment. The experience editor is displayed.

  4. Go to the “Variants” section.

  5. Set the Type field to Custom flag.

  6. Set the Value type field to either Plain text or JSON. The format defines whether the actual flag value is a string (any type of text) or JSON (structured format).

  7. Under the Flag key field, enter the ID by which the developer can access the value in your frontend.

  8. The Baseline field represents the value used when the individual end-user on your website is eligible for an Experience but assigned to the control/holdout.

  9. The Variant field represents the value used when the individual end-user on your website is assigned to a variant.

    NOTE: Usually, a developer provides the information and values for most (or all) of these items, or will help you to set them up to take effect. Reach out to your developer for help.

    Custom flag change types


  10. Click Publish.

For more information about the SDK implementation, see the developer documentation.

Limitations

  • During the beta phase, you cannot set a priority of Experiences when the same Flag Key is used in multiple Experiences.