Loading Audio...

Listen to Lesson
0:00
  • Speed 0.5x
  • Speed 0.75x
  • Speed 1x
  • Speed 1.25x
  • Speed 1.5x
  • Speed 2x
  • Brian
  • Caris

Exploring Clarity’s Tailored Experiences

Liferay’s segmentation and personalization capabilities enable you to deliver targeted content. So far, you’ve explored the foundational concepts and benefits of personalization in Liferay. In this article, you’ll apply those concepts to Clarity’s website by defining a user segment based on specific user attributes. Then, you’ll personalize Clarity’s Home page to display a personalized banner to this segment.

Exercise: Defining a Segment by User Attribute

With Liferay DXP’s OOTB segments, you can target user attributes and session properties. Clarity needs a segment for targeting distributor representatives. Here you, you’ll define this segment based on these user attributes: job title and user group membership.

  1. Sign in as the Clarity Admin user.

    • Username: admin@clarityvisionsolutions.com
    • Password: learn
  2. Open the Site Menu (Site Menu), expand People, and select Segments.

  3. Click New to create a segment.

  4. For title, enter Distributor Representatives.

  5. From the Properties menu, drag and drop the Job Title into the main part of the screen.Liferay UI screenshot: Drag the Job Title field from the right sidebar into the "User with Property" conditions field.

  6. Set the condition to equals and enter Distributor.

  7. From the Properties menu, drag and drop the User Group property into the main part of the screen.

  8. Set the condition to equals and use the Select button to choose the Distributors user group.

  9. Change the conjunction to Or.
    By doing this, you cover both scenarios: users with the Distributor job title and users directly assigned to the Distributor role.
    Liferay UI screenshot: The conditions field should now list two conditions, 1. Job Title Equals Distributor, or, 2. User Group Equals Distributors

  10. Click View Members to validate Daniel Raymond and Terrence Wheatley meet the segment condition.

  11. Click Save.

Great, you’ve successfully defined the Distributor Representatives segment! Next, you’ll create personalized experiences for this segment.

Exercise: Personalizing a Page for Specific Segments

Once you’ve defined segments, you can create content page experiences that tailor your site to them. Clarity needs to personalize their home page to display targeted content for their Distributor Representatives segment. Here you’ll implement this as the Clarity Admin user.

  1. Go to the Home page and click Edit ().

  2. Click the Experience drop down at the top of the page and choose New Experience.

    Liferay UI screenshot: After selecting the "default" field for the experience selector, a button to create a New Experience will be present.
  3. Enter Distributor Experience for the Name field.

  4. For the Audience, choose the Distributor Representatives option.

  5. Click Save.

  6. Click Prioritize Experience () on the Distributor Experience row.
    This places the segment above the Default experience, ensuring the Distributor Experience appears first and the label on the record should update to Active.
    Liferay UI screenshot: In the experience selector, the prioritize experience icon moves the experience above the default experience.

    The order of experiences determines their priority. Liferay evaluates which segments a user belongs to and applies the highest-priority matching experience.
  7. While on the Distributor Representatives experience, hide the Distributor Promo container.
    Since Distributors don’t need to apply, you'll change this banner.
    Liferay UI screenshot: In the left sidebar, selecting the eye/visibility icon hides the Distributor Promo container.

  8. Drag a container onto the page top of the page. Rename this container to Welcome Container.
    Ensure the container is positioned above the Banner Content container is located.
    Liferay UI screenshot: In the left sidebar, the Welcome Container should be listed right above the Banner container.

  9. In the General tab, set the Container Width to Fixed Width.

  10. In the Styles tab, set the Padding Bottom to Spacer 4 (1.5rem).
    Liferay UI screenshot: Spacing is configured in the right sidebar.

  11. Drag and drop the Distributor Welcome Banner fragment inside the Welcome Container.
    Liferay UI screenshot: The Distributor Welcome Banner fragment should be subset inside the Welcome Container.

  12. Select the button’s link sub-element and configure these settings:

    Tab

    Field

    Value

    Link

    Link

    Page

    Link

    Page

    Resources


    Liferay UI screenshot: Link configurations are made in the right sidebar when the button-link element is selected.
  13. Click Publish.
    Let’s now test the different experiences using the Simulation menu.

  14. In the Home page, click the Simulation () menu.
    Liferay UI screenshot: The Simulation menu icon is at the top of the page, between the configuration and content performance icons.

  15. Choose to Preview By Segments.

  16. Use the Segment dropdown to switch between Anyone and Distributors Experience.
    The main window updates to reflect the selected segment’s view.
    Liferay UI screenshot: Select Distributor Representatives in the right sidebar's Page Content > Segment field.

You’ve successfully personalized Clarity’s Home page for the Distributor Representatives segment. Now users in the segment will see the new fragment whenever they the page.

Conclusion

By combining user attributes into a segment and personalizing page content based on that segment, you create the foundation for a more relevant and engaging experience for your users. Next, you’ll explore how to define an effective personalization strategy.

loading-knowledge-label