Extracting Query Parameters in Google Analytics - Free Tool

William Julian-Vicary

Strategy & Innovation Director

Auditing your Google Analytics account for query parameters can be tedious but helps keep page reports clear of unwanted row duplication. We talk about the effects of collecting unwanted queries on your reporting and how to fix it. We’ve also built a free tool to make the process easier.

What are URL Query Parameters?

URL query parameters are extra pieces of information which can be appended onto the end of URLs. They are used for lots of different purposes including site functionality, cookies, analytical functions and other purposes.

By default, Google Analytics only filters out a few specific query parameters. The most common ones being:

Parameter Name Usage
_ga Used to manage cross domain tracking
utm_source, utm_medium, utm_campaign, utm_content and utm_term Used to track campaign and source information

Example URL with Query Parameters

Aside from the non-exhaustive list of examples above, Google Analytics will record the other parameters as part of your URLs in reports - creating thousands of unique, messy looking pages. Take a look at this report snippet below for our homepage:

Page Pageviews Unique Pageviews
/?fbclid=IwAR00xTb78HCFiXrn6Qc2AnoCbZZsAA7gUEb5yERhyOSTjceha6YHD2Xn5fo 1 1
/?fbclid=IwAR01YubCusHpfulhKfQA4s440PRtKE8pmc2VtAIOXGEDHRtM0RsMa2ssDkA 1 1
/?fbclid=IwAR029Fc9kiLGUMMjhWuGybmXQaXnPAt0Nu4FjaO6ndInVMh2j5_9F-vc-GA 1 1
/?fbclid=IwAR02m25f-aHk78MqQ8k4BBqLIuWRmTyxz-tyZmNxIs3PH8a4xfDEnS2uSuY 1 1
/?fbclid=IwAR02tWlTu4YynhCLFBwYykTEc2OmA-TfddcnEfJ-rytFTw4Yty-5xIe_6DE 1 1
/?fbclid=IwAR06SsW5MeOqRZkzkdqBxDSm7E_8NmnLBM1e7su6JRyG_4kVnG5n5q2Jrmo 1 1
/?fbclid=IwAR0Bi38cN6sARbonG4jOZKtWQeGW334ZXgBPahol48MY0XoknYWHgrqZW4Y 1 1

This particular set of data is traffic from Facebook to our homepage and, as you can see, this has now caused row duplication which makes it hard when reporting on a single page. This increases row cardinality; something you may encounter if you have a lot of query parameter page duplication. If you hit 1 million rows during a report query, Google Analytics won’t load any more data into your report and will let you know this is happening. Ideally, we want to avoid this if we can.

So what can we do about it? Exclude them! The typical way to do this is find the worst offending parameters and then add them to the query exclusion field in your Analytics Views. This can be tedious if you have lots of query parameters and can take a long time to fully filter out all the unnecessary ones over time.

To help with this arduous task, we’ve built a tool which does all the hard work for you.

Our Google Sheets script allows you to pull in the data from any GA View you have permissions to access to then analyse it for query parameters.

Using the Extractor

Usage Instructions

  1. Make a copy our of tool found here: GA Query Parameter Extractor
  2. Add your GA Property View ID highlighted in yellow
  3. Make sure you have the Google Analytics Add-on For sheets
  4. Click Add-ons > Google Analytics > Run Reports
  5. Once your report has run successfully, click the "Analyse" button below to extract all unique queries from your pageview data
  6. This will now show you all queries found within the data set and also a breakdown of which ones are the worst offenders.


This tool is designed to speed up the initial process of identifying those query parameters.

We highly recommend combing through the extracted list of query parameters before adding it to a view exclusion list. Some parameters may change the content of a page and should remain in your All Pages report. If you’re ever unsure, try finding examples within your All Pages report and run them for yourself to make sure they’re not adjusting site content first.

This tool only finds parameters on data you’ve loaded. What we mean by that is if you’re only loading in 1 month’s worth of GA data, you might not be seeing some parameters if they aren’t in that data set.


  • I get asked to authorize an App  when I click “Analyse”
      • We’ve written a script behind the scenes which requires edit access of the sheet you’re in. As a precaution, Google always asks users for permission to run scripts which impact the Sheet you’re working on. You can see the code for yourself by heading into Tools > Scripts
      • The sheet and script is fully self-enclosed meaning that data isn’t stored elsewhere nor do we see what the data looks like. It’s run locally to you.
  • When I click I “Analyse” nothing happens
    • Did you first run the report to fetch your GA Data? See step 4 in the Usage Instructions

Related Posts

Tracking HubSpot Forms with Google Tag Manager

When a form has been successfully submitted to HubSpot, HubSpot propagates an event that we can listen to and use to trigger marketing tags within Google Tag Manager. Below we create a Custom HTML Tag that listens for a form success, trigger a dataLayer event which can then be used to trigger a marketing tag to push this data into Google Analytics.

3 years ago

How to get Service Provider back in Google Analytics

Service Provider and Network Domain dimensions are no more. Let’s get Service Provider data back online. We’ll show you how to re-enable ISP data using Google Tag Manager and an IP Lookup Service.

3 years ago

Measuring Content Engagement in Google Analytics - Part 3: Social Site Exits

Track when users leave your site to visit your social media pages. Understand when your content is driving positive move to your social assets.

3 years ago

Measuring Content Engagement in Google Analytics - Part 2: Social Share Click Tracking

The use of social sharing widgets is commonplace. But who’s actually tracking interactions with these? Let’s make a count of how many people are clicking these buttons and record a social share rate to see how many readers amplify content on social media.

3 years ago

DoubleClick Floodlight Tags and Google Tag Manager - Lean up Your Containers

Anybody who uses DoubleClick Floodlight knows the slow process of implementing a new tag for each activity for a campaign interaction or conversion. If you’re using Google Tag Manager to add a tag, trigger and maybe some new variables for every new Floodlight – it won’t take long for your container to overfill with almost identical tags. While there’s nothing wrong with this style of implementation, there is another way.

3 years ago

Measuring Content Engagement in Google Analytics - Part 1: Article Completion Rate

It’s time to ditch bounce rates and average time on page in place of meaningful and measurable insights. Enhance how you measure content engagement with these advanced tracking methods to gain real insights into your content and its value against your business objectives.

3 years ago