Top
How to display Pop-ups based on user roles?
  • 13 Mar 2025
  • 1 Minute To Read
  • Dark
    Light
  • PDF

How to display Pop-ups based on user roles?

  • Dark
    Light
  • PDF

Article summary

Configure pop-ups to display only to specific users based on their role or segment by using the window variable option. Configure the value for the window variable and make it available from the application.

Use the following steps to set the visibility rule using a window variable:

  1. On the Whatfix Guidance dashboard, click Widgets.
    ia_left_nav_widgets

  2. Click Pop-ups.
    ia_widget_popups

  3. Hover your cursor over the Pop-up segment you want to configure, and then click the Edit icon.
    CLM_DB_Click_edit_icon.png

  1. Click Set Visibility Rules →.
    Set_visibility_rules

  2. Under the Where tab, select Window Variable from the dropdown.
    window_variable

  3. Enter the Variable name, select Equals operator, and then enter the Variable value.
    window_variable_user_roles

Info:

Your application developers can help you get the variable name and its value.

The following examples use window variables to identify user roles. Use different methods that fit with your application's structure.

Using URL Parameter

If you're passing role permission in the URL parameters, the following method can be used.

RB_popup_VR_param_admin

Using URL Hash

If you're passing role permission in the URL Hash, the following method can be used.

RB_popup_VR_hash_admin

Using Elements in a page

If each role has a unique element available in the application, use it to display pop-ups. For example, the Settings icon is visible only to Admin users, and the Request Access button is available only to Editors. Use these elements to identify the user and display content.

RB_popup_VR_CSS_selector

  1. Complete creating the Pop-up.

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.