---
title: "How to display Pop-ups based on user roles?"
slug: "how-to-display-pop-ups-based-on-user-roles"
updated: 2025-03-13T07:00:47Z
published: 2025-03-13T07:00:47Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.whatfix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to display Pop-ups based on user roles?

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](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/ia_left_nav_widgets.png)
2. Click **Pop-ups**. ![ia_widget_popups](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/ia_widget_popups.png)
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](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/CLM_DB_Click_edit_icon.png)

1. Click **Set Visibility Rules →**. ![Set_visibility_rules](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/image%28199%29.png)
2. Under the **Where** tab, select **Window Variable** from the dropdown. ![window_variable](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/2024-06-13_14-01-59%281%29.png)
3. Enter the **Variable name**, select **Equals** operator, and then enter the **Variable value**. ![window_variable_user_roles](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/window_variable_user_roles.png)

          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](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/RB_popup_VR_param_admin.png)

Using URL Hash 

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

![RB_popup_VR_hash_admin](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/RB_popup_VR_hash_admin.png)

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](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/RB_popup_VR_CSS_selector.png)

1. Complete creating the Pop-up.

## Related

- [Display Content based on User Roles](/display-content-based-on-user-roles.md)
- [Window Variables as Visibility Rules](/window-variable-condition-rule.md)
