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.
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
https://www.3whitehats.com/?utm_source=google&utm_medium=cpc&utm_campaign=mycampaign
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.
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.
This post was created in 2020 and some of the content may no longer be relevant.
If you’re interested in learning more about digital marketing, analytics and data, take a look at our Digital Marketing Services.