Filters are used by Views to slice the data into smaller groups. Create a filter to exclusively see traffic for a specific subdomain or subdirectory. Set up a view for each subdomain to view your reports for each of them. Segment visitors in different ways by using filters. Filters are used for data preparation purposes and they alter your data. There is no way to undo the changes made by a filter. If you want to play safe for only altering your data temporarily, consider creating a segment. Ensure that in GA you have 3 different views – Master, Raw, and Test. Test your new filters in Google Analytics Filters and Views and ensure they are working correctly before applying them to your Master View. Normally filters require 24 hrs before it can be applied to your data. Filters apply only for forward data whereas past data remains unaffected.
For creating, editing, and applying new filters you should have Edit permissions at the account level. For applying/ removing existing filters from the view, you should have permissions at the View level.
Google Analytics Filters and Views: Setting up a filter
Create filters at the Account level or the View level.
- Creating a filter at the Account level and assigning them to views are best practices.
- Creating a filter at the View level will make it apply to that particular view only. This is done by creating a filter based on Custom Dimensions or Metrics. Assign filter order for this view.
To manage/ edit your filters,
- navigate to the All Filters menu.
- Through the All Filters menu fig1, you can manage or edit all the filters in the account.
Types of filters
- ISP domain filter> Exclude/ Include traffic from ISP domain.
- IP addresses filter> Exclude/ Include traffic from IP addresses.
- Subdirectories filter> Exclude/ Include traffic to particular subdirectories.
- Hostname filter> Exclude/ Include traffic to a particular hostname.
- Exclude/ Include> Exclude/ Include hits that match filter patterns. eg- camapign target URL, host name, etc.
- Lowercase/ Uppercase> Converts field content into Lowercase/ Uppercase characters. eg search terms, page titles, etc.
- Search and Replace> Searching a pattern within a data field for replacement of the matched pattern with alternate data.
- Advanced filters> Creating the 3rd field from 1 and/or 2 other fields.
Change the filter order for a view:
Filter order applies to the order in which your filters are applied. Data is processed sequentially with the first filter, then the second filter, and so on.
To change the filter order within the filters list, click ‘Assign Filter Order’ fig1 and use the move up & move down buttons to rearrange your filters.
eg 1-Include Specific Hostname
The domain of the page a user is on when sending a hit to Google Analytics is referred to as Hostname. Include only traffic from people visiting your site and exclude referral spam. This filter comes in handy when implementing cross-domain tracking. It filters data based on the hostname of the hits and records data in that view.
Track a domain www.sapcanvas.com and a subdomain say “blogs.sapcanvas.com”. For separate hits make separate views. Now, create the following filters as given below:
Create a filter for sapcanvas.com fig2.
- Name: Include sapcanvas.com only
- Type: Custom > Include
- Field: Hostname
- Pattern: ^(www\.)?sapcanvas\.com$
- Applies the filter to “sapcanvas” only View
Also, create a similar filter for blogs.sapcanvas.com fig3.
- Name: Include blogs.sapcanvas.com Only
- Type: Custom > Include
- Field: Hostname
- Pattern: ^blogs\.sapcanvas\.com$
- Applies the filter to “blogs.sapcanvas” Only View
eg-Include a Country
To include traffic only from a particular country or region say India fig4 create a filter as per below
- Name: Include India Traffic Only
- Type: Custom > Include
- Field: Country
- Pattern: India
- Applies the filter to the “India Traffic” Only View
If there are multiple countries to include in a view, enter a pipe “|” separating a list of the countries. e.g. India|Thailand|Singapore
Segment and Filters
A segment analyzes a subset of your data, eg viewing email traffic on your website from where the users came. Segments focus on a different session or user behaviors to highlight patterns and insights used for reporting and analysis. When the segment is deactivated the data reverts back to normal. Examples are segmenting consumers depending on factors such as gender, age, industry, etc. Segment users based on a particular country or city. Setting filters can permanently change the way data is collected. An example would be to exclude your IP address. Read more by clicking on Google Analytics Segments.
Google Analytics Filters and Views: View
A View is a perspective that you look at the data from eg views for management, PPC, etc. In Google Analytics All Website Data is a raw data view as it does not include any filters. In fact, raw data are all newly created views until configuration settings and filters are applied.
Within a view different configurations and filters are set up for processing data that comes in and it is then displayed in the reporting overview. The data that goes through such configurations and filters cannot be processed backward. Hence it is not possible to change configurations or take off the filter later and apply to the data that has already been collected. To overcome such situations set up three different views to make sure there is no error with the processing of the data. They are
- Unfiltered View for collecting raw data that comes in. No configurations set up or filters are applied in this view. At a future stage, we can always come back to this backup data to check the progress of configurations and filters.
- Test View allows you to test data after configurations have been set up and filter applied to see how the data gets processed. It allows you to be extra cautious by running the test view for about a week to make sure it is the data the users are actually looking for before applying them to your Master View.
- Master View holds the finalized test data view which we want to have for the view. They hold all such transferred configurations set up and filters applied from the test view. This view(s) is used for the analysis of data to configure the goals, filters, segments, etc.
Setting up a View
In Google Analytics overview, we have Account, Properties, and Views. When you signup for a new analytic account, you will automatically get the “All Web Site Data” view. To draw analysis from this report you will have to create more views with specific filters applied to it.
fig5> In your Admin- All Web Site Data click on +Create View.
fig6> Select Website and enter Reporting View Name as Unfiltered View. Next, select your Reporting Time Zone and click on the Create View tab.
fig7> Shows the Unfiltered View that is created.
fig8> In a similar way create Test View and the Master View.
fig9> Start with an unfiltered view and then build your master view to configure it as a standard setup. Copy the master view and put the copy in the test view by going to the view settings so that you do not go through the entire process of goals and filters. Next, rename your view to have a copy of that view.