You might be aware about darodar referral spam , econom spam, and now the new one rising is ilovevitaly.com as these are spam traffic that are showing in Google Analytics as referral traffic but this is spam and is not good for website. We are going to show you how we can block these spam referral traffic with just single javascript code or php code. You only need to add some simple code in your website.
If you are getting referral URL in Google Analytics that looked a bit like this:
This is a Russian spam network that entices webmaster and it show as affiliate links in Google Analytics. This is a black hat SEO (old time affiliate marketer) techniques that showing in our Analytics result. They simply put 301 redirection and website (darodar referral spam) redirect to any other website.
SetEnvIfNoCase Referer darodar.com spambot=yes
Order allow,deny
Allow from all
Deny from env=spambot
It basically sets a variable called “spambot” – then it assigns all visits from spam sites as that variable. Then it block that variable from entry to your website.
You need to go: Admin -> View -> View Setting You will see screen like below:
Now use below instructions:
<script type=’text/javascript’> var blocklink = ['http://darodar.com', 'http://econom.co',’http://ilovevitaly.com]; for (var b = blocklink.length; b–;) { if (document.referrer.match(blocklink[b])) window.location = “http://google.com/”; } </script>
php website user has to add below code in header.php file of theme folder:
<?php echo”<script language=’javascript’> var blocklink = ['http://darodar.com', 'http://econom.co',’http://ilovevitaly.com']; for (var b = blocklink.length; b–;) { if (document.referrer.match(blocklink[b])) window.location = “http://google.com/”; } </script> “; ?>
Please share this blog and comment when any unknown traffic shows in your analytics or if you have any question regarding spam traffic.
The web hosting industry has undergone rapid transformation in recent years, with AI-powered chatbots emerging…
When it comes to hosting your radio station online, two popular options stand out in…
GoSSDHosting.com GoSSDHosting.com is excited to announce its Black Friday Sale 2023! London Windows VPS Hosting - BLACK…
GoSSDHosting, a leading name in the web hosting industry, is thrilled to announce the launch…
GoSSDHosting is happy to announce that we are offering VPS Hosting that works in Turkmenistan…
Dear Clients, Our updated Super Alpha Reseller Hosting interface is now live for all super…