Add the Uniform Marketplace app to Contentful

The Uniform app in the Contentful Marketplace enables content managers to use Uniform capabilities within the Contentful user interface.

  • Classification - Assign enrichment tags to Contentful entries. These tags describe data you want to track on the visitor who views the entry. For example, you might want to track that a visitor is interested in making a purchase when the visitor views a specific entry.
  • Personalization - Associate personalization conditions with Contentful entries. For example, you might have a hero entry that should only be shown to visitors coming from a specific geographic region. You can also configure personalized lists of content entries.

This section guides you through the process of adding the Uniform app from the Contentful Marketplace to your Contentful space.

Before you start

You must have the following available to complete this setup:

  • Contentful account with administrator access.
  • Uniform account with administrator access. If you don't already have one, you can request an account at https://uniform.dev/try.

A Uniform API key is needed in order for the Marketplace app to read various settings involved with configuring personalization. You need an API key with the following permissions:

info

You need the Quick Connect API key from Uniform to configure the Uniform app in Contentful.

tip

For details on how to create an API key, see the instructions on how to create a Uniform API key.

The Uniform app in the Contentful Marketplace adds a number of custom field types that allow content authors to configure personalization during the content authoring process. You must add this app to your space.

  1. In Contentful, open your space.

  2. Navigate to Apps > Manage apps.

  3. In the Available section, find the Uniform app and click Install App.

    app
  4. Click Install.

    install
  5. Click Authorize access.

    authorize-access

    About this step

    This gives the Uniform app the ability to make changes in Contentful.

  6. Paste your Quick Connect API key in the field.

    paste-api-key

    About this step

    This is the value you copied when you created the API key in Uniform.

  7. Click Connect.

    About this step

    If the Quick Connect API key you entered is valid, you will see a message indicating the Marketplace app was able to connect to your Uniform project.

  8. In the upper right-hand corner, click Install.

  9. Click Save.

Enrichment tags can be assigned to Contentful entries. When your front-end application has classification activated, Uniform uses these tags to classify the visitor when the entry is viewed.

:::info Before you start You should have at least one enrichment defined in your Uniform project. You can enable enrichment tagging without having any enrichments defined, but you won't be able to complete all the steps in this section without them. :::

You must specify which content types you want content authors to be able to assign enrichment tags to.

  1. In Contentful, open your space.

  2. Navigate to Apps > Manage apps.

    app
  3. In the Installed section, click Uniform Optimize.

    marketplace-app-open
  4. Scroll down to the section ENRICHMENT TAGGING.

  5. From the dropdown list, select the content types you want to enable tagging on.

    config-changed
  6. Click Save.

  7. Click a link on one of the content types you enabled. A new field Enrichment Tags is added to the content type.

    field-added

A content author must assign enrichment tags to content entries.

  1. In Contentful, open your space.

  2. Navigate to an entry based on one of the content types you enabled enrichment tagging on.

  3. Scroll down to the field Enrichment Tags.

    empty-field
  4. Click here.

    field-editing-activated
  5. Select the tag you want to assign.

    field-edited

    About this step

    The value for Strength indicates how much the visitor score increases when the content entry is viewed. The visitor score can act as the basis for personalization criteria.

  6. Click Add.

    field-set

At this point there are several things you can do:

  • Change the strength value using the input field.
  • Add more enrichment tags by clicking Add More.
  • Publish your changes in Contentful.
  • Manage enrichments in Uniform by clicking Manage Enrichments.

Personalization criteria can be assigned to Contentful entries. This criteria describes the conditions when the Contentful entry is appropriate to use. When your front-end application has classification and personalization activated, Uniform can show and hide content based on the criteria you configure.

You must specify which content types you want content authors to be able to assign personalization criteria to.

  1. In Contentful, open your space.

  2. Navigate to Apps > Manage apps.

    app
  3. In the Installed section, click Uniform Optimize.

    marketplace-app-open
  4. Scroll down to the section PERSONALIZATION CRITERIA.

  5. From the dropdown list, select the content types you want to enable personalization criteria on.

    config-changed
  6. Click Save.

  7. Click a link on one of the content types you enabled. A new field Personalization Criteria is added to the content type.

    field-added

A content author must assign personalization criteria to content entries.

  1. In Contentful, open your space.

  2. Navigate to an entry based on one of the content types you enabled personalization criteria on.

  3. Scroll down to the field Personalization Criteria.

    empty-field
  4. Click Add Criteria.

    field-editing-activated
  5. Configure the criteria you want to assign.

    field-edited

    About this step

    Each criteria consists of three parts:
    - The dimension identifies a property of the visitor. - The operator specifies how you want to compare the value from the visitor to the value in the criteria. - The value that the value from the visitor is compared to.

At this point there are several things you can do:

  • Add more personalization criteria by clicking Add Criteria.
  • Publish your changes in Contentful.

Personalization lists allow you to create lists of content entries where the personalization criteria assigned to the entries is used to determine which entries to display to a visitor.

A personalization list is a special type of content type that the Uniform app creates. Once the content type is created, you use it to create entries like any other content type.

  1. In Contentful, open your space.

  2. Navigate to Apps > Manage apps.

    app
  3. In the Installed section, click Uniform Optimize.

    marketplace-app-open
  4. Scroll down to the section PERSONALIZATION LISTS.

  5. Click + Create New.

  6. Enter a name for the list.

    name-entered

    About this step

    The name is used to create a new content type.

  7. Click Confirm.

  8. Click Save.

  9. Navigate to the content model section. You will see a new content type created.

Create a personalization list entry#

A personalized list entry should contain content entries that are somewhat related but that shouldn't all be shown to all visitors.

For example, you might have a set of entries that represent products that you want to feature on the homepage of your site. You want the product that's most relevant to the visitor to be displayed. With Uniform, you would enable this by doing the following:

  • Content author assigns personalization criteria on the product entries.
  • Content author creates a personalized list with the products selected.
  • At runtime, Uniform classifies a visitor and determines which of the products in the personalized list is most relevant for the visitor based on the visitor's classification.

The following steps describe how to create a personalized list.

  1. Create a new content entry using the personalized list.

  2. In the field List Items, add content entries.

    About this step

    You should select content entries with personalization criteria configured.

The configuration described above only describes things that should happen when specific content is viewed. It doesn't actually cause anything to happen. You need to activate classification and personalization in your front-end application. For example, when a visitor views a specific type of content, you might want to classify the visitor in a specific way.

tip

As a next step, we recommend you follow one of our tutorials. These guide you through the entire process of enabling classification and personalization with Contentful, using your preferred front-end technology.