Warning: Use of undefined constant isMobile - assumed 'isMobile' (this will throw an Error in a future version of PHP) in /home/customer/www/3whitehats.co.nz/public_html/wp-content/themes/3wh/templates/content-single-knowledge.php on line 103
Extracting Query Parameters in Google Analytics – Free Tool
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:
|_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:
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
- Make a copy our of tool found here: GA Query Parameter Extractor
- Add your GA Property View ID highlighted in yellow
- Make sure you have the Google Analytics Add-on For sheets
- Click Add-ons > Google Analytics > Run Reports
- Once your report has run successfully, click the “Analyse” button below to extract all unique queries from your pageview data
- 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