Everything you need to know about query parameters in Google Analytics

Besides site search query parameters there are also other query parameters that pollute your data. You might have seen them in your page report. Can you see all the Page Views for basically the same page?

The image above shows that /notebooks-en-tablets/notebooks.html has 48K Page Views but all the variants with ? query parameters have a total of 169K Page Views. In total there are more than 200 variants of the /notebooks-en-tablets/notebooks.html which is difficult to read en pollute your data.

Different kinds of query parameters

If you take a look at your “Behaviour” > “Site Content” > “All Pages” and your notice all these query pages don’t freak out just yet. They might be there for a good reason.

Different reasons:

  • Filter or options query parameters

Like the example above, if a query parameter is basically the same page with different filters or options then you might want to merge the data. You can use different views in Google Analytics if you want to keep the data so you can analyse the use and conversions on filtered pages.

You can also rewrite the parameters so you can analyse all the filtered pages at once. Then you wil get two pages in this example: /notebooks-en-tablets/notebooks.html & /notebooks-en-tablets/notebooks.html/filtered.

You can read all about filtering en rewriting query parameters below.

  • Marketing tags

Marketing tags are used so that your Analytics software understands the source of the user. If doesn’t serve a different page most of the time. So you want to view the data in one row instead of divided between many query parameter rows.

  • Entire website based on query parameters

Sometimes an entire website is build with query parameters to isolate different pages. While this is super bad for SEO reasons, (SEO friendly urls), this can be a reason for all the query parameters in your Google Analytics account.

How to identify query parameters URLS in Google Analytics?

To identify URLS with query parameters in Google Analytics you need to go to “Behaviour” > “Site Content” > “All Pages” and filter for ?|= which is filtering for all pages with ? or =.

Now you will have a list of URLS with query parameters and you can decide what to do with them: filter or leave as it is.

How can I remove query parameters in Google Analytics?

To remove query parameters, go to “Admin” > “View Settings” > “Exclude URL Query Parameters”.

Add the list of query parameters you would like to exclude, separated by a comma. For example: cid, page.

How to rewrite URL query parameters in Google Analytics

To rewrite URLs with query parameters you can use the “Search and Replace” option in “Filters”.

  1. Select “Custom”
  2. Select “Search and Replace”
  3. Select “Request URl” in the dropdown
  4. Put the ?[query1,query2]=.* regex in the “Search String” box. Replace query1 and query2 with your own queries.
  5. Add the replacement string in the “Replace String” box.

Turn Google Analytics into conversions

Let smart algorithms audit your Google Analytics data. Find hidden conversion leaks and increase your conversions.

Create account