Spam referrals is a tiny JS library that is developed to remove the hassle of updating your Google Analytics filters with urls spamming your referral results. It's extremely useful for websites that you don't have control on its web server, GitHub pages for instance.
<script src="https://github.com/MohamedBassem/spam-referrals-blocker/releases/download/v0.2/spam-referrals-blocker.min.js"></script>
to your footer before loading Google Analytics' script.if( !isSpamReferral() ){
// Your google analytics code goes here.
}
An Example from my jekyll blog hosted on github pages Here.
The idea simply is that this repo will use this community-contributed list to create a JS file which will block the spam referral for you. The library will then be updated with the new urls but with the same download url. By having the script automatically included in your website you won't have to update the spam referral list in your Google Analytics anymore, it will be automatically done for you.
Your issues, pull requests, ideas are welcomed!