How to Exclude URL Query Parameters in Google Analytics?

When you navigate to Google Analytics Admin, you see the option to change view settings:

One of the view settings is ‘Exclude URL Query Parameters‘:

A query string is the part of the URL which comes after the ‘?’ character.

For example in the URL:

The query string is:


The query string is made up of one or more parameters (called query parameters) and each parameter is made up of ‘key=value’ pair.

For example in the URL:

The query string is:


This query string is made up of following two query parameters:



The query parameter ‘ThemeId=8904’ is made up of the key called ‘ThemeId’ and the value called ‘8904’

By default Google Analytics treat same page as two different web pages, if they contain different query parameters.

For example, for Google Analytics the following two web pages are different (even if they display, exactly the same contents):

If a query parameter doesn’t change the contents of a web page then you should exclude it from your GA reports via the ‘Exclude URL Query Parameters’ feature.

Failing to do so, will result in multiple entries being reported for the same page in your GA reports.

For example, if the following two pages display exactly the same content:

Then GA may report traffic to these pages like the one below:

Once you exclude the query parameter ‘ThemeId’:

Then Google Analytics will consolidate the traffic of the two pages and may report the traffic as:

Now imagine your website is using thousands of different query parameters for the same page.

In that case, without excluding query parameters, you would see thousands of different entries for the same page in your GA reports.

How to find the list of query parameters to remove from your GA reports?

Follow the steps below:

Step-1: Ask your web developer to send you a list of query parameters that are being used on the website but which do not change the contents of a web page.

Step-2: Make sure that you have got a Google Drive account and access to Google spreadsheet App

Step-3: Login to your Google Drive account via your Google Login.

Step-4: Install the Google Analytics Spreadsheet Chrome extension.

Step-5: Navigate to Google Analytics Exclude URL Query Parameters Worksheet and then make a copy of it (by Clicking on the File menu > Make A copy):

Step-6: Click on the ‘OK’ button:

Step-7: Click on the ‘Report Configuration’ tab at the bottom of the Google sheet:

Step-8: Navigate to the main reporting view of your Google Analytics property.

Step-9: Navigate to the ‘Admin’ section and then click on ‘View Settings’:

Step-10: Copy your view id:

Step-11: Navigate back to the ‘Report Configuration’ tab of your Google Sheet and then paste your view id in the yellow coloured cell, immediately after the ‘ga:

Step-12: Modify the Last N Days value to 30 days:

Step-13: Navigate to Add-ons menu > Google Analytics > Run Reports

Step-14: Click on the ‘Continue’ button:

Step-15: Select and click on your Google Analytics account:

Step-16: Let Google Analytics access your Google Account by clicking on the ‘Allow’ button:

Step-17: If you see ‘upgrade notice’ then click on the ‘ok’ button:

Step-18: You should now see the ‘Report Status’ message box. Click on the ‘ok’ button:

Step-19: Navigate to the ‘Unique Query Parameters‘ tab of your Google Sheet:

Step-20: Mark “YES” (by selecting it from the drop-down menu) next to each query parameter you would like to exclude from your GA reports:

Step-21: Once you are done, copy the value of the yellow cell:

Step-22: Paste the value of the yellow cell into the “Exclude Query Parameters” field in your View settings in Google Analytics:

Step-23: Click on the ‘Save’ button.

CAVEAT: Do Not Exclude ‘Search Query Parameters’

Do not exclude ‘search query parameters’. Otherwise you won’t see any data in your ‘site search’ reports:

Introduction to Search Query Parameters

When users search on your website (via the search box):

their queries are usually included in the URL.

For example, if you search for ‘enhanced ecommerce basics’ on, you would see ‘s’ (search query parameter) followed by your query:

If I exclude this search query parameter from my GA reports:

Then GA will not be able to capture any site search data in my reports.

If you are not sure, what your site search query parameter looks like then ask your web developer.

If you want to include site search data but still remove search query parameters from your GA reports, then follow the steps below:

Step-1: Turn ‘Site search Tracking’ (under ‘View Settings’) to ‘ON’:

Step-2: Enter your search query parameter(s) in the ‘Query parameter’ text box:

Note: You can enter up to 5 search query parameters separated by commas. Also, remember that search query parameters are case sensitive.

Step-3: Select the checkbox ‘Strip query parameters out of URL’:

Step-4: Click on the ‘Save’ button.

