block referral traffic

How to block referral traffic in Google Analytics

Block referral traffic in Google Analytics with an exclude filter

This guide explains how to block referral traffic in Google Analytics by creating an exclude filter.

block referral traffic

Webmasters have different reasons as to why they might want to block referral traffic in Google Analytics. One common reason why webmasters seek to block referral traffic in Google Analytics is due to referrer spam. Referrer spam is a black hat SEO tactic that allows spammers to mix fraudulent web data into Google Analytics reports in hopes that it will provoke curiosity. Referral traffic from spam URLs is a growing problem around the world and can essentially ruin data measured by Google Analytics.

Additionally, some webmasters want to block referral traffic from a specific URL and others want to block referral traffic from multiple URLs. This can easily be done using the same Google Analytics filter.

How to create an exclude filter

1. Log into your Google Analytics account and go to Admin.

2. Select an account in the ACCOUNT drop-down menu or click Filters on the right side in the VIEW section.

3. Click the red + ADD FILTER button.

4. Create a Filter Name. If you plan to block only one URL in Google Analytics then make your filter name relative to the URL. If you plan to block multiple URLs in Google Analytics then make a standard filter name.

5. Select the Custom Filter Type.

6. Select Exclude and Campaign Source as the Filter Field.

7. Create a Filter Pattern. The Filter Pattern is the URL you want to block. If you want to block example\.com then make the Filter Pattern “example\.com.” To block multiple URLs in the same filter then make the Filter Pattern similar to this: example\.com | example\.com | example\.com | example\.com |

8. Click the blue Save button at the bottom of the page to save the filter.

How to delete an exclude filter

1. Log into your Google Analytics account and go to Admin.

2. Select an account in the ACCOUNT drop-down menu or click All Filters in the list underneath the drop-down menu.

3. Click delete next to the exclude filter you want to remove.

Sean Doyle

Sean is a tech author and security researcher with more than 20 years of experience in cybersecurity, privacy, malware analysis, analytics, and online marketing. He focuses on clear reporting, deep technical investigation, and practical guidance that helps readers stay safe in a fast-moving digital landscape. His work continues to appear in respected publications, including articles written for Private Internet Access. Through Botcrawl and his ongoing cybersecurity coverage, Sean provides trusted insights on data breaches, malware threats, and online safety for individuals and businesses worldwide.

More Reading

Post navigation

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.