Create a visibility rule that uses referral attributes
Learn how to create the Referrer application object using a visibility rule for your HCL WebSphere Portal portal website.
In this example, we are creating a visibility rule that uses the referral host and search attributes. These attributes are only used in rules to display ski related vacation information for users that search on ski trips in Google.
This rule prevents other types of information, such as beach or mountain vacation information, from displaying when users search on ski trips.
You successfully created your visibility rule. We can add your rule to a page or portlet from the Manage Pages area of the site.
- Click Applications > Personalization > Business Rules.
- From the Personalization Navigator, click New > Rule.
- For Rule Type, select Visibility Rule.
- The numbered screen capture, along with the corresponding table, provides the values and selections that are used in this example. Use these example values and selections to guide you in creating a visibility rule that uses the referral host and search attributes.
Numbered item in screen capture Description 1 Type Ski vacation information as the name for your rule. 2 By Located in, use the default folder to store your rule for this example. 3 For Rule Type, select Visibility Rule. 4 Continue to use Show in this example to show a page or portlet that is based on the conditions that you define in this rule. 5 Click attribute > Referrer > Referral Host. The attribute label changes to current Referrer. Referral Host. Note: The Referral URL attribute is another attribute available to you with the Referrer application object. Use the Referral URL attribute when a user is referred to the site from a search engine other than the supported search engines. Use the Referral Host attribute, as shown in this example, when a user is referred to the site from the supported search engines.
6 In this example, continue to use is as the comparison operator. 7 Click value * to enter www.google.com as the value for the condition. Click Submit. 8 Click add Condition > Referrer > Search Keywords. The attribute label changes to current Referrer. Search Keywords. Note: We can provide a value for the Referrer. Search Keywords only when a user is arriving to the site from one of the supported search engines.
Not shown in screen capture Click value * to enter skiing as the value for the condition. Click Submit.
- Click Save.
Note: Visibility rules do not hide pages or portlets for anonymous users.
- To open the Manage Pages portlet, click the Administration menu icon. Then, click Portal User Interface > Manage Pages.
- Click Content Root.
- Go to the page to use your rule. For example, we might have a page named Ski Vacations in the Home area of the site. To locate the Travel page, click Home > Ski Vacations
- After you locate your Travel page, follow the instructions for adding your rule to a page or for adding your rule to a specific portlet.
Option Description Instructions for adding your rule to a page
- Click Edit Page Properties.
- Expand Advanced options.
- Click the arrow by Show or Hide page rule, and click Select Rule.
- Select the check box by a rule we want to add to the page. Click OK.
- Click Done
Instructions for adding your rule to a portlet
- Click Edit Page Layout.
- Make sure that Show portlet rule mapping is enabled. When this option is enabled, you see a Hide Portlet Rule Mappings link.
- Click the arrow by No rule mapped for a portlet on this page, and click Select Rule.
- Select the check box by a rule we want to add to your portlet. Click OK.
- Click Done.
Parent topic: Referrer application object