Technical
Query parameter
Also called URL parameter.
Query parameter is a key=value pair after the `?` in a URL, such as `?page=2&sort=price`. Servers and scripts read it to change what a page shows or to carry a label.
How it is measured
Parse the string between `?` and `#`: split on `&`, then on the first `=`, and decode percent-escapes (`%20`, and `+` for a space). In JavaScript use `new URLSearchParams(location.search)`. In logs the whole string sits in the request line.
Count distinct values per key across a day's logs. A key with 20,000 distinct values, like a session id, fragments any report grouped by URL. A key with six values is a safe dimension.
Worked example
An outdoor-gear store's `/tents` category shows up in the log as 1,840 distinct URLs. The causes are `sort` (4 values), `color` (11), `page` (40), and a `sid` that is unique per visit. Dropping `sid` and canonicalising sort and color leaves about 50 URLs worth reporting.
A cache rule that ignored the query string once served page-2 HTML to page-1 requests for an hour, which is how the team learned the cache key needed the `page` value.
How it differs
A query parameter is any key in the query string. A UTM parameter is a conventional set of keys (`utm_source`, `utm_medium`, `utm_campaign`) used to label campaigns. Every UTM tag is a query parameter, but most query parameters are not UTM tags.
Common errors
Not decoding `+` and `%20`. Splitting on every `=`, which breaks base64 values. Putting secrets in URLs, where they land in logs and Referer headers. Treating key order as meaningful. Letting endless combinations get crawled. Caching with the query stripped.
In practice
Pull the distinct keys from last week's logs and sort them by number of values. Decide per key whether to keep, strip, or canonicalise it. Send anything private in a POST body instead.