Loading Audio...
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.
-
Sign in as the Clarity Admin user.
- Username:
admin@clarityvisionsolutions.com
- Password:
learn
- Username:
-
Open the Site Menu (
), expand People, and select Segments.
-
Click New to create a segment.
-
For title, enter Distributor Representatives.
-
From the Properties menu, drag and drop the Job Title into the main part of the screen.
-
Set the condition to
equals
and enter Distributor. -
From the Properties menu, drag and drop the User Group property into the main part of the screen.
-
Set the condition to
equals
and use the Select button to choose the Distributors user group. -
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.
-
Click View Members to validate
Daniel Raymond
andTerrence Wheatley
meet the segment condition. -
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.
-
Go to the Home page and click Edit (
).
-
Click the Experience drop down at the top of the page and choose New Experience.
-
Enter Distributor Experience for the Name field.
-
For the Audience, choose the Distributor Representatives option.
-
Click Save.
-
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.
The order of experiences determines their priority. Liferay evaluates which segments a user belongs to and applies the highest-priority matching experience. -
While on the Distributor Representatives experience, hide the
Distributor Promo
container.
Since Distributors don’t need to apply, you'll change this banner.
-
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.
-
In the General tab, set the Container Width to Fixed Width.
-
In the Styles tab, set the Padding Bottom to Spacer 4 (1.5rem).
-
Drag and drop the Distributor Welcome Banner fragment inside the Welcome Container.
-
Select the button’s link sub-element and configure these settings:
Tab
Field
Value
Link
Link
Page
Link
Page
Resources
-
Click Publish.
Let’s now test the different experiences using the Simulation menu. -
In the Home page, click the Simulation (
) menu.
-
Choose to Preview By Segments.
-
Use the Segment dropdown to switch between Anyone and Distributors Experience.
The main window updates to reflect the selected segment’s view.
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.
Capabilities
Product
Education
Knowledge Base
Contact Us