Question

Shopify like all their technicall / programming support questions to be posted on stack overflow.

I have a client who is suffering from a horrendous amount of spam accounts.. hundreds of fake accounts are being set up each day. I've looked into captcha solutions - but none of these work (I'm assuming because the bot just reads the post url? - or has learnt it as shopify is a hosted platform).

I would like to integrate a honeypot - is there any server side hook that can be used to throw the fake user out? I've googled through shopify's documentation - but can't find anything on this. Thanks.

Was it helpful?

Solution 2

You can setup and listen to the customers/create Webhook. When you receive the customer records, you can do an internal inspection and decide whether it is fake or not.

Why not have a form element the human customer has to fill out before you accept the submission of the form. Most bots are too stupid to figure that out.

OTHER TIPS

To implement a honeypot, You will need to develop a private app for shopify and use the customer creation hook. In the form add a new field like

<input type="text" value="" name="customer[note][business_name]" id="business_name" style="display:none">

So real people will not see this field but bots will see it as a regular field and they will fill it and submit. Use the hook to get the customer data and check if hidden field is blank or not. If its not blank use shopify API and delete the account.

Live Demo

You can add a simple CAPTCHA:

<script type="text/javascript">
 $(document).ready(function() {
   var n1 = Math.round(Math.random() * 10 + 1);
       var n2 = Math.round(Math.random() * 10 + 1);
   $("#question").val(n1 + " + " + n2);
   $(".comment-form").submit(function (e) {
           if (eval($("#question").val()) != $("#answer").val()) {
                 $("#answer").css('box-shadow', '0px 0px 7px red');
                 e.preventDefault(); 
           } 
       });
});
</script>

<div>
    <br/>How much is: <input type="text" disabled="disabled" id="question"/>
    <br/>Answer:* <input type="text" id="answer"/>
</div>

Found here: http://ecommerce.shopify.com/c/shopify-discussion/t/adding-basic-captcha-protection-on-your-shopify-blog-152117

You can switch to social logins, like facebook / twitter. http://apps.shopify.com/social-login

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top