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:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715

The query string is:

ThemeId=8904&iPathId=38715

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:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715

The query string is:

ThemeId=8904&iPathId=38715

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

ThemeId=8904

iPathId=38715

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):

https://www.abc.com/fold1?ThemeId=8904

https://www.abc.com/fold1?ThemeId=8905

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:

https://www.abc.com/fold1?ThemeId=8904

https://www.abc.com/fold1?ThemeId=8905

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 https://www.google.com/drive/ 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 optimizesmart.com, 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.

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#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 Optimizesmart.com

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 !!