Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shopify honeypot

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.

like image 728
Rob Avatar asked Mar 27 '26 16:03

Rob


1 Answers

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

like image 169
Mash R. Avatar answered Mar 31 '26 06:03

Mash R.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!