You can create a filter that excludes traffic referred from selected domains. When you exclude referrers in this way, you are preventing all hits originating from those excluded websites from being part of your Analytics traffic. One reason to do this would be to prevent spam hits from polluting your legitimate hit data. A referral exclusion filter works by comparing the filter pattern you provide with the hit values found in the Campaign Source dimension.
Filtering domain referrals is different from the Property level referral exclusion feature. Filters remove the hits from your traffic stream, so no sessions from those hits will be recorded. Referral exclusion, on the other hand, treats hits that are referred from the excluded sources as direct traffic.
Exclude a single referrer
- Follow the instructions to create a new filter for your view.
- Set the Filter Type to
Custom.
- Click the Select filter type drop-down menu and select
Exclude.
- Set the Filter field to
Campaign Source
. - Enter a Filter Pattern containing the domain of the referring source which you would like to exclude. For example,
some-spam-site.com
.
Exclude multiple referrers
Use a regular expression in the Filter Pattern field to exclude several referring sources:
Example:
example\.com|secondexample\.com|.*spammysubdomain\.com
In the example above, the pipe symbol | is used as an "or" operator, meaning filter example.com OR secondexample.com OR the .*spammysubdomain.com. Don't end the filter pattern with a pipe, as that will exclude ALL referral sources.