Google Analytics – Essential Filters

Posted by Sertan Djelal
  • White Papers

Filters in Google Analytics are a must if you value your data and need to interpret your website traffic in the most meaningful way.

By default, Google Analytics does not apply any filters to your data. As a result your data may not be as reliable as you need it to be.

Firstly, at Netcel, whenever we setup Google Analytics for any of our clients, we always recommend creating an unfiltered profile view. This is considered good practice and provides a backup should anything go wrong. Filters cannot be applied retrospectively to data nor can data affected by an in correctly configured filter be recovered, which is why an unfiltered view is invaluable.

Lowercase URLs

By default, Google analytics will treat pages in different cases as separate pages which lead to fragmented data in reports. To avoid fragmented data due to capitalisation, a lowercase filter can be implemented to ensure all page URLs in Google Analytics are all in lower case.

This can be done using the below filters.

Lowercase Hostname Filter

Lowercase Hostname Filter

This will ensure that the hostname of your site is always displayed in lower case so any capitalisation by the visitor or a 3rd party site will be changed so it is uniform with the rest of the data.

  1. In the Admin area of Google Analytics, select the “Filters” option under the view you would like this filter applied to
  2. Press the + New Filter Button
  3. Name the filter, we suggest “Lowercase Hostname”
  4. Create a custom filter
  5. Select “Lowercase”
  6. Choose “Hostname” as Filter Field

Lowercase Page Path Filter

This will ensure that all page paths are displayed in lowercase so any capitalisation by the visitor or a link from a 3rd party site will be changed so it is uniform with the rest of the data.

Lowercase Page Path
  1. In the Admin select the “Filters” option under the view you would like this applied to
  2. Press the + New Filter Button
  3. Name the filter “Lowercase Page Path”
  4. Create a custom filter
  5. Select “Lowercase”
  6. Choose “Request URI” as Filter Field

Lowercase Campaign Source Filter

This will ensure that campaign sources within Google Analytics are displayed in lowercase regardless of how they have been used in campaign tracking URLs and links.

Lowercase Campaign Source Filter
  1. In the Admin select the “Filters” option under the view you would like this applied to
  2. Press the + New Filter Button
  3. Name the filter “Lowercase Campaign Source”
  4. Create a custom filter
  5. Select “Lowercase”
  6. Choose “Campaign Source” as Filter Field

Lowercase Campaign Medium Filter

This will ensure that Google Analytics displays the campaign medium all in lowercase regardless of how they have been added to campaign tracking URLs.

Lowercase Campaign Medium Filter
  1. In the Admin select the “Filters” option under the view you would like this applied to
  2. Press the + New Filter Button
  3. Name the filter “Lowercase Campaign Medium”
  4. Create a custom filter
  5. Select “Lowercase”
  6. Choose “Campaign Medium” as Filter Field

Remove Trailing Index

Some websites may have the index.html, index.php, index.aspx, or similar file at the end of some pages. This can fragment data of one page into two or more in some instances. To ensure that they are all displayed as a single page, the index file can be excluded from Google Analytics reports.

Remove Trailing Index Filter

Steps:

  1. In the Admin select the “Filters” option under the view you would like this applied to
  2. Press the + New Filter Button
  3. Name the filter “Remove Index File”
  4. Create a custom filter
  5. Select “Search and Replace”
  6. Choose “Request URI” as Filter Field
  7. Search String “index.html”
  8. Replace String is left blank

Prepend Hostname Filter

To make data in Google Analytics a little friendlier and easier to understand, it is recommended to add the hostname to all the data. This is even more valuable if cross domain tracking has been implemented or sub-domains are used and need to be tracked.

Prepend Hostname Filter

Steps:

  1. In the Admin select the “Filters” option under the view you would like this applied to
  2. Press the + New Filter Button
  3. Name the filter “Prepend Hostname”
  4. Create a Custom filter
  5. Select “Advanced”
  6. In Field A -> Extract A choose Hostname then (.*) in the box next to the drop down
  7. In Field B -> Extract B choose Request URI then (.*) in the box next to the drop down
  8. In the Output To -> Constructor choose Request URI then $A1$B1 in the box next to the drop down
  9. Field A is required
  10. Field B is not required
  11. Do override output field
  12. It is not case sensitive

Exclude Company IP Filter

We are able to learn a lot about our web visitors behaviour and trends. However, traffic trends and reports can be skewed by internal traffic from employees or other partners, particularly when something new is being tested. It is always recommend to block all IP addresses and traffic used internally by employees as well as any partners who may be frequently accessing the site. This is achieved by adding a separate filter for each IP or IP range that needs to be blocked.

Exclude company IP Filter

Steps:

  1. In the Admin select the “Filters” option under the view you would like this applied to
  2. Press the + New Filter Button
  3. Name the filter “Exclude Company IP Addresses”
  4. Create a predefined filter
  5. Select “Exclude”
  6. Select “traffic from the IP addresses”
  7. Select “that are equal to”
  8. Enter the IP you wish to be blocked

White List Host Domains

A recent annoying occurrence, for those of us who regularly rely on Google Analytics data, is the appearance of rouge hosts in our reports.

These rogue hosts have not physically visited the website but instead send their hostnames to random or a pool of Google Analytics account IDs, making it appear as if they have. Some have been known to maliciously alter data. This can be prevented by whitelisting domains.

White List Host Domain Filter

Steps:

  1. In the Admin select the “Filters” option under the view you would like this applied to
  2. Press the + New Filter Button
  3. Name the filter “Whitelisted Domains”
  4. Create a custom filter
  5. Select “Include”
  6. Choose “Hostname” as Filter Field
  7. Use a Regular Expression of .*\.example\.com$ If you are cross linking domains use the pipe (|) to separate each

Netcel.com uses cookies to make sure you get the best experience possible on our website. You can review our cookie policy and learn how to change your privacy settings on our cookie policy page. By continuing to navigate this website, or by clicking the button below, you hereby accept our policy regarding the usage of cookies as detailed in our cookie policy.

Accept