Filtering Out Traffic That Is Not From Your Website

June 1, 2010

It sometimes happens that someone will accidentally use your GA Web Property ID (UA-xxxxx-y) in their website.

When this happens, pageviews and visits from their website will show up in your GA reports.

To prevent this, you can create a filter and apply it to your main profiles.

Include hostname filter

The screenshot shows the use of a Custom -> Include filter on the Hostname field.  This example is for the site cats.com.

We are only including pageviews that happen on a domain that matches the regular expression “cats.com”.  This will match all of your subdomains such as my.cats.com or pictures.cats.com.

Website spanning multiple domains:

If you have a website that spans multiple domains such as cats.com and mycats.com and bluecats.com, then instead of filtering on “cats.com” you simply list all your domains, separated by a pipe:

Instead of:

cats.com

use:

cats.com|mycats.com|bluecats.com

Note:
If you have a profile that doesn’t have any filters on it, for raw data and troubleshooting, make sure you don’t add this filter to that profile.