How to Open a Popup on Query Parameter Conditions

You can use Nelio Popups to show a popup based on the query parameters in the URL of your visitor’s browser. This can be helpful when displaying different popups depending on the parameters of the visited page in your site.

In this article, you’ll learn how to target query parameters to show your popup.

Using Query Parameter Condition

When you are ready to use the Query Parameter condition, follow these steps:

  1. Go to Nelio Popups » All Popups and edit the one you want.
  2. In the editor sidebar, go to the Settings panel, and open the Conditions tab.
  3. Add or modify a condition by selecting ‘Query Parameter’.
  4. Set the name of the query parameter you want to check in the condition.

The following options are available for a Query Parameter condition:

  • exists
  • does not exist
  • has value equal to
  • has value different from
  • has value that includes
  • has value that does not include
  • has value that matches

Let’s review each option.

Exists

When you want to display a popup for visitors with a specific query parameter in their URL, select ‘exists’ in the condition field.

Popup with a query parameter condition set to 'exists'.
Popup with a query parameter condition set to ‘exists’.

Then, popups will only be shown to visitors visiting an URL of your site with the query parameter of your choice.

Does not exist

When you want to display a popup for visitors without a specific query parameter in the URL, select ‘does not exist’ in the condition field.

Popup with a query parameter condition set to 'does not exist'.
Popup with a query parameter condition set to ‘does not exist’.

Then, popups will only be shown to visitors visiting an URL of your site without the query parameter of your choice.

Has value equal to

When you want to display a popup for visitors with a query parameter in the URL that has a particular value, select ‘has value equal to’ in the condition field.

Popup with a query parameter condition set to 'has value equal to'.
Popup with a query parameter condition set to ‘has value equal to’.

Set the exact value for the query parameter in the last field of the setting.

Then, popups will only be shown to visitors visiting an URL in which there is the query parameter with the name of your choice and the exact value.

Has value different from

When you want to display a popup for visitors with a query parameter in the URL that has a value different from a particular value, select ‘has value different from’ in the condition field.

Popup with a query parameter condition set to 'has value different from'.
Popup with a query parameter condition set to ‘has value different from’.

Set the value to check the query parameter in the last field of the setting.

Then, popups will only be shown to visitors visiting an URL in which there is the query parameter with a value different than the one you set in the setting.

Has value that includes

When you want to display a popup for visitors with a query parameter in the URL whose value contains a specific value, select ‘has value that includes’ in the condition field.

Popup with a query parameter condition set to 'has value that includes'.
Popup with a query parameter condition set to ‘has value that includes’.

Set the partial value to check in the query parameter in the last field of the setting.

Then, popups will only be shown to visitors with visiting an URL in which there is the query parameter with the name of your choice and containing the value set in the settings.

Has value that does not include

When you want to display a popup for visitors with a query parameter in the URL whose value does not contain a specific value, select ‘has value that does not include’ in the condition field.

Popup with a query parameter condition set to 'has value that does not include'.
Popup with a query parameter condition set to ‘has value that does not include’.

Set the partial value to check in the query parameter in the last field of the setting.

Then, popups will only be shown to visitors visiting an URL in which there is the query parameter with the name of your choice and not containing the value set in the settings.

Has value that matches

When you want to display a popup for visitors with a query parameter in the URL whose value matches a regular expression, select ‘has value that matches’ in the condition field.

Popup with a query parameter condition set to 'has value that matches'.
Popup with a query parameter condition set to ‘has value that matches’.

Set the regular expression to check in the query parameter value in the last field of the setting.

Then, popups will only be shown to visitors visiting an URL in which there is the query parameter with the name of your choice and whose value matches the regular expression set in the settings.


After setting the condition, save the popup and then it will open if the condition is met.