Skip to content

Query params

This page will show you steps to configure query-parameter based condition. These then can be used at multiple places such as rewrite/caching/blocking rules.

Typical use-case is, you would want to cache and serve-from cache while ignoring the marketing/tracking query parameters (e.g. utm_, fbclid, gclid etc.). Which will also create less cache-variations, and improve the cache-HIT percentage.

Note: For demo purpose, we will be using www.nviztest.com domain as an example. Here, we will create a query-param condition with regex pattern (utm_|fbclid|gclid) to be used to ignore them while caching/serving-from-cache.*

Prerequisite

  1. You must have a domain configured on Nitrogen.

Steps

  1. Click on Settings menu, and open Query Params tab.
    Step

  2. Create condition by clicking on Create button.
    You will now be taken to a screen to provide query-parameter condition details.

    1. Group Name: Provide short name about the query-parameter condition you are creating.
      For now, put Excluding campaign and tracking query params here. Note: Please keep the name meaningful and relevant.

    2. Query Param Name: Enter query-parameter name or regex.
      We will be putting (utm_|fbclid|gclid) here
      Note: query-parameters name is matched as regex. Therefore all the query-parameters with name matching given regex will match here. For absolute names you can use ^ and \$ in regex e.g. ^shopid$

    3. Match if query param is not present: Switch this flag on if you only wish to match when given query-parameter is not present.
      Enable it in this case for now.
      Step

  3. Click on Save button. The configured pattern will be showed in Query Params list.

You can now use it in Cache-Variations to replace Vary on all query parameters condition.
Step

Notes