If you need to block traffic from ads spy tools, this script below can help you do so

Tutorial

From your store admin, go to Online Store > Preferences
Scroll to the Additional scripts > Head section and paste this scripts.

<script>
var blockReferrer = ['adspy.com', '0refer.com', 'spybadao.com', 'spypro.io'];

var cName = "__clfref"; function setCookie(e,o,t=2147483647){var n=new Date;n.setTime(n.getTime()+t);var r="expires="+n.toUTCString();document.cookie=e+"="+o+";"+r+";path=/"}function getCookie(e){for(var o=e+"=",t=decodeURIComponent(document.cookie).split(";"),n=0;n<t.length;n++){for(var r=t[n];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(o))return r.substring(o.length,r.length)}return""}function delete_cookie(e){document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"}window.sbsdk.ready(function(){var e=window.sbsdk.shop.getPlatformDomain();-1!=document.referrer.indexOf(e+"/admin")&&delete_cookie(cName),""!=getCookie(cName)?window.location.href="http://google.com/not-found":document.referrer&&""!=document.referrer&&blockReferrer.some(function(e){if(-1!==document.referrer.indexOf(e))return setCookie(cName,1),window.location.href="https://www.google.com/not-found",!0})});
</script>


You can add, update blockReferrer value as desired

Save and you are done, all traffic from spy tools will be blocked to access your store.

If you're accidentally blocked by visiting your site via a spy tool, just login into your dashboard, open your site to restore access your site normally.
Due to technical complication, it can be impossible to block some spy traffics so we can only provide limited support to this issue.
Note that if you use http domain to redirect via https domain, our script block will not be able to detect spy website source.
Was this article helpful?
Cancel
Thank you!