WebmasterID logoWebmasterID
Analytics dimensions

Query string dimension

The query string is the part of a URL after the '?': key-value parameters such as ?q=shoes&page=2. Analytics tools can surface it as a dimension, but it is double-edged — useful for understanding filters and search, dangerous for cardinality and privacy. This page explains how it is derived and how to handle it safely.

Verified against primary sources

What this means

The query string is the component of a URL after the '?', made up of ampersand-separated key=value pairs. The browser exposes it as URL.search; analytics tools that store the full location can derive a query-string dimension or parse individual parameters into custom dimensions.

It is where structured request context lives: which filters were applied, which page of results, which internal search term. That makes it valuable when the parameters drive the content the visitor saw.

Cardinality and privacy hazards

The same hazards that affect page_location concentrate in the query string: tracking parameters (utm_*, gclid) and session tokens explode cardinality and pollute reports without describing the page.

The privacy risk is sharper here. Query strings routinely carry search terms, order IDs, and sometimes personal identifiers. The safe pattern is an allowlist: keep the handful of parameters that genuinely matter (for example a site-search key), drop or hash everything else, and never store raw query strings that may contain personal data.

How it appears in analytics and logs

A query string value reveals the parameters in play on a URL. A long tail of unique query values usually means tracking or session tokens leaked into the dimension and need stripping.

Diagnostic use case

Read query parameters when they change page content — site search, filters, pagination — while excluding tracking and personal parameters.

What WebmasterID can help detect

WebmasterID can parse and allowlist query parameters first-party, keeping useful ones (like search terms you choose to keep) and dropping tokens that carry personal data.

Common mistakes

Privacy and accuracy notes

Query strings frequently contain search terms, email addresses, or IDs. Allowlist only safe parameters before storage and redact the rest. This is educational, not legal advice.

Related pages

Sources and verification notes

Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.