Other Articles on Specialised Tracking in Google Analytics

  1. Google Analytics Recurring Revenue and Subscriptions Tracking Guide
  2. How to track the impact of cookie consent on website traffic in Google Analytics
  3. Phone Call Tracking in Google Analytics and Beyond
  4. Scroll Tracking via Scroll Depth Trigger in Google Tag Manager
  5. Video Tracking via YouTube Video Trigger In Google Tag Manager
  6. Calculated Metrics in Google Analytics – Complete Guide
  7. The one thing that you don’t know about and the referral exclusion list
  8. Introduction to Postbacks in Google Analytics
  9. Creating Content Group in Google Analytics via tracking code using gtag.js
  10. Tracking Site Search without Query Parameter in Google Tag Manager
  11. Setting Up Site Search Tracking for POST based search engines in Google Analytics
  12. Tracking Site Search for GET-Based Search Engines in Google Analytics
  13. Understanding site search tracking in Google Analytics
  14. Tracking Virtual Pageviews in Google Tag Manager – Complete Guide
  15. Creating and using Site Search Funnel in Google Analytics
  16. Learn to Setup Facebook Pixel Tracking via Google Tag Manager
  17. How to use Keyword Hero to reveal Not Provided keywords in Google Analytics
  18. Guide to Event Tracking via Google Tag Manager
  19. Learn to track Qualified and Won leads in Google Analytics
  20. Creating your own Google Analytics Tag Auditing System
  21. Using multiple Google Analytics tracking codes on web pages
  22. Guide to Offline Conversion Tracking in Google Analytics
  23. Google Analytics and YouTube Integration Guide
  24. Complete Guide to Google Analytics for Facebook
  25. Tracking true referrals in Google Analytics when using PayPal and other payment gateways
  26. Virtual pageviews in Google Analytics – Complete Guide
  27. YouTube Video tracking via Google Tag Manager
  28. Implementing E-Commerce Tracking via Google Tag Manager
  29. Event Tracking in Google Analytics – Complete Guide
  30. E-Commerce Tracking in Google Analytics – Complete Guide
  31. Google Analytics Cross Domain Tracking Explained Like Never Before
  32. Google Analytics Social Tracking – Twitter, Facebook, Google Plus and LinkedIn
  33. Setting up & Tracking AMP Pages in Google Analytics
  34. Setting up Sales Funnel across websites in Google Analytics
  35. Using Data Visualization to analyze the SEO Performance
  36. Tracking offline conversions in Google Adwords
  37. How to Correctly Measure Conversion Date & Time in Google Analytics
  38. Tracking Twitter and Linkedin Social Interactions in Google Analytics
  39. Implementing Scroll Tracking via Google Tag Manager
  40. Phone Call Tracking and ROI calculations – Champion’s Guide
  41. Google Analytics Cross Domain Tracking (ga.js)
  42. Open Graph Protocol for Facebook Explained with Examples
  43. How to Exclude URL Query Parameters in Google Analytics?
  44. Understanding Google Analytics Default Page Setting
  45. Implementing rollup reporting in Google Analytics

Do you know the difference between Web Analytics and Google Analytics?

99.99% of course creators themselves don’t know the difference between Web analytics, Google Analytics (GA) and Google Tag Manager (GTM).

So they are teaching GA and GTM in the name of teaching Web analytics.

They just copy each other. Monkey see, monkey do.

But Web analytics is not about GA, GTM.

It is about analyzing and interpreting data, setting up goals, strategies and KPIs.

It’s about creating strategic roadmap for your business.

Web Analytics is the core skill. Google Analytics is just a tool used to implement ‘Web Analytics’.

You can also implement ‘Web analytics’ via other tools like ‘adobe analytics’, ‘kissmetrics’ etc.

Using Google Analytics without the good understanding of ‘Web analytics’ is like driving around in a car, in a big city without understanding the traffic rules and road signs.

You are either likely to end up somewhere other than your destination or you get involved in an accident.

You learn data analysis and interpretation from Web analytics and not from Google Analytics.

The direction in which your analysis will move, will determine the direction in which your marketing campaigns and eventually your company will move to get the highest possible return on investment.

You get that direction from ‘Web analytics’ and not from ‘Google Analytics’.

You learn to set up KPIs, strategies and measurement framework for your business from ‘Web analytics’ and not from ‘Google Analytics’.

So if you are taking a course only on 'Google Analytics’, you are learning to use one of the tools of ‘Web analytics’. You are not learning the ‘Web analytics’ itself.

Since any person can learn to use Google Analytics in couple of weeks, you do no get any competitive advantage in the marketplace just by knowing GA.

You need to know lot more than GA in order to work in Web analytics and marketing field.

So what I have done, if you are interested, is I have put together a completely free training that will teach you exactly how I have been able to leverage web/digital analytics to generate floods of news sales and customers and how you can literally copy what I have done to get similar results.

Here what You'll Learn On This FREE Web Class!

1) Why digital analytics is the key to online business success

2) The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

3) Why Google and Facebook ads don’t work for most businesses & how to make them work.

4) Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

5) The number 1 reason why conversion optimization is not working for your business.

6) How to advertise on any marketing platform for FREE with an unlimited budget.

7) How to learn and master digital analytics and conversion optimization in record time.


My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

Himanshu Sharma

Digital Marketing Consultant and Founder of

Himanshu helps business owners and marketing professionals in generating more sales and ROI by fixing their website tracking issues, helping them understand their true customers' purchase journey and helping them determine the most effective marketing channels for investment.

He has over 12 years of experience in digital analytics and digital marketing.

He was nominated for the Digital Analytics Association's Awards for Excellence. The Digital Analytics Association is a world-renowned not-for-profit association that helps organisations overcome the challenges of data acquisition and application.

He is the author of four best-selling books on analytics and conversion optimization:

error: Alert: Content is protected !!