Web Query Parameter Targeting Guide

Web Query Parameter

As a definition, the web query parameter is a set of instructions which defines two substrings. For example, the “contains” and “does not contain” subject substring containment. Whereas the “contains” match the type – also known as a “substring match.” Which allows you to target any occurrence of a substring with a longer string in regards to your website URLs. In particular, the “contains” element is most useful when targeting a unique query string parameter. Especially that which appears in multiple URLs.

As an example, the jmexclusives online consulting agency presents targeted offers to its unique and daily online readers. For instance, targeted offers based on the query parameters present in the www.jospehmuciraexclusives.com page URLs. In addition, you can use the URL Parameter rule to target and retarget visitors for your additional marketing or upselling.

Web Query Parameter Targeting

In other words, a query string is also referred to as a query argument. Which means they are a small snippet of code added to your URL which further processes the url being viewed. Explicitly, web query parameter targets values that occur in the query string of a URL. Surprisingly, web query parameters are found between the question mark (?) and hash mark (#), for example;

  • https://www.example.com/store/landing?utm_campaign=fall#fragment
  • https://www.example.com/store/search?q=nexus#fragment

The web query parameters in the above examples include;

  • Google Analytics campaign parameters (?utm_campaign=fall), and
  • Search queries (?q=nexus).

Web Query Parameter Container

Equally, important, URLs can contain multiple query parameters, called query components. The first occurs after the question mark (?), and subsequent components occur after the ampersand (&). The following URL includes three query components from the Google Analytics URL builder:


Benefits over URL targeting

In general, the web query parameter targeting has the following benefits over the URL targeting:

  1. Query parameter rules only look at a portion of the URL between the question mark (?) and hash mark (#).
  2. Easy assignment of human-readable variable names (e.g.: “q” becomes “search”).
  3. Can save, edit and reuse commonly used variables in other experiments.
  4. You can target the unescaped value (e.g.: “a=b”) even when the raw URL contains escaped strings (e.g.: “a%3Db”)
  5. If you wish to customize your web query parameter targeting, please consult with the jmexclusives team.

Example: Target visitors who searched for a specific product

You want to target an experiment at visitors who search for nexus on your website. Searches generate the following URL structure:


To create a rule targeting users searching your website for a specific term, you need to create a custom variable, then build a condition with it.

Step 1: Create a custom variable

  1. Or edit an experiment.
  2. By clicking the TARGETING tab.
  3. Then click AND to add a new targeting rule.
  4. Create your unique Query Parameter.
  5. Click Variable, then Create new…
    1. Optionally, click an existing variable to edit it.
  6. Enter a Query Key – The query component you wish to target. For example, q.
  7. Name your variable – for example,search query
  8. Now click CREATE VARIABLE.

Step 2: Build a condition with your custom variable

After creating your custom variable, Optimize 360 will populate it in a new targeting condition which you can complete by adding a match type and value. For this example, build the following condition and click SAVE.

Variable Match type Value
search query contains nexus

This condition will evaluate true if:

  • the value of the first matching query component (unescaped) contains nexus.

This condition will evaluate undefined if:

  • there are no query components containing nexus.

Please learn more about Empty vs. undefined parameters.


In conclusion, OptinMonster can present targeted offers to readers based on the query parameters present in the page’s URL. Additionally, you can use the URL Parameter rule to retarget visitors for additional marketing or upselling. Learn more about other related Blog Research Articles. You can also learn more about How to Write Valid URL Query String Parameters.


Leave a Comment

Scroll to Top
Copy link
Powered by Social Snap