Seocheckout

How to block traffic from a specific country using Google analytics?



Write the reason you're deleting this FAQ

How to block traffic from a specific country using Google analytics?

I blocked spam referral n social traffic sites but daily attack from different sites so give me solution for it whether blocking country traffic helps or not.

Comments

Please login or sign up to leave a comment

Join
virusblock
Google analytics is a pile of crap and most people block it anyway and bots love it to death but you could try using a XML table that contains Whois address ranges on your server to not embed the GA.js and code into the page needed for GA or to just block the user/web-bots based on the country code.

Calling a remote service to return the country code for an IP-Address is far too slow for a web-page on the server side and the size of data-table needed to resolve addresses needs only to be about 50 megs in size, nothing today

Google was very nice to me, they annomalized the 5000 functions in the ga.js spyware script so no one could understand the javascript but that made it simpler for code to tweek the function because they all start with A,B,C,D,E instead of something like function GetUserAgent() so they shot themselves in the foot in that respect

Do not trust google when it comes to telling you who's real and who's not and put a bit of javascript in your pages so you can decide for yourself because few bots if any will execute the code and even less will request images or style sheets unless the bots are automating a browser instead of just using win-socket

The internet is alive, alive with spiders and bots, it's getting worse.



Are you sure you want to delete this post?