All about Query String Parameters

Query string parameters can be used for modifying content on pages, or for tracking your visitors more effectively.

URL parameters are values that you can specify in the URLs to yield a specific response from the server. They are broadly divided into header parameters, path parameters, cookie parameters and query string parameters based on where the parameters are placed.

Header parameters are mostly used for authorization of login credentials.

Path parameters are included in the URL path in curly braces to specify a certain segment within a superset. For example /books/{bookId}/authors/{authorId}. These parameters are mostly used in API calls to fetch specific values in runtime.

Cookie parameters specify details about the cookie like name, value, expiry, path, domain and security checks.

Query string parameters are the ones added to the end of URL after ?, the ones most familiar to marketers and Adops teams.

Query String Parameters

Query strings are the part of the URL that comes after the question mark, which specifies the start of the query string parameter. It consists of:

  • Start of the query string parameter (?)
  • Key value pairs
  • Separators between the key and the value (=)
  • Separators between the key-value pairs, which is usually &

These parameters can be used to display different content based on the values, or they could be used for tracking visitor behavior.

Different types of query string parameters

There are active and passive parameters that will either modify or not modify the page content based on the values given.

1. Content-modifying parameters

These query string parameters will display different page content based on the values in the key-value pairs.

For example, the 2 above URLs will display different content on the page. This is especially applicable for ecommerce websites where the product list, order, features and availability changes based on visitor segments.

Content-modifying parameters are used for specific functions like:


These query parameters are used to filter for brands, sizes, price range, gender, color, material and a range of parameters you would normally find in any ecommerce website.


Normally used in blogs, ecommerce stores or informative websites, these query parameters will split the content into multiple pages for easy readability, and to reduce scrolling.


Used by search engines and also for internal search, this query parameters carries the search term that a customer uses.

Ordering a list

Filters like Latest, Ascending or Descending popularity, Low to High pricing etc. use this query parameter to reorder elements on a page.

Different language versions of a page

Most websites have their content in different languages, and use query parameters to translate the page content, based on geography or based on customer’s choice.

2. Tracking parameters

These are passive parameters that do not modify the page content, but help in tracking a visitor using different types of data like the source where they came from, keywords they used, what type of link they clicked on and more. These tracking parameters are mostly used for campaigns to bring in visitors from other websites and channels to your domain. Email marketing, search campaigns, display campaigns, social media campaigns, affiliate marketing – they all use URL tracking parameters quite extensively.

Common URL tracking parameters

1. UTM parameters

UTM parameters are the mostly commonly used tracking parameters for campaigns since Google analytics is used by many organizations, and UTM parameters tie in very effectively into Google analytics.

The general UTM parameters are utm_source, utm_medium, utm_name, utm_campaign and utm_term. Read this article if you would like to know more about UTM parameters, how to build and analyze them.

UTM parameters are used by other clickstream tools like Kissmetrics, Amplitude analytics, G2 Deals, and few other analytics tools.

2. MTM parameters

MTM parameters are used by Matomo Analytics, a robust analytics platform that provides on-premise and cloud hosting options. The common MTM URL parameters are:

mtm_source – Source of traffic like search engines, social media, newsletters. Recommended by Matomo.

mtm_medium – Denoting the type of channel like ppc, social, email. Recommended by Matomo.

mtm_content – Specific type of link like text, banner, button. Optional parameter.

mtm_cid – IDs for specific ads, usually auto-generated by advertising platforms. Optional parameter.

mtm_group – Target audience like Retargeting, Existing customer etc. Optional parameter.

mtm_placement – Denotes where the ad is placed like home page banner, footer, sidebar etc. Optional parameter.

Matomo has its own custom URL builder tool to help you build campaign URLs effectively.

3. CID

The CID parameter is used in Adobe analytics, a very popular Analytics platform that effectively brings together data from different sources like websites, mobile apps, kiosks and even offline data.

Adobe has assigned a variable called s.variable, especially for campaign tracking. All parameters that you need to track like the source, type of campaign, type of link are all assigned to s.variable. Most marketers use the term cid, but technically, you could any term here.

There is only a single Campaign ID which could carry custom parameters similar to those of UTM parameters. Here’s a simple URL builder for Adobe Analytics that will help you understand how URLs are tagged using campaign ID.

Adobe Analytics URL typically look like:

Challenges with URL parameters and how to overcome them

Though URL parameters are used in all marketing campaigns, there are some challenges to adding them right.

1. Canonical URL

URL parameters will generate multiple versions of the same page which will get indexed by search engines. Though most analytics tools know that these are used for campaign tracking, there are instances where these URL would be indexed and tracked separately.

The best solution is to add a canonical tag, rel="canonical" to specify the preferred version of your URL.

2. Crawl stats

Google has set a crawl rate for pages, which can be checked under Crawl stat in Google search console. If there are too many URLs with parameters, thesearch engine bot will cross this limit quickly and not crawl any other page.

Crawl stats in Google search console

A good solution is to specify your campaign tracking URLs in robots.txt to prevent bots from crawling them.

If you would like help with Campaign tagging for your websites, for Google Analytics, Adobe Analytics or any other Clickstream tool, reach out to Camptag, the awesome marketing taxonomy and URL tagging tool.