Trying to Block Chrome Extensions like commerce inspector from My Shopify Store. This code runs perfectly on another store but it's now working correctly on my Shopify Store.
var junk_sites = ["app.commerceinspector.com","pexda.com","ecomhunt.com","dropship-spy.com","ehproductfinder.com","dropshippinggenesis.com","productmafia.com","e-sniper.com","drospy.com","anon.to","shoptrace.co","smartadfinder.com","nullrefer.com","upwork.com","nichescraper.com","salessource.io","fbcandy.com","easyali.com"];
junk_sites.forEach(function(v){
if( document.referrer.indexOf(v) != -1 ) {
document.location.href = parseURL('https://' + window.location.hostname);
}
});
Does anyone know how to block these urls without using php in Shopify best Shopify doesn't support PHP.