Articles on: Online store
This article is also available in:

Block traffic from spy tools to your website

Spyware is software with malicious behavior that aims to collect data from online stores on the market. Being crawled by spyware can cause you to lose your existing revenue because others will also know what is selling in your store and they will sell the same product. Blocking traffic from spyware to your site helps you prevent data leakage. In this article, we will guide you to prevent these software from gathering information from your online store.

Step by Step Tutorial



From your store admin, go to Online Store > Preferences.


In Additional scripts, paste the scripts below into the Head section.

<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 and update blockReferrer value to your preference.

Click Save.

Due to technical complications, it can be impossible to block some spy traffics. Therefore, we can only provide limited support to this issue.
If you use http domain to redirect to https domain, our script block will not be able to detect spy website source.



Block or allow certain countries to access the store
Add custom notices to the product page
Add Power Up Scripts to optimize your store
Add Facebook Live Chat to your store

Updated on: 09/02/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!