Contentstack LogoContentstack Logo

Add a Custom Attribute to an Audience

After successfully creating the custom attribute in Personalize, you can add it to an Audience for better content targeting.

Prerequisites

  • Contentstack account
  • Access to the Contentstack Organization that has Personalize enabled
  • Access to a project in Personalize
  • A custom attribute already created in Personalize

Steps for Execution

Note: For this guide, we have assumed that you have already created a Personalize project. If not, please follow this guide and create a project in Personalize.

After creating a custom attribute, you can add it to an Audience. Log in to your Contentstack account and perform the following steps:

  1. To access the new home screen and top navigation, enable the Try the New Navigation toggle located within the profile dropdown.
  2. From the App Switcher, click the Personalize icon.
    app-switcher-personalize.png
  3. You will be redirected to the Personalize Projects landing page. Click the project for which you want to add the custom attribute.
  4. Click the Audiences tab, and then click the + New Audience button to create a new audience if you have not created one already.

    Note: If you have an existing Audience in your Personalize project, open it or click the corresponding vertical ellipses under the Actions section, select Edit, and jump directly to step 5.

  5. On the Audience page, provide a suitable Name and an optional Description for the audience.
  6. In the Rules section, click the + Add Rule button. Add Rule button screenshot

    To add the custom attribute:

    • Click the Select attribute dropdown.
    • Scroll through the dropdown and select the custom attribute you want to add.
    • Click Select Operator to select an attribute-specific operator.
    • Enter a matching criterion for the condition in the Select Value field. Select Value screenshot

    Similarly, you can add multiple attributes (preset and custom) to an Audience.

    Additional Resource: You can use the Personalize Edge API to set and update user attributes.

  7. Click Save to complete the setup.

This adds the new custom attribute to your audience.

Additional Resource: You can use the Personalize Management API to create or update audiences with a custom attribute, delete, and retrieve all existing attributes.

Was this article helpful?
^