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#
- You must have a domain configured on Nitrogen.
Steps#
Click on
Settingsmenu, and openQuery Paramstab.
Create condition by clicking on
Createbutton.
You will now be taken to a screen to provide query-parameter condition details.Group Name: Provide short name about the query-parameter condition you are creating.For now, putExcluding campaign and tracking query paramshere. Note: Please keep the name meaningful and relevant.Query Param Name: Enter query-parameter name or regex.We will be putting(utm_|fbclid|gclid)hereNote: 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$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.
Click on
Savebutton. The configured pattern will be showed inQuery Paramslist.
You can now use it in Cache-Variations to replace Vary on all query parameters condition.
Notes#
- A Query params group that is currently in use cannot be edited. To make changes, you can either:
- Delete the rule that is using the Query params group, or
- Clone the existing group and create a new Query params group to use in your rules.