Tim Ryan Development Logo Atom

Delivering Useful Data With Google Analytics Views and Filters

Thanks for sharing:

How to Set up Properties, Views, and Filters in Google Analytics

Posted March 14, 2021 in Google Analytics

Successfully marketing any product or service online begins with understanding who your target audience is and who is responding to your marketing efforts. With views and filters, Google Analytics provides web marketers with a powerful tool to accurately measure website or app traffic. Unfortunately, too many Analytics admins are relying on raw unfiltered data.

While there is an unlimited number of Analytics configurations your business could employ, this article will walk you through setting up a Google Analytics property with the following Views:

  • Raw Data: All unfiltered Google Analytics data for a website or app.
  • Master View: Excludes bots, spiders, and off-site data.
  • External Traffic: Filters all internal traffic from the Master View.

GOOGLE ANALYTICS ACCOUNT STRUCTURE

Google Analytics structure begins at the account level. Each account can have multiple properties, usually websites or apps; each property can host multiple views, which are essentially filtered data sets.

While user management is beyond the scope of this article, it should be noted that account admins can set user permissions at the account, property, and view levels. This is important to keep in mind if your organization is measuring multiple properties and views.

Accounts: Accounts are the foundational unit for analytic data and are usually created for businesses or companies to house data for all of their websites and/or apps. In most cases, a business should employ a single account for all of its analytic data even if that company measures traffic across multiple websites and/or apps. Advertising agencies should create a separate account for each of their clients.

Properties: Properties represent basic data groupings, usually websites or apps, for a specific account. Most businesses will simply set up a property for their website. Additional properties can be created for apps or secondary sites. If you need a combined data view (i.e. cumulative website and app traffic), it’s better to create a single property and use views to combine or separate the data as needed. It is not possible to merge properties at a later date without losing existing traffic data.

Views: Views provide structure to properties by defining what traffic is and isn’t allowed into a specific view dataset. A view can filter out bot traffic, remove data from internal users, limit data to specific geographies, and much more. Be careful, though; view data collection doesn’t begin until the view is created, and filtered out data can NOT be added back into the view.

SETTING UP ACCOUNT PROPERTIES

New accounts, properties, and views are created by clicking on the admin button, usually a gear icon at the bottom left of the screen. This will open the Admin page. You can use this section to create a new account, but, for the purposes of this article, we’ll assume you have an account set up and ready to go.

To create a new property:

  • Click the CREATE PROPERTY button.
  • Choose between the Web, Apps, or Apps and Web options. If you choose the latter, you’ll be able to view the combined website and app data; you can then separate the app and web data using views and filters. Please note that you can choose between http:// and https:// for the URL option. Hopefully, your site uses https encryption with a site certificate.
  • Click CONTINUE.
  • Add your property details including the website name, URL (website address), industry, and time zone.
  • Click CREATE.
  • Follow Google Analytics instructions to place the tracking code on your website. You can do so directly or through a GTM (recommended, more to come in a later post). Since all websites are set up differently, please refer to your website admin for loading the tracking code.

CREATING PROPERTY VIEWS

For each new property, Analytics automatically creates a standard view titled All Web Site Data. This view contains the unfiltered data for its parent property. Admins should never filter data from the All Web Site Data view; instead, they should create alternate views with specified filters. For example, in this article, we will create a Master View that filters out bot and off-site traffic.

Google recommends changing the All Web Site Data view name to Raw Data before creating additional views.

To change the view name, do the following:

  • Go to the Admin menu.
  • Check the View column to ensure that the desired view is chosen. For the purposes of this example, we’re looking for the All Web Site Data view.
  • Click on the View Settings link. This will take you to the settings panel for your selected view.
  • Look for the View Name box and change the name. For this example, we’re replacing All Web Site Data with Raw Data.
  • Click SAVE on the bottom of the screen. If desired, you can go back to the Admin menu by clicking the right arrow button on the left side of the window.

Once your Raw Data view is established, you’re ready to begin creating customized property views. Since you cannot change view data retroactively, it’s important to ensure your filters are correct before applying them. Consequently, Google recommends setting up a Test View where you can review data before applying new filters to utility views.

To create a Test View, do the following:

  • From the Admin or View Settings windows, click CREATE VIEW.
  • Make sure you’re tracking the correct option for the Website or Mobile app. This selection should automatically default to the property settings.
  • Type Test View in the Reporting View Name box.
  • Set your time zone. Note: It’s recommended to use consistent time zones across all views. Otherwise, you will not be able to accurately compare data between views.
  • Click CREATE VIEW.

Now that our Test View is created, we can update settings and add filters.

CREATE A MASTER VIEW

The Master View will become our go-to view for data analysis and reporting. For our purposes, this view will include all data except for automated traffic and off-site impressions. First, we’ll create a filter that excludes automated bot visitors that scrape your website to collect data for search engine listings, directories, and numerous other purposes (some good and some not so great).

Once we have created a filter for bots, we’ll set up a second filter to exclude any off-site impressions, specifically data sent from other domains. Unfortunately, just about anyone can send data to your analytics account. Some unscrupulous websites use ghost referral spam to drive traffic to their own sites. Ghost referral spam is where someone sends analytics data to your account listing a fake referral source. The goal is to trick website owners into visiting the reported referral source to generate traffic for the fake referrer, to spread malware, or for other purposes.

Rather than creating a Master View out of the gate, we’ll build our filters into the Test View. Once we’ve confirmed the filters are working, we’ll copy the filters into our new Master View.

To exclude bot traffic from your Test View go to the Admin menu and make sure that Test View is selected in the View column. If this is not the case, you can select Test View using the dropdown view menu. Once you’re on View Settings page, look for the Bot Filtering option. Select the Exclude all hits from known bots and spiders option, and save your settings. Now your test view should exclude data from known automated sources.

