Reputation: 51937
I'm using Google Analytics and I'm using filters to remove referral spams. In my web.config
file, I also use this:
<rule name="buy-cheap-online.info" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{HTTP_REFERER}" pattern="*.buy-cheap-online.info" />
</conditions>
<action type="AbortRequest" />
</rule>
I have dozens of these rules and I want to add more. There's this file on GitHub that includes a list of spammers: https://github.com/piwik/referrer-spam-blacklist/blob/master/spammers.txt
I could just keep adding rules to the web.config
but it seems messy. What's another way to block referral spam traffic in asp.net so that all the sites in the text file can be blocked and if the file changes I can easily add new sites by reuploading the text file?
Note: I'm not asking for code to be written for me; I just want to know what other options I have.
Upvotes: 0
Views: 441
Reputation: 2363
That's right keep adding rules will be messy and even worse useless, most of the spam in GA never reaches your site, there is no interaction at all so any server-side solution like the web.config won't have any effect.
We can differentiate the spam mainly in 2 categories:
Some people still hesitate because they think creating filters is just hiding the problem instead of blocking. But there is nothing to block, it is just some guy making fake records on GA reports.
To give you an idea there are around 8 active crawlers while there are more than 100 ghosts and each week increasing. This is because the ghost method is easier to implement for the spammers.
The best way to get rid of all ghosts with just one filter based in your valid hostnames.
You can find more information about the ghost spam and the solution here
https://stackoverflow.com/a/28354319/3197362
https://moz.com/ugc/stop-ghost-spam-in-google-analytics-with-one-filter
Hope it helps.
Upvotes: 1