Top 8 Useful Analytics Filters

By default, Google Analytics (GA) collects all statistics for website visitors, but you may not need to use the entire data array for analysis. You can clear and process information using filters at the presentation level. We will analyze the most useful of them in this article.



What do you need to know about filters?



There are two types of filters in Google Analytics:





Built-in filters - a simple and intuitive tool that allows you to enable and exclude traffic.



image



Using five custom filter parameters, you can create more flexible traffic filtering conditions:









Settings can be applied to most parameters of the source data: traffic sources, browser characteristics, page names, etc.



Learn more about filters in the official Google Analytics Help .



Before starting work, it is important to leave the default view unchanged and not apply any filters to it. So you will always have access to the source data and the ability to evaluate the effectiveness of the applied filters.



Traffic filtering should be configured in a separate view.



Filter settings are strictly individual for each project and for each task. Based on our practice, we have compiled a list of universal and useful filters, then we will consider them with examples.



IP traffic exclusion



An important filter, a description of which can be found even in the GA Help, is the exclusion of traffic from your company's IP addresses.



Example: employees of an online store often go to a work site without making purchases. In this regard, the conversion drops, the data is distorted, the conclusions are incorrect. This can be avoided with a filter.



Filter setting



To exclude internal traffic that distorts data, we create a built-in filter. It excludes traffic from all IP addresses that start with 209.185.108.1. That is, the filter will not allow data from IP addresses 209.185.108.100, 209.185.108.101, 209.185.108.102 and so on before submission.







The “Start with” criterion is just one of four ways to determine the IP addresses in a filter.



They can also be defined as:





Separation of TEST and PROD Events



Imagine that the markup on your site was implemented through developers and after a hard week, the trainee developer accidentally sends a doubled error event to your GA online store to GA. Before you find a developer error, a weekend will pass. Bottom line - the data is distorted, it is difficult to analyze them. Data distortion due to incorrect markup can be avoided with a user filter and a user parameter.



The user parameter h_HIT_TYPE with the scope at the hit (hit) level takes the value of the event type. By default, each event identifier has a [test] type. After verifying the markup with the GTM Lookup Table, the event type is manually changed to [prod].



Filter setting



A custom filter allows data to be presented only when the h_HIT_TYPE parameter matches the [prod] filter pattern. Please note: the “Filter Pattern” field works in regular expression mode.







When applying such a filter, a double event will never get into the view, distorting the data. This separation is relevant for all events except pageview. For it, the h_HIT_TYPE parameter must always be set to [prod].



Separation of STAGE and PROD environments



A test environment (or stage) is a development area on your site where it is convenient to test changes. Often, such testing takes place on a subdomain with limited access. The data generated by testers and developers can negatively affect all statistics, so it is important to carefully monitor the transition of the site from the test environment to the combat (prod). To do this, you can create a filter by the type of medium, having previously created a user parameter with a scope at the hit level h_ENVIRONMENT_TYPE. It is enough to change its value from [stage] to [prod] when transferring a site from a test environment to a battlefield to prevent incorrect data from getting into the view.



Filter setting



Similar to setting the previous filter, we allow data to be presented only when the h_ENVIRONMENT_TYPE parameter matches the filter template [prod].







Thus, the filter will begin to pass data into the view only after changing the environment type from [stage] to [prod].



Combining the browser and its version



In the standard Google Analytics interface, it can be difficult to build a report on browsers and their versions. For example, to analyze browser versions, there is a Browser and OS report.







By clicking on the name of the browser, we fall into the report on its versions:







Imagine that you need to get statistics for all versions of browsers. There are many ways to build such reports, but for the convenience of processing data, we bring them to a similar form:







Filter setting



In the user advanced filter we use two fields: Field A and Field B, create an Output Field based on them. The expressions “Extract A” and “Extract B” are used to search for text matches. In our case, we use the regular expression (. *) Corresponding to any value of the “Operating system platform” and “Operating system version” parameters.



In the Output Field, select the option “Operating system version” and refer to the extracted values ​​using the notation $ A1 and $ B1.



Thus, we write the name of the browser along with its version.







A similar filter is also convenient to apply to the operating system version:







Bringing URLs to a single view



Google Analytics is case sensitive. When opening page reports, you may encounter similar data:







This is the same resource, but GA distorts statistics due to case. It is important to consider this when building reports. To combine pages and avoid errors of this kind in data collection, you can use the filter, which will bring the site URL to a single register.



Filter setting



In the user filter, select the type of register and the desired field. In our case, we bring the request URL to lowercase.







The adjusted URL will allow you to combine the data on the page with the same URL, but with a different case, leading them to a common view. For example, “/balkon.html”. Thanks to the left view without filters, you will always have access to unchanged URL data.



Bringing the names of sources, channels and campaigns to a single view



Despite the filter for changing the case of the URL, the source, channel and campaign will remain with the original case. This is due to the fact that utm tags are transferred to Google Analytics profiles as separate parameters from the raw data. Each of them requires a separate filter to be converted to a single register.



Filter setting



As in the previous filter settings, select the desired register type and filter field. In our case, we lower the source of the campaign to lower case.







Similarly, filters are configured for the channel and the campaign itself.



Exception www. from host name



The problem of separating identical pages by URL can arise not only because of a different register. For example, Google Analytics separates data from pages like www.forexample.ru and forexample.ru.



This problem can be solved using a filter to cast the URL to the same look.



Filter setting



In the user advanced filter, use Field A and Output Field. From the host name, we extract everything that is after “www.” Using the regular expression www \. (. *). Select the parameter “Host Name” in the Output Field and write the received value into it using the expression $ A1.







SEO Traffic Correction



To promote a site in the ranking of search engine results, it is important to analyze data on conversions from these systems. But Google Analytics does not always correctly determine SEO traffic from Yandex search: part of the organic traffic falls into the referral channel. You can adjust the data using the filter.



Filter setting



In the user advanced filter, we use two fields, Field A and Field B, and rewrite the Output Field based on them. If the campaign source matches the yandex regular expression, and the campaign channel matches the referral regular expression, the filter overwrites the user channel as organic.







Mail.ru SEO traffic also affected a similar problem, the filter for this search engine is configured in the same way.



Filters in Google Analytics have flexible functionality. In this article, we examined the basic filter settings, allowing you to bring the data to a convenient form for analysis. It is important to remember that filter order also plays an important role in filtering traffic.



All Articles