Up next, we want to exclude traffic that originates from outside our website. We accomplish this by creating a custom filter that only accepts data from our domain name (i.e. www.mywebsite.com).

To include ONLY data for a given hostname, do the following:

  • Go to the Admin or View Settings window. Make sure Test View is selected in the View Column then click the filters link.
  • Click ADD FILTER.
  • Enter a descriptive name in the Filter Name box. I suggest Include MyWebsite.com Only where your website domain name replaces MyWebsite.com.
  • Choose the Custom filter type then select the Include option.
  • Select Hostname as the Filter Field.
  • Enter ^(www.)?MyWebsite.com$ as the filter pattern. Replace MyWebsite with your domain name. If your top-level domain (i.e. .com or .org), isn’t .com, make sure to include the correct option.
  • Ensure the Case Sensitive option is unchecked. This allows Google Analytics to track traffic for all case variations of your domain name (i.e. mywebsite.com vs. MyWebsite.com).
  • Click SAVE.

If your website uses more than one domain or if you want to include traffic from specific subdomains (i.e. special.MyWebsite.com), you will need a more complex Hostname filter pattern. More information can be found here: https://support.google.com/analytics/answer/1034324

Now your Test View should include only traffic from your base domain and exclude most bot and spider traffic. Before creating your Master View, it’s important to ensure your Test View is capturing the correct data. Go to the Analytics home screen and select the Test View from the accounts menu. Make sure that you’re seeing data before moving forward.

Assuming that data is flowing to your Test View, you’re ready to set up the Master View, which should be easy. Simply go to the Admin screen and do the following:

  • Make sure Test View is selected in the View column then click View Settings.
  • Once in the View Settings window, click the COPY VIEW button on the top right of the settings box.
  • Type Master View in the view name box and click COPY VIEW.
  • Make sure Master View is active in your View column.

CREATE AN EXTERNAL TRAFFIC VIEW

Our Master View provides us with an effective way to analyze site data without having to worry about bots, spiders, and non-site traffic corrupting our data, but it also includes traffic from our own development team and on-site team members. Some analytics admins will filter internal traffic from the Master View along with bots and off-site traffic. For the purpose of this example, we’ll create a unique External Traffic view.

To filter internal traffic, you’ll need to know your local IP address(es) which, fortunately, is easy to find. Simply go to Google.com and search What is my IP Address? The answer provided by Google should be the same IP address for everyone in your office as long as you’re on the same computer network. If you work in a large organization, you can check with your IT manager to be certain.

If you have team members who work from their homes regularly, you might have them check for their IP addresses and filter their traffic as well. You would simply repeat the steps below to create a new filter for each additional IP address that is used by your team.

As we did when building the Master view, we’re going to create our internal traffic filter in our Test View.

To create a filter to exclude internal traffic, do the following:

  • Make sure Test View is selected in the View column.
  • Click the Filters link to open the Filters page.
  • Click ADD FILTERS to open the Add Filter to View page.
  • Under Filter Name, enter Exclude Internal Traffic.
  • Under Filter Type, ensure that Predefined is selected.
  • From the dropdown menus below the Predefined option, choose the following options: exclude, traffic from the IP addresses, and that are equal to.
  • Enter your organization’s IP address in the IP address input box.
  • Click SAVE.

To test your filter, go back to the analytics home screen and ensure that you are still receiving data through the Test View. If you have a large organization that routinely uses your website, you will likely see a significant drop in data. This is OK since you’re now only viewing external traffic.

Finally, we need to create an External Traffic view and apply our new filters. If your Test View includes all of the filters from the Master View as well as our Exclude Internal Traffic filter, you could simply copy your Test View into a new view. We’re going to take a different approach since we want to be sure our data isn’t corrupted by an unknown change to the Test View. To be certain we know what data is being filtered, we’re going to copy the Master View then add our Exclude Internal Traffic filter.

To create the External Traffic view, go to the Admin window and do the following:

  • Select Master View from the View dropdown.
  • Click View Settings.
  • Click the Copy View button on the top right of the View Settings window.
  • Enter External Traffic as the New View Name.
  • Click the back (left) arrow to return to the Admin section and check to ensure the External Traffic view is selected.
  • Click the Filters link then click Add Filter.
  • In the Add Filters to View section, select Apply existing filter.
  • Select the Exclude Internal Traffic filter and click Add.
  • Click Save.

If your business has multiple IP Addresses to filter from the External Traffic view, you will need to use the instructions above to create and add a separate filter for each additional IP address.

Verify that the External Traffic section has the correct settings and filters in place. In the View Settings section, ensure that the Exclude all hits from known bots and spiders option is selected. On the Filters page, the Include Domain Traffic Only and Exclude Internal Traffic filters should be listed. Finally, after some time has passed, you should see data flowing into the new view. Traffic from the External Traffic view should be less than that of the Master View by the internal traffic your team creates.

This guide walked us through setting up a property and multiple views in Google Analytics. We created a Raw Data View as well as a Master View that excluded bot and off-site traffic. We then added an external traffic view that filters out data from our local IP address. For more information on setting up your Google Analytics account, we recommend the following resources:

https://analytics.google.com/analytics/academy/

https://www.bounteous.com/insights/2015/12/10/basic-google-analytics-filters-every-site

https://www.bounteous.com/files/uploads/Regular-Expressions-Google-Analytics_2019.pdf


Tim Ryan Development
717 Green Valley Road, Guilford Hills
Suite 200
Greensboro, NC 27408
(336) 455-8956
© 2021 Zilifre, LLC