Blogs (Digital Solutions Blog)

Liferay Audience Targeting


Iat Ieong
6 Years Ago


Audience targeting is a marketing strategy at which a particular product or message is targeted to a particular group of audience. This strategy improves marketing effectiveness as the target audience will only see information that is most relevant to them.

In Liferay, you can probably target your audience by carefully granting view permission to content or pages. However, your target audience are limited to users with clearly defined roles in Liferay, and there are no reports or tools available to measure the effectiveness of your marketing campaign. The view-permission approach is far from ideal.

For example, using purely the view-permission approach, it is very difficult to target the following group of users:

  • Users who are browsing from a particular browser
  • Users who are browsing from a particular operating system
  • Users who live in a particular country or region
  • Users who are interested in a particular product
Luckily, with the newly released Audience Targeting app from Liferay, all of the above shortcomings can be overcome.

Target Content to User Segments

In order to target content to a particular group of audience, the target audience must first be defined. In Liferay’s Audience Targeting app, your target audience is referred to as a user segment. Matching rules can be configured for a user segment, and users must match all of the rules in a user segment to be considered as part of that user segment.

The following rules are available out of the box:



You can learn more about these rules here.

If you need a rule that is not provided out of the box, custom rules can be developed and installed as OSGi plugins. Liferay 6.2 has a built-in OSGi runtime, and OSGi plugins can be deployed to Liferay by simply copying to the deploy folder. Click here to learn more.

User segments can be created simply by configuring and combining rules.

The followings are examples of some possible user segments.

  • Young adults from the United States
  • Users browsing from Chrome on Windows
  • Site members who are visiting the site during lunch time
  • Users who have visited the “Top Travel Destinations” page and viewed the web content article “Travel Destination – Honolulu” 

If your target audience cannot be identified by clearly defined attributes, you can leverage the point scoring feature to build your user segment based on user behavior. Just as you can categorize pages and content by asset categories, you can now categorize your pages and content by user segments. Once a user has visited a page or content a number of times at or beyond the custom defined threshold, the user will belong to that user segment.

Here is how the “Foodie” user segment can be constructed using the point scoring feature:

Users who have viewed the lunch menu page more than 10 times can be considered as a foodie.

  1. Create the “Foodie” user segment, add a “Score Points” rule to the user segment and set the threshold to 10
  2. Categorize the “Lunch Menu” page with the “Foodie” user segment

Every time a user visits the "Lunch Menu" page, a point will be added to that user. Once the user reach 10 points, the user automatically belongs to the "Foodie" user segment.

Now that the user segments are defined, content can now be configured to target the particular user segments. There are two portlets that can display content based on user segments:

User Segment Content Display

The User Segment Content Display portlet is similar to the Web Content Display portlet, except that it is used to target one or more user segments.
For example, given an Android user segment and an iOS user segment, I can configure the User Segment Content Display portlet in a way so that users visiting from an Android device will see a link to the Google Play store, while visitors from an iOS device will see a link to the Apple App Store.
Actual views:

User Segment Content List

The User Segment Content List portlet displays a list of content that is categorized under the user segments that the user belongs to.
For example, web content articles that are related to Android can be categorized under the "Android Users" user segment.
When a user visits the site from an Android device, Android related news will be displayed on the User Segment Content List portlet.

Launching Campaigns

Using the Audience Targeting feature, you can also launch campaigns. You can launch a campaign for all users, or users of a particular user segment, and certain user behaviors can be monitored during the campaign.

As an example, I launched an ALS Awareness Month campaign for all users, and I would like to know how many people have started playing the embedded YouTube video that talks about ALS, how many people actually finished watching the entire video, and how many people ultimately clicked on the link to to learn more about the disease.

I can use the Campaign Content Display portlet to show the embedded YouTube video and a link to for targeted users who are part of the campaign, in this case, it would be all users.

User actions can be tracked during the campaign, and I can inspect the generated report to determine the campaign’s effectiveness.

Of the 11 visits to the ALS Awareness page, the ALS Awareness video was played 10 times, and 6 out of 10 times the user actually finished watching the entire video, and four users ultimately clicked on the link to to learn more about the disease.


Liferay's Audience Targeting app is invaluable to building better, and smarter Liferay websites that can adapt to the needs of different audience groups. With the built-in reporting feature, user actions can be tracked to show you how users are interacting with your website. The Audience Targeting app is available for free in the Liferay Marketplace, and it is available for both Liferay CE and EE.

Further Reading

To learn more about Liferay’s Audience Targeting app, please visit the official Liferay documentation, and the feature is also covered on the Liferay Developer Network.