In Google Analytics, a filter can permanently change the data that appears in a GA view.
Data once filtered (i.e. included, excluded, or modified) can not be unfiltered. So if you set up an incorrect filter, your historical data is skewed for good. Therefore it is important that you test your filter before creating it.
The method of testing a filter before creating it is called ‘filter verification‘.
Google Analytics built-in verification tool
Google Analytics has got built-in verification tool for testing view filters which you can access while creating/editing a filter:
However, this built-in verification tool has got the following limitations:
#3 It can not be used again on an existing filter. If you try to test an existing filter by clicking on the ‘verify this filter’ link then you are likely to see the following error message:
This filter would not have changed your data. Either the filter configuration is incorrect, or the set of sampled data is too small.
So if you want to test an existing filter again, via the GA built-in verification tool then first delete the filter and then create a new filter.
In GA, you create a filter by saving it once. However, when you save the same filter again, it updates the existing filter.
This filter update can take a long time (as much as 24 hours) to take effect. So avoid testing your updated filter straightaway.
Configuring a filter
‘Setting up a filter’ is also known as ‘configuring a filter‘.
You can configure a filter by adding/changing various filter attributes like:
Filter name
Filter type (predefined or custom)
Filter field
Filter pattern
Following screenshot show the various filter attributes:
The order of filters
If you have created more than one filter in GA view then they are applied to your GA view data in the order in which you created them. So existing filters are applied before new filters according to their current ranking position.
In the screenshot above, the filter named ‘exclude internal traffic-3’ has a ranking of 1. So this filter will be applied first to your data. After this filter is processed then the second filter named ‘home’ will be applied to your data.
However, you can change the filter order by clicking on the ‘Assign Filter Order’ button (see the screenshot above).
By changing the filter order, the filter named ‘home’ get the first rank and is applied first to your data: Sometimes the order in which filters are applied to the data in your GA view can make it hard to test a filter.
So if your filter verification is not working then you may need to test the order of existing filters and/or remove other filters.
Do not use a live property to test your filters or to test anything. This is because data once filtered can not be unfiltered in GA. So if you accidentally applied a wrong filter, your GA data will get skewed for good.
Though GA filters are view based, I still recommend using the test view of your ‘test property’ as a best practice.
Step-3: If you already have a test view, then remove any existing filter from it before you test your new filter.
Step-4: Make sure that your test view contains at least 7 days of historical data. This is because GA needs at least 7 days of historical data before it can display the ‘filter verification preview table’.
Following is an example of a filter verification preview table:
Through a ‘filter verification preview table’ you can see, how your new filter will change the existing view data.
Step-5: Check through the reporting interface filter whether the data you want to filter (include, exclude or modify) actually exist in your test view.
Following is an example of ‘reporting interface filter’ (available in almost all GA reports):
If the data you want to filter does not already exist in your test view then you can not test your new filter.
If you still go ahead and test your new filter (by clicking on the ‘verify this filter’ link) then your filter won’t work because there is no existing data that match your filter criteria and you are likely to see the following error message:
This filter would not have changed your data. Either the filter configuration is incorrect, or the set of sampled data is too small.
Step-6: Test your ‘filter pattern’ before you use it in your filter esp. if your ‘filter pattern’ contains Regular expressions (also known as ‘regex’).
Use the Regex101 tool to create and test your regular expressions.
Use the ‘JavaScript’ flavour as Google Analytics accepts POSIX JavaScript regular expressions.
Step-7: Once you have created and tested your regex using ‘Regex101’ tool then use the ‘reporting interface filter’ in your GA test view to test your regular expression one more time.
This is because there is no guarantee that the regex validated by ‘Regex101’ tool will almost always work correctly in GA:
Note: If the regex used in the ‘Filter pattern’ field is not correct and you clicked on the ‘verify this filter’ link then your filter won’t work because your filter criteria does not match the existing data and you are likely to see the following error message:
This filter would not have changed your data. Either the filter configuration is incorrect, or the set of sampled data is too small.
Step-8: Enter the validated regex while creating a new filter in the ‘filter pattern’ field and then click on the ‘verify this filter’ link.
If you filter to include/exclude/modify your data then you are likely to see ‘filter verification preview’ table.
If your filter does not include/exclude/modify your data then you are likely to see the following error message:
This filter would not have changed your data. Either the filter configuration is incorrect, or the set of sampled data is too small.
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 BeyondSECOND EDITION OUT NOW!
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.
About the Author
Himanshu Sharma
Founder, OptimizeSmart.com
Over 15 years of experience in digital analytics and marketing
Author of four best-selling books on digital analytics and conversion optimization
Nominated for Digital Analytics Association Awards for Excellence
Runs one of the most popular blogs in the world on digital analytics
Consultant to countless small and big businesses over the decade
Learn and Master Google Analytics 4 (GA4) - 126 pages ebook
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.