Contentstack Demonstrates 295% ROI as Part of New Go Composable Initiative295% ROI with ContentstackRead more
cs-icon.svg

Audience Plugin Usage Guide

Audience plugin allows you to customize the target viewers of your JSON Rich Text Editor content.

Consider a scenario where you have to display different content on your university website for faculty and students. Creating multiple entries with additional content for various audiences can be time-consuming. In this case, the use of the Audience plugin can be convenient. Audience data can be added to a content type, and this value can be referred to in multiple content types to customize the audience who can view your content. This helps make your content audience-centric and can improve the reach of your content.

Prerequisites

This step-by-step guide explains how to set up and use the Audience plugin within your JSON Rich Text Editor in Contentstack.

Setting Up and Using the Audience Plugin

The steps to set up and use the Audience plugin are as follows:

  1. Create a Content Type to Render your Audience
  2. Install and Configure the Audience Plugin
  3. Add the Audience Plugin within your JSON Rich Text Editor
  1. Create a Content Type to Render your Audience

    Let's create a content type called University for this use case. This content type will contain the faculty and student information that can be referred within the JSON Rich Text Editor in multiple content types to customize the audience (faculty/students) who can view your content. The content type from which you render your audience content must match the following structure:

    image10.png

    Note: Your audience data content type must have a Title and a Group field set to type multiple containing a Title field with the UID as title.

    Create an entry for this content type as given below:

    image3.png After you have created the content type with an entry from which you are rendering the target audience, let's install and configure the Audience plugin.
  2. Install and Configure the Audience Plugin

    Follow the steps below to install the application in Contentstack.

    1. Log in to your Contentstack account.
    2. On the left-hand-side primary navigation, you will find a new icon for Marketplace (as shown below). Click the icon to go to the Marketplace. 
      image4.jpg
    3. Within the Marketplace, you will be able to see all the apps available, hover over the Audience app and click the Install App button.
    4. image7.png
    5. In the popup window, select the stack where you want the Audience app to be installed and click Install.
    6. image14.png
    7. To configure your plugin, enter the Content Type UID from which the target audience will be rendered, the Field UID, and the Group Title.
    8. image5.png
    9. Click Save and then click the Open Stack button to start using the plugin within your stack.
  3. Add the Audience Plugin within your JSON Rich Text Editor

    1. Go to your stack and click the “Content Models” icon on the left navigation panel, and click the + New Content Type button.
    2. Create a content type by adding relevant details and click the Save and proceed button.
    3. image2.png
    4. In the Content Type Builder page, add a JSON Rich Text Editor field in your content type by clicking on the “Insert a field” link represented by a + sign.
    5. Under Select Plugin(s), select the Audience plugin.
    6. image8.png
    7. After adding the plugin, click Save or Save and Close to save your changes.
    8. image6.png
    9. Now, create an entry for the Institution content type.
    10. Within your JSON Rich Text Editor add your content and click the Audience icon to customize which target audience can view the specific content.
    11. image12.png
    12. From the options, select the target audience (Faculty/Students/All) for your content and click the Add Selected button.
      1. If you want to select Faculty as the audience:
      2. image9.png
      3. If you want to select Students as the audience:
      4. image11.png
      5. If you want to select both Faculty and Students as the audience:
      6. image1.png
    Now, the content you add would be visible to the faculty, students, or both. You need not create separate entries to add different content. You can use the audience plugin and customize your content as per your target audience.

image4.png

Was this article helpful?
^