Top
URL Properties as Visibility Rules
  • 02 May 2025
  • 4 Minutes To Read
  • Dark
    Light
  • PDF

URL Properties as Visibility Rules

  • Dark
    Light
  • PDF

Article summary

Note:
If you see the following UI, you have the Advanced Visibility Rules enabled for the account. For more information, see Understand Advanced Visibility Rules.
Visibility Rules 2.0 screenshot

Introduction

URL Properties help you uniquely identify a web page to show Whatfix content and widgets. These properties can be added as a Visibility or Display Rule condition to your Whatfix content and widgets.
The following are the URL Properties:

  • URL
  • URL Hostname
  • URL Path
  • URL Parameters
  • URL Hash

Types of URL Properties

URL

Use the URL criteria to specify the entire page URL that you want to use as a Visibility or Display Rule.

url_studio


Info:

Whatfix enables you to configure dynamic URLs also. For more information on how to use dynamic URLs as a Visibility Rule, see the use cases mentioned in this article.

URL Hostname

Use the URL Hostname condition to target a page based on its domain name. The hostname is the part of the URL between https:// and the first /.
URL Hostname new 11

Example: If you wish to display the tip only when you are on ap17.lightning.force.com, add a condition as shown in the following image:

url_hostname


URL Path

The URL Path refers to the section after the hostname, before any parameters or hash.

URL path new1

Example: If the website URL is https://ap17.lightning.force.com/lightning/#lead/
list?filterName=Recent, then the pathname is /lightning.

url_path_new


URL Parameters

Use URL Parameters to identify a page based on query parameters (the part after ?).

URL parameter updated1

Example: If you want to show a tip to a user only when they filter for Recents, add a condition as shown in the following screenshot.

url_parameters_studio


URL Hash

If you want to identify a page using the hash value of your URL, use the URL Hash condition. Hashes are usually present in Single Page Applications developed using AngularJS or ReactJS. There are no page refreshes, but only Hash changes.

URL Hash updated1 1

Example: If you want to show a tip to a user only when they go to the Lead page, add a condition as shown in the following image:

url_hash_studio


Use Cases

Display a widget on a specific page

Use the following steps to configure the Visibility rules in a widget:

  1. Under the Visibility Rules condition, select URL
    Visibility_rule_select_url.png

  2. Under the Operator section, select Contains
    db_URL_contains

  3. Copy the URL value that is common across all the pages of your application, and then paste it under the URL section.
    db_URL_contains_Web_URL

  4. Click Save.

Display a widget on selected pages in an application

Use the following steps to configure the Visibility rules in a widget:

  1. Under the Visibility Rules condition, select URL.
    Visibility_rule_select_url.png

  2. Under the Operator section, select Not Equals.
    Visibility_Rule_url_not_equals.png

  3. Copy the Browser URL of the page you don't want the widget to appear, and then paste it under the URL section.
    Url_Visibility_rule_URL.png

  4. Click Save.

Display a widget on all pages across the application

Use the following steps to configure the Visibility rules in a widget:

  1. Under the Visibility Rules condition, select URL.
    Visibility_rule_select_url.png

  2. Under the Operator section, select Contains.
    Visibility_rules_contains.png

  3. Copy the URL value that is common across all the pages of your application, and then paste it under the URL section.
    Visibility_rules_Url_contains.png

  4. Click Save.

Display a widget on all pages of an application except one

Note:

Pre-requisite:
To prevent a widget from appearing on a page, you need to identify the URL path value specific to the page that you want to exclude.

Use the following steps to configure the Visibility rules in a widget:

  1. Under the Visibility Rules condition, select URL.
    Visibility_rule_select_url.png

  2. Under the Operator section, select Contains.
    Visibility_rules_contains.png

  3. Copy the URL value that is common across all the pages of your application, and then paste it under the URL section.
    Visibility_rules_Url_contains.png

  4. Click the Plus icon.
    Visibility_rule_Url_contains_click_plus.png

  5. Select URL as the display rule condition.
    Visibility_rule_select_url

  6. Under the Operator section, select Not Contains.
    Visibility_rule_not_contains.png

  7. Copy the URL value specific to the page you don't want the widget to appear on, and then paste it under the URL section.
    Visibility_rule_not_contains_Url.png

  8. Click Save.

Display a widget on an application in case you have dynamic URLs

A dynamic URL has a URL path that is divided into two parts. One part of the URL path is dependent on user-defined variables, that keep changing to display specific information depending on user inputs. The other part of the URL path is independent of user inputs and remains common throughout the application.

Note:

To display a widget on an application having a dynamic URL, you need to identify the two parts of the application URL.

If the URL path ends with a dynamic value, then while configuring the Visibility rules in a widget, use the following steps:

  1. Under the Visibility Rules condition, select URL.
    Visibility_rule_select_url.png

  2. Under the Operator section, select Starts With.
    Visibility_rule_starts_with.png

  3. Copy the independent URL path value, and then paste it under the URL section.
    Visibility_rule_starts with_url.png

  4. Click Save.

If the URL path begins with a dynamic value, then while configuring the Visibility rules in a widget, use the following steps:

  1. Under the Visibility Rules condition, select URL.
    Visibility_rule_select_url.png

  2. Under the Operator section, select Ends With.
    Visibility_rule_ends with.png

  3. Copy the independent URL path value, and then paste it under the URL section.
    visibility_rule_ends_with_url.png

  4. Click Save.

Note:

Visibility rules can be edited only when the widget is in the Draft and Ready stages.

Tip:

Use Contains instead of Equals to create more flexible and reliable URL conditions.
Here's why:

  • Partial Matches: Contains can match part of a URL, making it useful for targeting a range of pages under a common path or similar structure.

  • Dynamic Content: URLs often contain dynamic elements such as session IDs or query parameters. Contains can match the static part of the URL, avoiding mismatches due to these dynamic elements.

  • Complex URLs: When URLs have multiple parameters or fragments, Contains ensures that the rule applies even if the exact order or presence of additional parameters varies.
    For more information, see Supported Operators for Visibility and Display Rules.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.