Are you seeing some discrepancies in your GA data? Do you sometimes see records for visitors to unusual page URLs in Google Analytics? They are probably URL Query Parameters or sometimes called Query Strings (if there are multiple parameters involved). These can be a bit puzzling at first, until you understand their purpose and how to filter them out.
Find out below why you need them, which ones you don’t need to report on and how you can exclude URL Query Parameters in Google Analytics.
What is a URL Query Parameter?
According to Branch “Query Parameters are a defined set of parameters attached to the end of a url. They are extensions of the URL that are used to help define specific content or actions based on the data being passed.” Well put, we think.
They may look something like this:
The above is an example of a classic Facebook tracking code also known as fbclid (or Facebook Click ID). The query parameters are the terms used after the ? and before the = symbols. They can also occur as a query string, including more than one query parameter; these are separated with an ampersand (&).
Why Exclude Query Parameters in GA
URLs that have a query string on the end can be reported as different pages in GA, if the query string doesn’t change the content of your page (e.g. a tracking code) then you should remove it in your GA data; to ensure you are getting a true representation of page visits reported.
Most Common URL Query Parameters
Some of the most common queries that you might need to exclude in Google Analytics are listed below. With the addition of some eCommerce and email marketing query parameters. Here is a list of query parameters to exclude for most websites:
- fbclid – Facebook Tracking Code
- ppc_keyword – Search Ads Keyword
- orderby – eCommerce Sorting
- mc_cid – MailChimp Tracking Code
- mc_eid – MailChimp Tracking Code
- redirect_uri – Redirect Parameter
- response_type – Request Parameter
- setLang – Website Language
How To Remove Query Parameters in Google Analytics
Follow these three simple steps to Exclude URL Query Parameters in Google Analytics. Ones like fbclid and those above are safe to remove from your Google Analytics data.
Navigate to you Google Analytics admin settings then:
- Click on View Settings
- Enter unwanted URL Query Parameter
- Click the Save button
Here’s a short video to guide you through the simple process of removing URL query parameters from your Google Analytics data.
From this point on, Google Analytics will disregard those URL parameters (and their associated values); excluding them from your GA data and reports and only counting for the route URL.
Exclude Multiple Query Parameters in GA Settings
If you want to exclude multiple URL Query Parameters in Google Analytics, these can be added as a comma separated list into the “Exclude URL Query Parameters” field of GA admin settings. You can simply copy and paste this list below, into the Exclude URL Query Parameters field of your Google Analytics – View Settings page:
fbclid, ppc_keyword, orderby, mc_cid, mc_eid, redirect_uri, response_type
WordPress URL Query Parameter Removal in Google Analytics
If you are using a CMS like WordPress to build your website, you might see queries that include a page ID or something similar to this:
This is a sure sign that you are not filtering out your own traffic, or that of other WordPress developers on the site. We have seen an increase of this since the recent move to working from home. That’s because you need to filter out all the IP addresses of all the people that have access to the back-end; not just the office, but their home IPs too. We’ll be posting a tutorial to cover that soon.
Do I Need To Exclude Google Tracking Code gclid?
The short answer to this is usually, no. If you have auto-tagging set up, Google will be using the gclid query parameters, which it already recognises.
The auto-tagging parameter is an encoded hash value, that maps back to a specific Google Ads click (essentially it’s a click ID). Google Analytics is able to decode this click-id value and translate it into useful information. For example:
- Search Query
- Match Type
Refer to benefits of auto-tagging for more detail.
See if you can use Google Ads auto-tagging on your site, and troubleshoot your setup in this support article from Google.
Once you have followed these steps in this post about how to Exclude URL Query Parameters in Google Analytics and remove unwanted URL Query Strings from your Google Analytics data reports; you will have a much clearer idea of what’s happening with your website traffic and conversions.
Join The Conversation
Do you have any URL Query Parameters that you regularly exclude from Google Analytics data? Do you think they deserve to be added in the list above? Please do join the conversation and let us know in the comments below.
Don’t forget to Feed Your Head and check out the blog for more tutorial posts like this one.
Founder and strategic mind behind White Rabbit. Focused on clients with a creative and ethical business model. Digital philanthropist giving time to support community groups, projects and organisations; that revolve around the arts, wildlife conservation and heritage crafts.