Shopify themes, liquid, logos, and UX
I am getting spammed daily from adlibraryspy.com and I would like to block this, but don't know how. I saw that there was another question posted about this and marked solved, but for some reason the discussion board will not show me the question or answers to how to fix it.
Hi! I have the same issue. Now I am trying to block them with the Custom JavaScript. If you want to try please follow the instructions below:
1. Edit Your Theme Code:
• Go to your Shopify Admin.
• Navigate to Online Store > Themes.
• Click on Actions > Edit code for your current theme.
2. Add Custom Javascript:
• Open the theme.liquid file (usually located under the Layout folder).
• Add the following JavaScript code before the closing </head> tag:
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
var referrer = document.referrer;
var blockedReferrers = ["adlibraryspy.com", "app.adlibraryspy.com"];
blockedReferrers.forEach(function(blockedReferrer) {
if (referrer.includes(blockedReferrer)) {
window.location.href = "https://yourwebsite.com/block-message"; // Replace with your desired URL or a custom block message page
}
});
});
</script>
This script checks if the referrer is one of the blocked referrers and redirects the user if it is.
Feel free to buy me a coffee if it was helpful 😉
paypal.me/mxfax
Was my reply helpful? Buy me a coffee
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025